FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


What happened to the server 2?





takashiro
Code:
Discuz! info: Can not connect to MySQL server

Time: 2007-11-25 1:05pm
Script: /index.php

Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Errno.: 2002

Similar error report has beed dispatched to administrator before.


I go to my website http://inuyasha.frih.net
And it only show this.
frogger
Quote:
A frequent error message received when using the mysql command line utility is: Can't connect to local MySQL server through socket '/tmp/mysql.sock' While this error message can be frustrating, the solution is simple.

When connecting to a MySQL server located on the local system, the mysql client connects thorugh a local file called a socket instead of connecting to the localhost loopback address 127.0.0.1. For the mysql client, the default location of this socket file is /tmp/mysql.sock. However, for a variety of reasons, many MySQL installations place this socket file somewhere else like /var/lib/mysql/mysql.sock.

While it is possible to make this work by specifying the socket file directly in the mysql client command:

Code:
mysql --socket=/var/lib/mysql/mysql.sock ...


it is painful to type this in every time. If you must do so this way (because you don't have permissions to the file in the solution below), you could create an alias in your shell to make this work (like alias mysql="mysql --socket=/var/lib/mysql/mysql.sock" depending on your shell).

To make your life easier, you can make a simple change to the MySQL configuration file /etc/my.cnf that will permanently set the socket file used by the mysql client. After making a backup copy of /etc/my.cnf, open it in your favorite editor. The file is divided into sections such as

Code:
[mysqld]
datadir=/usr/local/mysql/data
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/usr/local/mysql


If there is not currently a section called [client], add one at the bottom of the file and copy the socket= line under the [mysqld] section such as:

Code:
[client]
socket=/var/lib/mysql/mysql.sock


If there is already a [client] section in the my.cnf file, add or edit the socket line as appropriate. You won't need to restart your server or any other processes. Subsequent uses of the mysql client will use the proper socket file.

source:http://www.tech-recipes.com/mysql_tips762.html


Of course this is up to admin to fix..but they shouldnt have any reason to ignore it now, the solution is right there..
P.S i have fixed this problem on a frequent occasion and i know how annoying it can be.

Regards
rvec
thx for the explanation, I'll direct B here. Please quote your sources
-close-
Related topics
questiong about the server
[RESOLVED] What happened!
What happened to frihost?
Data recovery - last chance (Server 1)
strange rectangle around banner on other server
Frihost server status checker
Server 2 weirdness...
server 2 down?
Server 2 Timing Out
Cron jobs (Server 2)
Server 2 down
Here we go again - Server messing up.
show_source disabled on server 2
server 1 : apache is down
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.