Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts

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 =]

Thursday, November 18, 2010

Solution: You don't have permission to access / on this server

Encounter this problem after you set up virtual host in web server?
It is because the folder permission is not set probably.

Here is an example:


<Virtualhost *:80="">
ServerName testhost.com
DocumentRoot "/home/testhost/www"
DirectoryIndex index.php
<Directory "/home/testhost/www">
AllowOverride All
Allow from All
</Directory>


ErrorLog "logs/testhost-error.log"
CustomLog "logs/testhost-access.log" common
</Virtualhost>

Make sure to set permission 755 for each folder in the document root path
/home <- 755
/home/testhost <-- 755
/home/testhost/www <-- 755