开发者

deploy a MySQL database on the remote server

开发者 https://www.devze.com 2023-02-15 19:54 出处:网络
I have a local MySQL databases and I want to deploy it on the remote server. There is some tool in PhpMyAdmin to synchronize local and remote databases, however is very slow if you have large databa

I have a local MySQL databases and I want to deploy it on the remote server.

There is some tool in PhpMyAdmin to synchronize local and remote databases, however is very slow if you have large databases, as in my case.

Is there a better and a f开发者_如何学JAVAaster way ? Such as shell through ssh, or something else ?


Fond a solution:

mysqldump -u my_local_db_username --password=my_local_db_password --host=localhost -C my_local_db_name | ssh user@www.my_domain.com "mysql -u my_remote_db_username --password=my_remote_db_password my_remote_db_name"

source: here

0

精彩评论

暂无评论...
验证码 换一张
取 消