I'm trying to setup a master (Local Server) - slave (Remote Server) replication in PhpMyAdmin and I can't seem to find a reference how to setup without using the command line only in the PhpMyAdmin user interface.
Basically, you can't. The MySQL server process has to be enabled and configured for replication in either case, and to modify the MySQL configuration you have to edit the configuration file my.cnf. This is not something phpMyAdmin can modify arbitrarily when connecting; it has to be set in MySQL from when the software first initializes.
That's why the directions show the relevant lines you have to modify in the MySQL configuration; because MySQL requires it to be done that way. Unfortunately, there's no way to graphically enable MySQL replication from the graphical interface alone.
Related
Use Case: A MySQL instance will be running on production with required databases. I need to configure this running container as a master and spin up one more MySQL instance as a slave.
Challenges: Facing issues in configuring running MySQL instance as a master. The issue is not able to create replication user and not able to append the master/slave configuration to my.cnf file. The reason is,
To create replication user or to execute any custom SQL commands in container, we have to place initdb.sql with required SQL commands inside docker-entrypoint-initdb.d. So when container starting it execute the file present in docker-entrypoint-initdb.d and executes it, if the database had not created, if the database had created already it skips executing this .sql file residing in docker-entrypoint-initdb.d. This is the root for failing to configure master because MySQL is running with databases in production. So I cannot take this solution to configure as MySQL.
After facing this issue we planned to put the configuration SQL commands in .sh and keep in docker-entrypoint-initdb.d and execute them by patching the deployment. In this scenario we are facing some permission issues when executing the .sh files.
I need to configure replication(master-slave) for MySQL instance(s) in kubernetes world. I gone through the lot of posts to understand how to implement this. Nothing worked out as I am expecting and as I explained above. Along with this I found a custom image(bitnami/mysql) which supports setting up the replication, which I don't want use because finally I would not be able to implement this in production env.
So it will be very grateful if anyone helps me by suggesting any approach to solve this problem.
Thank you very much in advance.!!!
It started with installation of wampserver for php, before that I had already running MySQL server 5.7 with all databases properly showing in the side schema panel. When I launched MySQL server after installation of wampserver 5.7.14, the password for root was overridden and no database except sys is showing. Also I found another user (mysql.sys) has been created (found in Users and Privileges). Then I looked for databases in path "ProgramData\MySQL\MySQL Server 5.7\Data", all databases are present in the folder (thank god they are not deleted). Problem is now for my website I get this error:
"Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration"
Exception Details: System.Data.Entity.Migrations.Infrastructure.AutomaticMigrationsDisabledException: Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.
I know this is not related to migrations because my database already exists but I don't know how to solve the problem that MySQL can see the databases in its "ProgramData\MySQL\MySQL Server 5.7\Data" again.
When you installed WAMPServer on a system that already had a MYSQL Server instance installed on it, you created a second MySQL Server instance. See your service you will have one called wampmysqld or wampmysqld64 and another called MYSQL.
Now, whichever service you start first will be the MySQL Server that Workbench, or anything else is talking to. And you will only see the databases that this MySQL Server instance knows about.
Correct Solution:
Stop WAMPServer
Start the MYSQL installed with Workbench
Backup all YOUR databases, NOT the ones created by MySQL like mysql, sys, information_schema, performance_schema
Stop this MYSQL Server.
Uninstall this MySQL Server
Start WAMPServer
Restore your databases to this MySQL Server instance
All should start working as expected now.
Connect your Workbench to WAMPServers MySQL Server
Update
Did a robust workaround, though not very suggestible but database is now accessible in MySQL workbench. Though I'm having the same error when opening the website on local web server. One thing that I did not mention before that environment is Windows based. what I did is copied database from the ProgramData MySQL path to "..\wamp64\bin\mysql\mysql5.7.14\data" path and refreshed schema in workbench. Any advice why I'm still having problem in web server.
My MySQL database (local server) is connected to a weather station. The data are updated continuously on my local server. My idea is to develop a web application that allows me to access this data.
My local database (MySQL) has to be replicated on a remote server (phpmyadmin)
The architecture is as follows:
My questions are:
1- How I do the connection ? I know that I can import my cvs file manually but I don't want to do this.
2- Can I update the datas automatically in my remote server ?
NOTE: I only want to queries on my remote server (phpmyadmin), I will not create or modify new datas.
Thanks you for your help.
As i understood, you want to make a copy of your local mysql data on a remote server.
first of all phpmyadmin is a tool or webapp to access mysql , it is not a server itself.
and second
there are two type of replication approach
Master-slave (read from slave , write to master, that will sync to slave)
How to do it
Master- Master (whatever operation are on master that will also replicate on other master) How to do it (Master-Master replication is deprecated. See Group Replication as a replacement)
You can choose the approach as per your requirement
Master-master vs master-slave database architecture?
How to achieve replication
http://dev.mysql.com/doc/refman/5.7/en/replication-howto.html
I have two databases. One is on local server and the other is on a production server. I'm continuously working on the local server and after approval I want to update production server. Wih the current setup, I need to take dump or copy or export of database and then import into production database, every time. Is there any way of synchronization method in phpmyadmin for database on different server.
It is possible to synchronize a model in MySQL Workbench with a live database?
Other then this, how can I do this? I'm able to use queries, the command line and phpmyadmin itself.
Please specified any simple method.
The "synchronisation" feature you are looking for is called replication. A replication can be set up between a master and a slave machine. It does not rely on a constant connection, but stores all changes on the master and replays all those changes on the slave once a connection is established.
My query is to setup database replication (master/slave) process to balance database load using phpmyadmin in xampp. I tried. There is one link in phpmyadmin called replication.
I followed this below link :
http://ahmedzubayr.wordpress.com/2012/04/24/configure-master-slave-replication-mysql-xampp/
While configuring MySQL Slave Configuration, I got an error like slave not configured on master. I cannot find these issue. Can anyone make a suggestion? Thanks in advance.
MySQL must be accessible via network.
If you ran the command /opt/lamp/lamp security when you installed XAMPP, probably MySQL wasn’t accessible via network. You must comment the skip-networking line in /opt/lampp/etc/my.cnf and restart XAMPP.