Drug preguntas

cPanel: PhpMyAdmin socket error

Cpanel No Comments »

MySQL Socket Error in phpMyAdmin

While accessing phpMyAdmin, you may get the following error.

—————————————————————————————–
#2002 - The server is not responding (or the local MySQL server’s socket is not correctly configured)
—————————————————————————————–

This is due to the missing socket file in the location /tmp.

The socket path which is specified in the phpMyAdmin configuration file is /tmp/mysql.sock.

$ vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
cfg['Server']['socket'] = ‘/tmp/mysql.sock’;

If mysql.sock is missing in /tmp, then create a link to the mysql.sock file in /var/lib/mysql.

$ ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

There is also another fix for this issue.

1. Open the phpMyadmin config file “config.inc.php”.
————————————————————-
vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
————————————————————-

2.Locate the line:
—————————————————
$cfg['Servers'][$i]['host'] = ‘localhost’;
—————————————————

3.Replace ‘localhost’ with ‘127.0.0.1′ and save.
—————————————————
$cfg['Servers'][$i]['host'] = ‘127.0.0.1′;
—————————————————

This will also fix the issue.

Changing time zone in .htaccess

.htaccess No Comments »

You may need to show the time in your website, but the server time zone may not match with your time zone. In this case, you can set your time zone by editing .htaccess file.

Open your .htaccess file and add the rule “SetEnv TZ location”

‘location’ is the specific timezone you want to set.

You can select your time zone from the list.
http://www.php.net/manual/en/timezones.php

Wordpress Themes by Natty WP. Web Hosting
Images by our golf tips desEXign.