The post will show to fix mysql problem on xampp. MySQL won’t start in my manager-osx application. It doesn’t throw me an in the application log. This is what it says: Show
Stopping all servers... Steps1) Open terminal and type sudo su and then put in your password 2) Then type ps aux | grep mysql (just copy and paste this) 3) You will need to get the process id of mysql. There should be number near the top, something like 739 or 8827 4) Kill the process using kill -9 {process id} this should look something like this: kill -9 739 5) Restart MySQL in manager-osx If any of the above don’t work, This should work: Find more at www.panayiotisgeorgiou.netXAMPP is a great tool for web developers who need to run or test web applications locally on their own computer. Unfortunately, because it runs applications on the LAMP stack, conflicts can happen, causing certain applications on XAMPP to be unable to run. In this article, we will be exploring what you can do if XAMPP’s MySQL service does not run on a macOS platform. Are you looking at getting
XAMPP MySQL to work on Windows instead? I’ve also wrote a guide for getting XAMPP Apache working on macOS. Do click on these aforementioned links if they are what you need instead. If all of your XAMPP server programs are running except MySQL Database (like the below picture), then you are encouraged to read this article to find possible causes and solutions for your problem. In your XAMPP control panel, you might see the following text, where MySQL database is getting stuck and just cannot start: Stopping all servers... Stopping Apache Web Server... /Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd stopped Stopping ProFTPD... Checking syntax of configuration file /Applications/XAMPP/xamppfiles/proftpd/scripts/ctl.sh : proftpd stopped Restarting all servers... Starting MySQL Database... 2. Possible causes and fixesSo, what might be causing the error described above? a. MySQL server conflictOn your macOS, you might have multiple instances of MySQL servers running. This can be caused by other applications (for e.g. SQL Workbench) running their own instances of MySQL. To fix this issue, you need to stop the other instance of the MySQL server. Here is how to do so:
b. Killing existing MySQL processes using TerminalInstead of using the Activity Monitor, you can also find and close existing mysqld processes using macOS’s Terminal. Note: To run the following commands, you will need to be able to log in as a
root 8006 0.0 0.0 408628336 1648 s000 S+ 11:37AM 0:00.00 grep mysql _mysql 362 0.0 0.0 35192992 3396 ?? Ss Sun10PM 0:21.82 /usr/local/mysql/bin/mysqld --user=_mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/mysqld.local.err --pid-file=/usr/local/mysql/data/mysqld.local.pid --keyring-file-data=/usr/local/mysql/keyring/keyring --early-plugin-load=keyring_file=keyring_file.so
Tip: If you have multiple mysql processes and don’t know which want to stop, you can also stop ALL MySQL processes with If you are unable to restart MySQL after, you can also try this command to directly start XAMPP’s MySQL server: $ sudo /Application/XAMPP/xamppfiles/bin/mysql.server start Article continues after the advertisement: c. Changing MySQL port numberWhen starting XAMPP’s MySQL, if it says that it cannot connect to the port number, then changing it to a new one will help. XAMPP cannot bind to port 3306.To change port number, follow the instructions below. Note: To change port number in the config file, you will need to be able to log in as a
The highlighted portion of the config file below is where you change the port number: my.cnf# Example MySQL config file for medium systems. # # This is for a system with little memory (32M - 64M) where MySQL plays # an important part, or systems up to 128M where MySQL is used together with # other programs (such as a web server) # # You can copy this file to # /etc/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options (in this # installation this directory is /Applications/XAMPP/xamppfiles/var/mysql) or # ~/.my.cnf to set user-specific options. # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the "--help" option. # The following options will be passed to all MySQL clients [client] #password = your_password port =3306 socket =/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock Now, you are good to go. 3. ConclusionAs with the other articles on the blog, we’d love if you leave a comment below, especially if you:
Your comments will add on to the information that is already here, and help other future readers! Post navigationWhy MySQL is not working in XAMPP?The good news is that, if this does happen, there are three methods you can use to troubleshoot the issue: Run XAMPP using administrator privileges. Restore your database backup. Change your MySQL port.
How do I start MySQL in XAMPP?Setup mySql and install some textbook databases on your machine. In phpmyadmin, click the Users tab at the top.. Find the row that has User root and Host 127.0.0.1.. Click Edit Privileges.. Click Change password.. Enter the password twice (write it down somewhere if you're not sure you can remember it). Click the Go button.. Why MySQL service is not starting?Even with correct ownership, MySQL might fail to start up if there is other security software running on your system that manages application access to various parts of the file system. In this case, reconfigure that software to enable mysqld to access the directories it uses during normal operation.
Why MySQL is not starting in XAMPP in Mac?a.
On your macOS, you might have multiple instances of MySQL servers running. This can be caused by other applications (for e.g. SQL Workbench) running their own instances of MySQL. To fix this issue, you need to stop the other instance of the MySQL server.
Why Apache XAMPP Cannot start?This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. Check the "/xampp/apache/logs/error. log" file and the Windows Event Viewer for more clues.
How do I fix MySQL not working?How to fix common problems with MySQL databases. Check that the service is running. If your website cannot connect to your database, it is possible the service is simply not listening. ... . Check the configuration. ... . Check the error logs. ... . Ask for help.. |