LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   MySQL Error?? (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-error-686783/)

your_shadow03 11-28-2008 12:20 AM

MySQL Error??
 
Code:

[root@askme RPM]# rpm -ivh  mysql-server-4.1.20-2.RHEL4.1.i386.rpm
Preparing...                ########################################### [100%]
  1:mysql-server          ########################################### [100%]
[root@askme RPM]# rpm -ivh  mysql-4.1.20-2.RHEL4.1.i386.rpm
Preparing...                ########################################### [100%]
  1:mysql                  ########################################### [100%]
[root@askme RPM]# rpm -ivh  mysql-bench-4.1.20-2.RHEL4.1.i386.rpm
Preparing...                ########################################### [100%]
  1:mysql-bench            ########################################### [100%]
[root@askme RPM]# rpm -ivh  mod_auth_mysql-2.6.1-2.2.i386.rpm
Preparing...                ########################################### [100%]
  1:mod_auth_mysql        ########################################### [100%]
[root@askme RPM]# rpm -ivh mysql-devel-4.1.20-2.RHEL4.1.i386.rpm
Preparing...                ########################################### [100%]
  1:mysql-devel            ########################################### [100%]
[root@askme RPM]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@askme RPM]# mysqladmin -uroot password 'mysql123'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@askme RPM]# cd
[root@askme ~]# service mysqld restart
Stopping MySQL:

Why I am not able to run mysql?Whats that error all about?

linuxlover.chaitanya 11-28-2008 12:24 AM

Is mysql service running?

your_shadow03 11-28-2008 01:19 AM

Code:

[root@askme ~]# service mysqld restart
Stopping MySQL:                                            [FAILED]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:                                            [FAILED]


j-ray 11-28-2008 06:14 AM

take a look at mysql error log and post recent content

salter 11-28-2008 10:20 AM

This has to do with the location of your /var/lib/mysql/mysql.sock or the permission of that file and it's directory. I once had a similar problem after mixing/replacing source-built MySQL installations with RPM package based installation. My permission for /var/lib/mysql did not allow access, as such the mysql.sock file was not available.

The cause for your problem could be something else, but it's worth checking those permissions.

j-ray 11-28-2008 11:12 AM

salters is probably right. Take a look who's the owner of /var/lib/mysql by
ls -l /var/lib
If it's not owned by mysql then a chown mysql may do


All times are GMT -5. The time now is 05:52 AM.