Scenario
I've been trying to set up mysql database replication on my xampp server but its not been working. I get the following error
and the error logs display the following message.
2017-12-28 10:14:37 10384 [ERROR] Slave I/O: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). Internal MariaDB error code: 1593
2017-12-28 10:14:37 10384 [Note] Slave I/O thread exiting, read up to log 'FIRST', position 4
I understand what the error is saying but im not sure how to fix it, i've look online and around at various solutions and followed some of what theyve said. (Couldn't follow all some people are using linux or mysql in the command line so i couldnt follow but i tried an alternative).
I've been following this error since im trying to set this all up on xampp:
https://www.youtube.com/watch?v=nfsmnx24gxU
But its pretty outdated. Since i'm using xampp on windows there doesn't seem to be much up-to-date tutorials for this, they all show how to do it through linux terminal but obviously to me this isnt useful.
I'm also not sure how two separate servers are running on xampp in this scenario. Even if i visit "127.0.0.123" and "127.0.0.222" at the top of PhpMyAdmin it still shows that the current database is hosted on "127.0.0.1" so in this sense the replication process is slightly confusing me. Whats even more confusing is that it works flawlessly in the tutorial that i linked earlier.
I'm using the most up-to-date version of xampp, 28-12-2017.
Question
Does anyone know, on the current version of xampp, how to get past this error OR know of a tutorial that would help me set up replication on xampp on a windows computer.
Related
Switching on my system this morning, MySQL immediately stops once started in XAMPP, windows 10. Last thing I did was install Windows Powertoys, not sure if it's the cause but it's the last change.
I found the subject-quoted error in Windows event viewer log but following Google searches for resolutions I see to run myisamchk: this gives me the error proxies_priv.mai is not a myisam table.
How can I get things back to normal?
Facing the same problem here.
You are getting the error proxies_priv.mai is not a myisam table because you typed the file name wrong. It's proxies_priv.MYI, not proxies_priv.mai.
Nevertheless, trying to fix it by ./myisamchk.exe -r ../data/mysql/proxies_priv.MYI seems not working for me. I got proxies_priv doesn't have a correct index definition. and don't know what to do next.
Finally I deleted all the file in mysql data folders containing proxies_priv and at least got mysql running.
According to apachefriends post
Everything seems to work. I'm not entirely sure what those tables are used for, since I never used any proxy with my local mysql server.
I have a mysql server running on an EC2 server lamp stack. It was running just fine, but the server ran out of memory and failed. I tried restarting mysqld but kept getting this error:
mysqld dead but subsys locked
So I created a swap file and now I am able to start mysqld, however, I cannot log in with the root user and password. I have searched the web, but couldn't find anything that was similar to my situation. Any Ideas?
I was able to fix the problem by following the instructions here: http://www.howtoforge.com/reset-forgotten-mysql-root-password
I've desperately tried to figure out what's happened here, but haven't seen this particular problem anywhere. I've 'inherited' (as in, not built any of it myself) management of a database server (remote, in a data warehouse, accessed by ssh) where some php daemons are running on a Linux server acting as data crawlers, inserting and processing information in a relatively steady stream into mysql.
A couple of days ago, the server crashed and came back on again. I logged in an restarted the mysql server and the crawlers, thinking no more of it. A day and a half later, the mysql server stopped working, and I couldn't diagnose it since I couldn't log into it, nor did it respond to "/etc/init.d/mysql stop" or varieties thereof. According to the log file, it kept throwing errors very regularly (once every four minutes and 16 seconds) and said that it had too many file handlers open. When I shut down the crawlers, however, I could log in again, but mysql kept throwing the errors. I checked lsof and it showed a lot of open sockets with "can't identify protocol" error.
mysqld 28843 mysql 1990u sock 0,4 2856488 can't identify protocol
mysqld 28843 mysql 1989u sock 0,4 2857220 can't identify protocol
^Thousands of these rows
I thought it was something the crawlers had done, and I restarted mysql and the failed sockets disappeared. But I was surprised to see that mysql kept opening new ones, even when the crawlers weren't running. It did this very regularly, about two new failed sockets a minute, regardless of whether the crawlers were active or not. I increased the maximum amount of filehandlers allowed for mysql to buy some time, but I'm obviously looking for a diagnosis and permanent solution.
All descriptions of such errors (socket leaks) that I've found on forums seems to be about your own software leaking, not closing its sockets. But this seems to be mysql itself that does it, and there has been no change in any of the code from when it worked fine, just a server crash and restart.
Any ideas?
I use XAMPP 1.7.3
If I try to open phpMyAdmin it will try to open but eventually I'll have only a blank page, no errors.
If I try to connect with Navicat, the same thing, it will not be able to establish a connection.
And usually this process takes between 30% and 60% of the processor for more than 20 min.
If I stop and then start again the mysql server from XAMPP Control Panel the message is 'Mysql server started'.
But If I go to http://localhost/xampp/ and then 'Status' everything is 'Activated' EXCEPT ' MySQL database', 'SMTP Service', 'FTP Service' which are 'Deactivated'.
I think I crashed the Mysql server after I tried to make a database backup BUT the laptop closed before the backup was finished (the battery was discharged).
How can I repair the connection to the Mysql server?
First, make sure to double check the obvious, most likely these are not the issues since it happened after you closed your laptop, but it doesn't hurt to double check:
Make sure the MySQL service is running...
Also make sure that a firewall is not blocking port 3306...
This guide covers both MyISAM and InnoDB: http://www.softwareprojects.com/resources/programming/t-how-to-fix-mysql-database-myisam-innodb-1634.html
Now, assuming that the tables are MyISAM, you can repair them by following this guide:
http://colekcolek.com/2011/11/02/repair-corrupted-mysql-myisam-table/
Here is a way to do it for InnoDB: http://code.google.com/p/innodb-tools/
have some problems with server which run 5 years stable.
there is a vbulletin 3 forum running on the server.
i get crashed tables and MySQL server has gone away errors. not sure if lost connection can cause crashed tables or there is another reason for it.
there is no my.cnf file, so must be default mysql config, no big load. sometimes if i click a link i immediately get a white page, after reload page works fine - in log there is then a MySQL server has gone away error.
No a lost connection can not do that. But if MySQL crashes then you can get server has gone away, and the crash can corrupt the table.
You need to find out why MySQL is crashing. Worst case scenario is a bad hard disk - I hope you have good backups. If not do it NOW!