mysql database replication using phpmyadmin on xampp - mysql

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.

Related

Migrate MySQL from Mamp to Default MySQL Server

I found OSX MySQL only reachable when I using MAMP in port 8889 for some reason, also I can not access them via MySQL CLI also, why? I've tried to add new IP tables and even stop the firewalls, but it still not work, CLI is a bit useless now. We already backup all the databases but don't know what is the safest steps to replace the current MySQl (MAMP) with pure MySQL or MariaDB and it's default server without reinstalling the OSX. Thanks.

databases not visible in mysql workbench sidebar

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.

How to make phpmyadmin to use MySQL server instead of the wampserver64 default one

I have installed both wampserver64 and MySQL server 5.7. The MySQL service from wampserver64 on port 3307 and MySQL server 5.7 on 3306. After trying the androidhive tutorial for connection android app to remote mysql database (which never worked). I noticed that databases created with phpmyadmin doesn´t show up on MySQL server 5.7 and viceversa.
How can i "force" wampserver64´s mysql service to use MySQL server 5.7 that´s on port 3306?
I think changing this line will...
...but my MySQL server 5.7 has no data folder on it (i´ve installed and reinstalled mysql server many times, dont know where is it)
You absolutely should not share the data dir with two MySQL installations that are running at the same time. That can lead to corrupted databases and missing data.
You can configure your phpMyAdmin to talk to both MySQL instances by adding another server in the configuration file, config.inc.php.
If you want to make wampserver use the other MySQL installation completely, the proper way to do so is to edit the configuration files of wampserver to point to the other MySQL server's port or socket rather than to have the two MySQL services share the same datadir.

MySql workbench not responding w local server

I have been using MySql Workbench to connect to a local MySql server and to remote MySql Servers. The last couple of days the Workbench freezes when I connect to the local version. It still works for the remote servers.
I am using workbench 6.3.4 and then tried 6.2.5 just to see if it is a version issue.
I also can access the local MySql instance using HeidiSQL.
Any recommendations on what to look for?
Update
The advice to recreate the connection solved the issue. I just created a new one and it works fine.
A couple of things you can try:
Try restarting the sql server (remember, workbench is just a utility for accessing a db, it does not host the database for you)
See if you can access mysql on the command prompt / terminal, the command for mac & windows
(once you navigate to the mysql folder, try the command:)
mysql -u root
(if you have a password-protected account, the command will be
mysql -u someuser -p
If the above doesn't work, mysql is either offline or denying you access (depending on response), and you'll need to setup the server / assign privileges.
If all else fails, it may help to try another version of SQL / Workbench (for a easy-to-use sql sever setup, I'd recommend WAMP or MAMP, assuming you want a HTTP server bundled with it)
Additionally, it may help to recreate the local connection in workbench (of if your getting regular crashes, reinstall & update workbench). Good luck with it.

How to show different databases MySQL workbench?

I downloaded MySQL, and installed it correctly.
When I started the MySQL workbench it shows me these databases (I don't remember all of them):
sakila
test
world
It is ok, they are work, I can access them with no problems. But later I installed xampp, after that when start MySQL workbench it shows me different databases:
cdcol
phpmyadmin
test
webauth
I can't access the previous databases.
How to switch between them?, or
view them all?
Not sure whether xampp uninstalled your first server, but it is more likely that its installation changed the default MySQL TCP/IP port (3306). Maybe both servers try to run on the same port (which doesn't work) and one failed to start (in this case the first installation).
So what you need is to make each server run on its own port. You can use MySQL Workbench to make the necessary change. However first you need to check if still both servers are installed. Do you have 2 MySQL services running? Switch off one of them and connect with MySQL to the running server. If that works shut this down and run the other service. Connect again with MySQL but this time go to the admin section, config file, and change the port to e.g. 3307. Save and restart the server (all within WB possible). Now you should be able to run both servers at the same time (provided the first one runs still on the default port). Create a second connection and server instance in WB so that you can access one server at 3306 and the other at 3307
If there's only one MySQL service entry then xamp has removed the previous installation and you must install it again if you really need two servers.