Is there any concept of transaction log backup in mysql?

|
tunna_7 2020-09-09 21:33:52
mysql_en-5536.jpg
Tried running this code but it didn’t work
tunna_7 2020-09-09 21:35:34
Can anyone help me with it
piterden 2020-09-09 22:43:29
tunna_7 2020-09-09 21:35:34
Can anyone help me with it

You need to use JOIN statement

piterden 2020-09-09 22:43:44
Read about that in docs
drfibonacci 2020-09-09 22:45:39
tunna_7 2020-09-09 21:33:52
Tried running this code but it didn’t work

select pat_name, address from patient inner join (select pat_id, (bill_amount – discount) as bill from hospital_bill order by bill desc limit 1) as table2 on patient.pat_id = table2.pat_id;

drfibonacci 2020-09-09 22:48:01
xD yes
drfibonacci 2020-09-09 22:48:33
Spasiba
tunna_7 2020-09-09 22:51:28
drfibonacci 2020-09-09 22:45:39
select pat_name, address from patient inner join (select pat_id, (bill_amount – discount) as bill from hospital_bill order by bill desc limit 1) as table2 on patient.pat_id = table2.pat_id;

Ok cool
let me try this

drfibonacci 2020-09-09 22:53:45
tunna_7 2020-09-09 22:51:28
Ok cool
let me try this

Ok my bad, a slight change was done removing the unnecessary max function and group clause

drfibonacci 2020-09-09 22:56:21
In normal mysql or mariadb, the max(bill_amount – discount) would probably return only a single row but I’m on cockroachdb and its throwing an error(can’t work on aggregating function without group by clause)
piterden 2020-09-10 00:52:44
drfibonacci 2020-09-09 22:45:39
select pat_name, address from patient inner join (select pat_id, (bill_amount – discount) as bill from hospital_bill order by bill desc limit 1) as table2 on patient.pat_id = table2.pat_id;

SELECT pat_name, address
FROM patient
INNER JOIN (
SELECT pat_id, (bill_amount – discount) AS bill
FROM hospital_bill
ORDER BY bill DESC
LIMIT 1
) AS table2
ON patient.pat_id = table2.pat_id;

Hm… Why don’t you use an aggregate function MAX() for that purpose?

piterden 2020-09-14 15:12:32
max from what?
piterden 2020-09-14 15:13:29
From all cells of that column in the table?
piterden 2020-09-14 15:15:51
SELECT bill_amount – discount AS total
FROM table
ORDER BY total DESC
LIMIT 1;
drfibonacci 2020-09-14 18:11:02
piterden 2020-09-14 15:13:29
From all cells of that column in the table?

Yusssss

drfibonacci 2020-09-14 19:39:07
piterden 2020-09-14 15:15:51
SELECT bill_amount – discount AS total
FROM table
ORDER BY total DESC
LIMIT 1;

Hi
I just checked on MariaDB and it seems that although the max function works fine without aggregation, the id value that’s being returned doesn’t match which I believe happens as the database returns the first id value in the table

lichcse 2020-09-16 08:06:29
Hi everybody
lichcse 2020-09-16 08:07:33
I have a question and please help me. How do I config read data from slave when master reach to limit connection
drfibonacci 2020-09-16 09:35:10
lichcse 2020-09-16 08:07:33
I have a question and please help me. How do I config read data from slave when master reach to limit connection

I guess you know how to set max number of connections, and you have set the master slave architecture already
But the thing is when the master is overloaded, the slave would technically be overloaded as well since the master would be writing data to the slave using same number of connections as data is being written to the master

drfibonacci 2020-09-16 09:37:58
If you need to check for overload, I guess you need a server side script to achieve that, and when this event occurs, the program switches to the slave connection module
drfibonacci 2020-09-16 09:38:13
But I think what you need is a load balancer
drfibonacci 2020-09-16 09:39:12
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-usagenotes-j2ee-concepts-managing-load-balanced-connections.html
anilmcmt 2020-09-16 13:14:03
It is mssql syntax
anilmcmt 2020-09-16 13:14:10
anyone convert into mysql
anilmcmt 2020-09-16 13:14:11
merge call_report_code_rate t

USING (
SELECT * ,
concat(bank_no,’_ALLL’) bank_code
FROM call_report_code_rate
WHERE bank_no NOT LIKE ‘%_ALLL’) s
ON s.model = t.model
AND s.bank_code = t.bank_no
AND ifnull(s.lband,0) = ifnull(t.lband,0)
AND ifnull(s.uband,0) = ifnull(t.uband,0)
AND s.lperiod = t.lperiod

WHEN matched THEN
UPDATE
SET rate = s.rate
WHEN NOT matched THEN
INSERT
(
model,
lband,
uband,
lperiod,
uperiod,
rate,
bank_no
)
SELECT (model,lband,uband,lperiod,uperiod,rate,bank_code);

anilmcmt 2020-09-16 13:14:31
because mysql not support merge
MasterZiv 2020-09-16 13:50:18
anilmcmt 2020-09-16 13:14:31
because mysql not support merge

It supports it. INSERT … ON CONFLICT UPDATE …

acromegale 2020-09-16 15:08:47
MasterZiv 2020-09-16 13:50:18
It supports it. INSERT … ON CONFLICT UPDATE …

maybe you mean “on duplicate key update” ?

MasterZiv 2020-09-16 15:09:47
acromegale 2020-09-16 15:08:47
maybe you mean “on duplicate key update” ?

yes

Iconoclastic_004 2020-09-17 09:57:10
hi all one query
Iconoclastic_004 2020-09-17 09:57:18
Is there any concept of transaction log backup in mysql?
Iconoclastic_004 2020-09-17 09:57:19
We have full db backup and Incremental backup in place right?
drfibonacci 2020-09-17 22:21:32
Iconoclastic_004 2020-09-17 09:57:18
Is there any concept of transaction log backup in mysql?

https://dev.mysql.com/doc/mysql-backup-excerpt/5.7/en/backup-and-recovery.html

Although available in mssql, it seems mysql doesn’t have that

drfibonacci 2020-09-17 22:21:37
Iconoclastic_004 2020-09-17 09:57:19
We have full db backup and Incremental backup in place right?

Yes

nssvp 2020-09-18 17:54:01
Hey people,

Could you please suggest any source to learn mysql for beginners

I know there are lots of sources like w3school, tutorialspoint, and many videos on Internet

I already learnt upto some extent, like creating tables, insert, select

I need to know only one easy source to learn, be it reading or video, I have less time I have to complete mysql by tomorrow

Thank you in advance

piterden 2020-09-18 18:12:56
nssvp 2020-09-18 17:54:01
Hey people,

Could you please suggest any source to learn mysql for beginners

I know there are lots of sources like w3school, tutorialspoint, and many videos on Internet

I already learnt upto some extent, like creating tables, insert, select

I need to know only one easy source to learn, be it reading or video, I have less time I have to complete mysql by tomorrow

Thank you in advance

Why did you decide to learn MySQL?

nssvp 2020-09-18 18:22:25
piterden 2020-09-18 18:12:56
Why did you decide to learn MySQL?

Actually in search of job, learning full-stack java, so mysql is a starting point

nssvp 2020-09-18 18:23:34
Started a week back 😅 but due to some works I’m unable to concentrate and complete mysql, and tomorrow I should complete mysql and shift to java
MasterZiv 2020-09-18 18:25:07
nssvp 2020-09-18 18:23:34
Started a week back 😅 but due to some works I’m unable to concentrate and complete mysql, and tomorrow I should complete mysql and shift to java

Only one day for whole MySQL?

nssvp 2020-09-18 18:29:57
MasterZiv 2020-09-18 18:25:07
Only one day for whole MySQL?

Not whole, but at least I should be able to create one Human Resource Management System

nssvp 2020-09-18 18:30:03
Using my knowledge
MasterZiv 2020-09-18 18:38:29
nssvp 2020-09-18 18:29:57
Not whole, but at least I should be able to create one Human Resource Management System

It is half year course in the University. You can’t do this in a week.

nssvp 2020-09-18 18:43:14
I want to do something like crash course,

Not crash course

But

Crash crash crash course 😅 3x crash course

MasterZiv 2020-09-18 18:44:28
nssvp 2020-09-18 18:43:14
I want to do something like crash course,

Not crash course

But

Crash crash crash course 😅 3x crash course

What for?
To be able to crash?

nssvp 2020-09-18 18:55:22
MasterZiv 2020-09-18 18:44:28
What for?
To be able to crash?

Haha 😅

Actually, I’m out of schedule
I should start learning java from day after tomorrow as part of my full-stack java course,

And I think myself as a fast learner, I should check if I’m capable of learning things very fast or not

drfibonacci 2020-09-18 18:56:24
nssvp 2020-09-18 18:55:22
Haha 😅

Actually, I’m out of schedule
I should start learning java from day after tomorrow as part of my full-stack java course,

And I think myself as a fast learner, I should check if I’m capable of learning things very fast or not

https://sqlzoo.net/wiki/SQL_Tutorial

nssvp 2020-09-18 18:56:51
As you people are very experienced with programming, I think you people can guide me and compile resources easily for learning quick
nssvp 2020-09-18 18:57:00
drfibonacci 2020-09-18 18:56:24
https://sqlzoo.net/wiki/SQL_Tutorial

I’ll check

drfibonacci 2020-09-18 18:57:31
nssvp 2020-09-18 18:55:22
Haha 😅

Actually, I’m out of schedule
I should start learning java from day after tomorrow as part of my full-stack java course,

And I think myself as a fast learner, I should check if I’m capable of learning things very fast or not

Learning fast is another way of typing waste of time but maybe you remember everything you see

nssvp 2020-09-18 18:58:59
drfibonacci 2020-09-18 18:57:31
Learning fast is another way of typing waste of time but maybe you remember everything you see

Hmm yeah, I should practice a lot to learn right

|