操作步骤
- 安装mysql客户端。
apt-get install mysql-client-5.6
- 连接远程服务器,输入密码登录
mysql -h host –u userName -p dbName Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 235196939 Server version: 5.6.29 Source distribution Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
远程导入本地sql
mysql>
source /root/test.sql