import remote database into localhost

2019-06-14 18:12发布

I was figuring out how to import and export mysql databases without using an intermediary file .

1条回答
闹够了就滚
2楼-- · 2019-06-14 18:43

Came ascross this:

mysqldump -hremote_server.com -uuser -psome_pawd database_name | mysql -hlocalhost -uuser - psome_pawd database_name

here, the remote database dump is an input to the localhost which can be remote server too. So, server to server import and export happen here without using an intermediary file.

Note: If you wanna backup, u need to have an intermediary file

查看更多
登录 后发表回答