How to send Mysql changes from local server to online live server - php

I have created a web app locally in WAMP with PHP and a MySQL database. I am about to launch a demo online on a Linode server.
My question is once I have got it live on LINODE and I want to add a new Mysql table locally on WAMP how do i push the MYSQL changes to the live version online. I am not sure what this is called and how to do it. if anyone can share ideas/videos that would be awesome

I would suggest using a MySQL Replica, in which the replicated database will only be read from.
That or you can create some type of CI/CD pipeline which will run the same queries on your local as the remote, but that's a bit more complex.

Related

How to make PHP web application work online and offline?

I am new into web development. I have PHP web application which I created using some Rapid Development Tool. For now I can run it on the server with online database and as well i can run it on my local machine with local database (offline, using XAMPP).
The question is: How to make web PHP application that will be:
stored locally
be able to easily update somehow on different devices
will work with online database when internet is here. Once internet is not here, database will be switched to local one.
databases will be synchronized as well
Is there any software that can handle all of this? Or should I do it manually? Since I am new here, I have completely no ideas on how to realize that.

How to connect a web app in a pc with a database on another pc using php mysql XAMPP

I have a web app in php mysql programmed with xampp server.
I need to have the web server with the app files in one pc on xammp and connect it to a mysql database on another pc using xampp also I imagine on phpmyadmin as usual.
I don't know how to redirect the database, as in one pc you just put the dB name in the queries but I don't know how to do it if the database is on another pc.
I couldn't find any info online, I already can access my xampp server through ip address on another devices but with the web server and the dB server on the same pc.
I need to have the web app files in one pc and the database in another, using xampp in both pc. So I can connect other devices as clients and use the web app normally.
Please help:( it is for a project :(
Edit:
I am beginner, so I really would like a detailed explanation with examples please so I can replicate it.

Desktop Application with Client Server Architecture That Syncs with Cloud Database

I have a web app running with PHP and MySQL.
I need to develop a desktop application which will sync data from the cloud DB whenever the client's computer connects to internet. If the client's computer is not connected to the internet, the desktop application will continue to work offline, using the local DB. The local DB is obviously a replica of the cloud DB.
I don't want to use Microsoft c# to create the desktop application. The desktop application needs to be cross platform and should run on Windows, Mac and Linux.
I have used XAMPP to create a local MySQL DB and have achieved the local app to sync with the cloud app. However, there are multiple problems to that approach.
-- Whenever my client's need to install the local app, they need to call me and I have to install XAMPP in their computer, setup the server, setup the local database and prepare it to sync with the cloud database with their account. They obviously aren't tech savvy so they don't know how to do it themselves.
-- If the client formats his computer, they will call me again and again and I have to set it up for them all the time, which isn't scalable in the longer haul.
-- XAMPP doesn't work when there are other processes running and using common ports. Example - Skype, Quickheal and other antivirus software running will prevent the SQL server to start. Sometimes what happens is that even after I have installed the local app, the client will install an antivirus software or some other tool and my local app will stop working on their computer.
Hence, I need to do away with XAMPP and switch to something else.
SQLite is out of question since it is serverless. I don't want to use .NET either. What I am looking for is this
I want to develop the database driven local application and package it somehow. I want to provider an installer file which will automatically install the database server, setup the database and everything else. The client will only login to the system in the local app and he doesn't have to setup any server. All the work that he does will be synced with the cloud server whenever internet connection resumes.
Please note that there is a master slave work involved. The client will have multiple terminal computers using the master system from other terminals and all these terminal computers will use the local database installed in the master computer.
I have tried to illustrate this with a diagram below
What's the best way to go about it?

back up a DB to another DB on seperate servers?

Alrighty, i've got a processor intensive program i'm running on a locally hosted server, i recently bought a web hosting service and want to frequently update the website's DB with the local server's DB information but cannot figure out how to go about doing this.
I'm using PDO and the local server is a Debian Distro, the remote server is hosted on JustHost. I'm hoping there's a way to update the remote without having to just dump the local's SQL file and upload it to the remotes.

Connect to a non locally hosted database when using MAMP?

im looking to launch a site soon that will have lots of user data on it.
For easier testing and uploading etc for changes i want to know if i can work on my MAMP site, whilst using directly the database from the live site?
Thanks.
I recently used MAMP and my database connected fine from one at the hosting company (not locally) if you use Joomla you can change the configuration.php file to point to your live database.

Categories