Saturday, October 29, 2011

phpMyAdmin Error #2002 - Cannot Log in to the MySQL server.

When you see this error message, you properly do not config your php.ini well and so that it cannot connect to mysql server.

1. Wrong path for the mysql.sock
mysql.sock is the instance of the mysql, so first you have to find where does it place at.
You may find it at "/tmp/mysql.sock" or "/var/mysql/mysql.sock".

Go to your php.ini and make sure the value for "pdo_mysql.default_socket", "mysql.default_socket", "mysqli.default_socket" is the right path.

Then restart your web server and try again. Good Luck =]

Sunday, June 5, 2011

How to add softlink in linux

command: ln -s <target> <the link>

example: ln -s /var/log /home/someone/log

Remarks:

<the link> should not exist, if <the link> exist, then remove it first.