Linux本地服务器导入sql脚本到远程mysql数据库

来源:互联网 发布:java对接支付宝流程图 编辑:程序博客网 时间:2024/05/29 12:16

操作步骤

  1. 安装mysql客户端。
    apt-get install mysql-client-5.6
  2. 连接远程服务器,输入密码登录
    mysql -h host u userName -p dbNameEnter password: Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -AWelcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 235196939Server version: 5.6.29 Source distributionCopyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> 
  3. 远程导入本地sql
    mysql> sorce /root/test.sql
1 0
原创粉丝点击