简体   繁体   English

如何将本地数据库连接到服务器MYSQL数据库

[英]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.

相关问题 如何将表单数据发送到本地 MYSQL 数据库? - How do I send form-data to a local MYSQL database? 如何安全地连接到另一台服务器上的MySQL数据库? - How to securely connect to MySQL database on another server? 如何在没有 MongoLab 的情况下将本地 MongoDB 数据库连接到我的 Android Studio 应用程序? - How Do I connect a local MongoDB database to my Android Studio Application without MongoLab? 如何将SQLite本地数据库连接到HTML前端? - How can I connect a SQLite local database to a HTML frontend? 如何将网站连接到MYSQL数据库? - how to connect Website to MYSQL database? 我如何将我的数据库与 Angular 应用程序连接起来 - How do i connect my database with Angular app MDN Nodejs / Express教程:如何连接到mlab数据库? - MDN Nodejs/Express tutorial: how do I connect to the mlab database? 我在哪里可以使用AngularJS和node-mysql连接到MySQL数据库? - Where do I connect to MySQL database using AngularJS and node-mysql? 如何在iPhone上的Safari浏览器中查看本地数据库版本? - How do i view the local database version in safari on the iphone? 如何从HTML读取本地访问数据库文件? - How do I read a local access database file from HTML?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM