Is there any one who can help me with migrating db from one server to another server via ssh?

|
Karthick 2021-07-14 23:23:18
MasterZiv 2021-07-14 23:21:52
Oracle: how to UPSERT (update or insert into a table?)
https://stackoverflow.com/q/237327/1146301

This one will work 1 row update I am looking for bulk insert and update

Karthick 2021-07-14 23:24:03
MasterZiv 2021-07-14 23:22:56
Check the above so article

Yes I am already planning to create procedure

Karthick 2021-07-14 23:25:29
MasterZiv 2021-07-14 23:22:28
No, don’t worry much

Aiyyo

MasterZiv 2021-07-14 23:32:33
Karthick 2021-07-14 23:23:18
This one will work 1 row update I am looking for bulk insert and update

This is also possible to do with pl SQL and rowset variables or whatever it is called.
To some respect, if the roe set is not very big, like 20 k rows

Deb_575 2021-07-15 05:03:29
Karthick 2021-07-14 23:13:42
MySQL Query

INSERT INTO employee (userID, userName, email, salary) VALUES

(296, ‘test 1’, ‘test@gmail.com’, 20000), (297, ‘test 2’, ‘test2@gmail.com’, 30000)

ON DUPLICATE KEY UPDATE salary = VALUES (salary)

=> userID, userName, email column is unique

Same Query i want in oracle

DUPLICATE KEY will not work in oracle, it’s there any other solution with example of above query

MERGE function is available in oracle use that.
I wish it was available in mysql too

VishakhaNehe 2021-07-15 06:10:54
Hi,
Is there any one who can help me with migrating db from one server to another server via ssh?

After importing on another server, my imported db is not showing in my phpmyadmin db.

MasterZiv 2021-07-15 06:29:29
VishakhaNehe 2021-07-15 06:10:54
Hi,
Is there any one who can help me with migrating db from one server to another server via ssh?

After importing on another server, my imported db is not showing in my phpmyadmin db.

This is not an indicator of any problem.
Use standard MySQL utilities to check this

VishakhaNehe 2021-07-15 14:08:42
@admiror_01 Yeah I understand, I was figuring out but via export and import can be done…
I exported via:
mysqldump -u username -p dbname > dbname_backup.sql

And I imported via:
mysqldump -u username -p dbname < dbname_backup.sql

But now on 2nd server’s DB, when I go and check nothing is there…

Would be helpful if you or anyone can help…

MasterZiv 2021-07-15 14:11:56
VishakhaNehe 2021-07-15 14:08:42
@admiror_01 Yeah I understand, I was figuring out but via export and import can be done…
I exported via:
mysqldump -u username -p dbname > dbname_backup.sql

And I imported via:
mysqldump -u username -p dbname < dbname_backup.sql

But now on 2nd server’s DB, when I go and check nothing is there…

Would be helpful if you or anyone can help…

the second thing is wrong, you should do this with MYSQL command, not with MYSQLDUMP

VishakhaNehe 2021-07-15 14:12:25
MasterZiv 2021-07-15 14:11:56
the second thing is wrong, you should do this with MYSQL command, not with MYSQLDUMP

I tried my mysql command too but in that way also nothing happens

MasterZiv 2021-07-15 14:13:05
VishakhaNehe 2021-07-15 14:12:25
I tried my mysql command too but in that way also nothing happens

What would you expect to happen and what really happened ?

VishakhaNehe 2021-07-15 14:13:54
I ran the command and it did not showed any success / error message + I checked in my db too and nothing was there..

My db is still empty

VishakhaNehe 2021-07-15 14:14:52
MasterZiv 2021-07-15 14:13:05
What would you expect to happen and what really happened ?

I want to move db from one server to another server so I my db should be there in 2nd server

MasterZiv 2021-07-15 14:15:06
VishakhaNehe 2021-07-15 14:13:54
I ran the command and it did not showed any success / error message + I checked in my db too and nothing was there..

My db is still empty

Did the command finished ?

VishakhaNehe 2021-07-15 14:15:50
MasterZiv 2021-07-15 14:15:06
Did the command finished ?

Yeah…

MasterZiv 2021-07-15 14:16:51
VishakhaNehe 2021-07-15 14:15:50
Yeah…

What’s in the transcript ?
What did it print to console/file ?

Deb_575 2021-07-15 20:45:28
VishakhaNehe 2021-07-15 14:14:52
I want to move db from one server to another server so I my db should be there in 2nd server

Did you create the the empty db on the 2nd server?
Once you initiate the import log in via another session and check the show processlist command output to see what is happening

Balaji Naidu Chintala 2021-07-16 15:42:20
Hi Friends, Can someone suggest good free MySQL monitoring tool?
svart 2021-07-16 15:52:50
pmm from percona
smlkw 2021-07-16 15:53:08
svart 2021-07-16 15:52:50
pmm from percona

+1

Balaji Naidu Chintala 2021-07-16 15:56:37
AWS RDS MySQL
Deb_575 2021-07-16 18:21:10
Balaji Naidu Chintala 2021-07-16 15:42:20
Hi Friends, Can someone suggest good free MySQL monitoring tool?

Zabbix

R 2021-07-17 07:36:43
How to increase the speed and performance of a very big database?. Suppose we have a database in which each table has millions of records so how we can implement techniques or rules to improve its speed and performance?. Which are the best techniques and rules?.
Deb_575 2021-07-17 07:39:18
1. Increase memory parameters of mysql server and underlying os resources
2. Partition bigger tables
3. Use indexes
4. If you have many indexes consider reducing them instead use invisible indexes to understand the query execution and use those indexs only
5. Consider temp dir and log buffer usage as well
6. And few specific to your database setup
MasterZiv 2021-07-17 08:18:18
R 2021-07-17 07:36:43
How to increase the speed and performance of a very big database?. Suppose we have a database in which each table has millions of records so how we can implement techniques or rules to improve its speed and performance?. Which are the best techniques and rules?.

1) Use cache, give more memory to it.

2) Build indices and verify query plans to use them.

3) Use SSD disks.

MasterZiv 2021-07-17 08:19:35
Deb_575 2021-07-17 07:39:18
1. Increase memory parameters of mysql server and underlying os resources
2. Partition bigger tables
3. Use indexes
4. If you have many indexes consider reducing them instead use invisible indexes to understand the query execution and use those indexs only
5. Consider temp dir and log buffer usage as well
6. And few specific to your database setup

2 partitioning – it does not work always as a positive technology…

Deb_575 2021-07-17 08:54:03
It’s works really well if the workload is read intensive for bigger tables
R 2021-07-17 09:53:51
Can someone explain me with sample query, how multiple(millions of orders may happen on same time) orders inserts to same table from different different customers, table will lock or not, how primery keys genarates in this case on same table
MasterZiv 2021-07-17 10:00:58
R 2021-07-17 09:53:51
Can someone explain me with sample query, how multiple(millions of orders may happen on same time) orders inserts to same table from different different customers, table will lock or not, how primery keys genarates in this case on same table

The question is unclear.

R 2021-07-17 10:04:16
MasterZiv 2021-07-17 10:00:58
The question is unclear.

In simple, many peoples(millions) orders product at time, so how to write query on one table that should work without lock or crash when millions of clients insert data on same time

Deb_575 2021-07-17 10:20:56
Simple insert statements do not create locks
Deb_575 2021-07-17 10:22:36
R 2021-07-17 10:04:16
In simple, many peoples(millions) orders product at time, so how to write query on one table that should work without lock or crash when millions of clients insert data on same time

That is not your job it’s database internal mechanism there is something called request queues
Databases are designed to handle bulk inserts or delete or any bulk operation

MasterZiv 2021-07-17 10:29:17
R 2021-07-17 10:04:16
In simple, many peoples(millions) orders product at time, so how to write query on one table that should work without lock or crash when millions of clients insert data on same time

this is impossible and not realistic.
But some number of parallel transactions like say 100 may happen at the same time without any efforts from you.
Just execute some INSERT statements.

Deb_575 2021-07-17 10:33:56
MasterZiv 2021-07-17 10:29:17
this is impossible and not realistic.
But some number of parallel transactions like say 100 may happen at the same time without any efforts from you.
Just execute some INSERT statements.

Rajanikant Adding to this if you want to understand how database actually works read the code
Mysql is open source so source code is available

MasterZiv 2021-07-17 10:37:24
Deb_575 2021-07-17 10:33:56
Rajanikant Adding to this if you want to understand how database actually works read the code
Mysql is open source so source code is available

no, I would not recommend this.
The code of MySQL is very voluminous and unclear.
If you know what you search for, possibly, you will find it, but just simply reading the code for studying DBMS is very very bad idea.
To convince you, just have a look at the code once.

|