[英]How do I Connect to the Local database to the Server MYSQL database
Hello Friends I want to Send the Data from local database to Server MYSQL database How it is possible.Means Local server to the Remote Server.你好朋友我想将数据从本地数据库发送到服务器 MYSQL 数据库怎么可能。意思是本地服务器到远程服务器。
https://support.bigrock.com/index.php?/Knowledgebase/Article/View/831/9/allowing-remote-connections-on-your-mysql-database-on-linux-hosting https://support.bigrock.com/index.php?/Knowledgebase/Article/View/831/9/allowing-remote-connections-on-your-mysql-database-on-linux-hosting
I also Found this link But it is not working.我也找到了这个链接 但它不起作用。
As per my understanding with your problem, you want to import data from your local machine mysql to remote machine mysql, if it is so then you can try as per below-根据我对您的问题的理解,您想将数据从本地机器 mysql 导入到远程机器 mysql,如果是这样,那么您可以按以下方式尝试-
First of all provide permission on remote machine to your local ip then use below command-首先向您的本地 ip 提供远程机器上的权限,然后使用以下命令-
If your local machine is linux-如果您的本地机器是 linux-
mysqldump -uroot1 -proot1123 your_db your_table | mysql -h remote_ip -uroot2 -proot2123 your_remote_db
Here root1 is a user on your local machine and its password is root1123 while root2 is a remote machine user and its password is root2123这里 root1 是您本地机器上的用户,其密码是 root1123,而 root2 是远程机器用户,其密码是 root2123
If your local machine is windows then first go to your mysql bin directory by cd command in command prompt and then use above statement.如果你的本地机器是windows,那么首先在命令提示符下通过cd命令进入你的mysql bin目录,然后使用上面的语句。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.