![]() ![]() Now I can access my mysql server with the mysql command line tool and my local WordPress installation can also talk to the database. This will reset the ports for Apache, Nginx, and MySQL to 8888, 7888, and 8889. In case the icon is grayed out, check if the mysql and webserver services are running. If you’re a Pro user, you can click on the Set default MAMP Ports button. Open the MySQL Tab on the left side and click on the PhpMyAdmin icon. This creates a symbolic link from the location expected by mysql and wordpress to the location where the socket file resides. If MAMP is already using an alternative port, you can try restoring the default settings by selecting MAMP default. Sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock With this information the solution is easy: In the Finder, change to the directory /Library/Application Support/appsolute/MAMP PRO. ![]() Running ps -awwx | grep mysql showed, that mysqld had been started by MAMP with the option -socket=/Applications/MAMP/tmp/mysql/mysql.sock, whereas the mysql tool and WordPress assume the socket file here: /tmp/mysql.sock. My phpMyAdmin does not work Stop your servers and quit MAMP PRO. Doing some Google research told me that the problem was connected with the location of mysql.sock. Futhermore phpMyAdmin, as provided by MAMP, worked flawlessly. In these cases, checking the PHP error logs for your installation will often reveal the file that’s causing the issue, as well as the specific problem with the code. This is often the result of misconfigured files or incorrect code. phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. This was strange as the mysql server was indeed running I could verify this by an ps command. Another possible source specific to errors on MAMP comes into play when your site encounters a PHP fatal error. Macbook:~ sf$ /Applications/MAMP/Library/bin/mysql -u root -pĮRROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) So I tried to talk to the mysql server with the mysql command line tool and got this error message: I got a database connection error very early during the WordPress installation process. Everything worked out-of-the box as it should – until I tried to install WordPress on my MacBook. ![]() MAMP is for Mac what XAMPP is for windows: A very easy-to-use, but Mac-like web development solution. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |