MySQL Forums
Forum List  »  Install & Repo

Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Posted by: adil ismail
Date: September 12, 2007 01:01AM

# i hv installed mysql 5 at rhel4
# there is no mysql.sock file exist at my /var/lib/mysql/mysql.sock

# at /etc/my.cnf configurations are
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
#old_passwords=1

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

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

# i checked by this command "rpm -qa | grep -i mysql" it replies
MySQL-client-community-5.0.45-0.rhel4
MySQL-devel-community-5.0.45-0.rhel4
perl-DBD-MySQL-2.9004-3.1
MySQL-server-community-5.0.45-0.rhel4
MySQL-shared-community-5.0.45-0.rhel4
#
#and when checked by this command "rpm -q MySQL-server" it replies
package MySQL-server is not installed
#
#i checked by this command "ps -ef | grep mysql" and it replies
mysql 9220 1 0 Sep07 ? 00:00:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/VC-11127.vopium.com.pid --skip-external-locking
root 21960 21860 0 00:27 pts/0 00:00:00 grep mysql

#when trying to start by "mysql -u root" it replies
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

#when giving command "which mysql" it replies
/usr/local/bin/mysql
#

# at the start when i installed this mysql version i get this msg
rpm -Uvh --nosignature MySQL-server-community-5.0.45-0.rhel4.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-server-community ########################################### [100%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h VC-11127.vopium.com password 'new-password'
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
Starting MySQL../etc/init.d/mysql: line 159: kill: (16680) - No such process
[FAILED]

#
#when trying to start "mysqld_safe &" getting this msg ?
mysqld_safe &
[1] 21964
[root@VC-11127 ~]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
070912 00:36:26 mysqld ended


[1]+ Done mysqld_safe
#
will anybody guide what to do .. how to start mysql or how to completely remove mysql and reinstall it again

Options: ReplyQuote


Subject
Written By
Posted
January 08, 2009 02:01PM
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
September 12, 2007 01:01AM
April 15, 2009 11:56AM
October 21, 2009 06:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.