|
cmon (m)
|
I'm just a website developer (well you can say a new one  ). When I get web projects, I usually do the hosting on external servers. Now a client wants to run a database on his system (Connected to the internet) and be able to synchronize the database on his local server (computer system) with the one on his website. How do I accomplish that? Here's my point: I'm of fan of the popular XAMPP software. Even if I install the XAMPP on his local system, how do I get to synchronize the database system (MySQL) with that of his website or how do I get the website to use the database on his local system using PHP, enabling real-time contents of the database to reflect on the website?
|
|
|
|
|
|
syskay (m)
|
This can be implemented by using the "Remote Mysql" feature.
|
|
|
|
|
|
cmon (m)
|
go on 
|
|
|
|
|
|
syskay (m)
|
Since you are going to be accessing the database of your website remotely, you will need to set the appropriate host access permissions in the "Remote Mysql" section. You can then go ahead to install and configure your database synchronization application.
|
|
|
|
|
|
cmon (m)
|
so where's the file? remember I'm using XAMPP. If you can, you can just direct my using a url to where I can get the resource I need.
|
|
|
|
|
|
smartsoft (m)
|
What i understand on what you want is that your local server is installed, and u want to link an external database you have created together with that you have on your website.  because i do n't really understand that part !
|
|
|
|
|
|
Kobojunkie
|
If what you want to do is sync the two databases, then check this out http://www.databasejournal.com/features/mysql/article.php/1584401 [url]http://lists.mysql.com/mysql/49[/url] If however, you want to sort of backup the contents of the local to the remote, then I suggest you, maybe use a trigger to have the remote server get updated each time a change is made to the local database. Problem is in my opinion, this is a really bad idea. So how about you connect your app directly to the remote database so that changes are made available in the DB as soon as your client makes the change to the same Database and then he can always back up the remote database to his local machine like once a day.
|
|
|
|
|
|
uspry1 (f)
|
There are three ways you can do MySQL remote/local synchronization for your client working on your web project at below: 1.) You could use MySQL replication, with your laptop as a replication client. Each time you connect your laptop will pull all changes to your tables since the last time you connected. The replication is about zero writes on the slave. It is used where you expect a slave to do nothing. Of course, you can use replication to get the source data into one database on your local server, then copy the data to a working schema using INSERT , SELECT queries and only make changes on the working schema. 2.) Under the website development contract where it is shown the agreeing with you and your client to furnish client's hosting server login system (username/password) to access the client's remote MySQL server, you can copy the data from your local server to remoted working schema using INSERT, SELECT queries and modify the working schema. 3.) You register the web-based remote access such as "GoToMyPC" (link: https://www.gotomypc.com/) or set up using Windows XP/Vista's "Remote Assistance" with Windows Live Messenger (formerly MSN Messenger) that allowing you to access remoted client's computer system to open client's local server to replicate source data into client's MySQL using INSERT, SELECT queries and modifying the working schema. Be sure you and your client must have Windows Live Messenger login on. Google how to use Windows' Remote Assistance or check with your Windows XP/Vista Help and Support. It is usually for remote web developer for foreigner/remote client in the distance without driving or meeting in person. ** If you are LINUX OS, then I am bit rusty to answer MySQL remote/local synchronization with LINUX. . .it would be different LINUX syntax. I used to be familiarized with LINUX debian-based OS in the past. **
|
|
|
|
|
|
uspry1 (f)
|
The most of time I deal with my clients working on MySQL database, I do replicate all my source data from my local server (not client's local server) to be copied into my client's remote MySQL server with client's hosting server username/password access according to my/client's website development agreement/contract.
Of course I code INSERT, SELECT on MySQL queries to modify the working schema in quality of database functionally the exactly the same as my local server.
I have no problem with that!
I used to have "GOTOMYPC" remote access to client's computer system in the distance only for COMPUTER REPAIR such as Virus attack, software upgrades, etc. as well as pick up document/pictures/external files need for my design project ONLY WITH CLIENT'S PERMISSION. Because my client is CLUELESS about computer, do not know nothing about it!
I terminated "GOTOMYPC", because it cost money per month!!!
|
|
|
|
|
|
Kobojunkie
|
Check out LOGINME.com , it is free
|
|
|
|
|
|
uspry1 (f)
|
Check out LOGINME.com , it is free
@kobojunkie It prompts saying service discontinued.
|
|
|
|
|
|
|
|
mambenanje (m)
|
@cmon if I get you clearly you want your web application to read a local mysql instance hosted on your clients computer. it means you have to convert your clients computer into a web server. All you need to do is make your clients computer have a PUBLIC IP ADDRESS, then you can login to the mysql on his computer by using the public IP address as the server host. from there all what you want is possible, you can host the whole application within the clients computer and it will still serve the world. But one thing is that the clients computer must be on 24/7 which I dont think is possible in Africa hope it helps
|
|
|
|
|
|
Abidemi_A
|
@mambenanje, I hv been following your contributions on this forum. I will like us to talk one on one. my contact is info@adten.net
|
|
|
|
|
|
mcneal
|
>> Using Windows: You can place the command below in a batch script, and use the "at" command or Windows task scheduler to execute it at intervals. \ , \xampp\mysql\bin\mysqldump --create-options -u [local_db_user] -p [local_db_password] -h localhost --add-drop-table [name_of_local_database] | \ , \xampp\mysql\bin\mysql -h [remote_MySQL_hostname_OR_IP_address] -u [remote_db_user] -p [remote_db_password] [name_of_remote_database] N.B "\ , \" - Replace with full path to where your XAMPP was installed, e.g F:\Program Files\ Values in squared-brackets "[]" are to be replaced with appropriate values and without the "[]". Host on both sides (ISP & Web host) must allow remote access to MySQL port (default 3306) You might need to allow remote access to your online (webhosts) DB - can be done using phpMyAdmin or host's control panel. Loads of possible command line switches is available at http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html Other refs: http://www.sitepoint.com/article/backing-up-mysqldump/2 (read Method 3) You can also use the replication option, but you most likely will need to be in control of of the remote server as well. >> Real-time Access If your client have a public IP, enable TCP access to MySQL port (default 3306) from your webhost, grant access privilege to database user that will be connecting remotely, point your PHP app to connect to clients public IP and you should be fine. Hope this helps
|
|
|
|
|
|
mambenanje (m)
|
@Abidemi_A I am happy to read your request and I will get to you soon when I catch some time
|
|
|
|
|
|