Thursday, June 02, 2005

MySQL Problem Solved

Finally MySQL is running well on my new Slackware. I missed the permission on the database directory (mysql). After a little chmod and chown, MySQL works perfectly. New problem arises when i want to access MySQL via web browser. I'm installing phpMyAdmin, a web-based application to manage the MySQL and when i loaded the index.php page, it displays an error message saying that MySQL Socket is not configured or something like that.

The main problem is the location of mysql.sock file in PHP configuration is different with the actual location. In PHP, it should be located on /tmp/mysql.sock, but in reality, it is located on /var/run/mysql.sock. The solution is to recompile PHP with another options '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysql.sock'. After compiling, configuring, and installing PHP, restart Apache and reload your browser. It will display the correct page.

No comments:

Post a Comment