-4

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.

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.

Karan Adhikari
  • 352
  • 1
  • 12
  • You have to mysqldump all your information on local server and then create server database and import mysqldump results. Take a look on this: http://www.cyberciti.biz/tips/howto-copy-mysql-database-remote-server.html – Javier Núñez Sep 15 '15 at 10:06
  • Sir Actually I Creating a Desktop application,Which is used the local database but after few days when this Application will be Connect to the internet all local data should be transfer to the server database. – Karan Adhikari Sep 15 '15 at 10:35

1 Answers1

0

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-

First of all provide permission on remote machine to your local ip then use below command-

If your local machine is 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

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.

Zafar Malik
  • 6,734
  • 2
  • 19
  • 30
  • Sir Actually I Creating a Desktop application,Which is used the local database but after few days when this Application will be Connect to the internet all local data should be transfer to the server database. – Karan Adhikari Sep 15 '15 at 10:34
  • So I using the web sql sync for this but my problem is how is it possiable to send the local web Sql data the server mysql database – Karan Adhikari Sep 15 '15 at 10:37
  • you can do it by given command just skip table name so that complete db can be restore to remote server..but better option will be that first take backup from local db then move that backup from local to remote db server and then restore there as it will be fast. – Zafar Malik Sep 15 '15 at 10:41
  • Actually I am using WebSqlApp which is Provieds the Environment in which all local data store into the browser in sqlite file.and it provides the Sync Button when user of local Application click on the sync button all data – Karan Adhikari Sep 15 '15 at 10:50
  • transfer to the server mysql database.But it is working on local server not remote server – Karan Adhikari Sep 15 '15 at 10:51
  • r u able to connect sqlite prompt or able to take backup in .sql format by any way. – Zafar Malik Sep 15 '15 at 11:12
  • off curse but I develop desktop application for client and client is non technical so i provide only one button when user hit the button all data sync to server. – Karan Adhikari Sep 15 '15 at 11:19