Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed mysql and phpmyadmin via, yum. I get the message

#2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
The server is not responding (or the local server's socket is not correctly configured).

The problem though, is with mysql itself.

# service mysqld start
Redirecting to /bin/systemctl  start mysqld.service
Job failed. See system logs and 'systemctl status' for details.

/var/log/mysql/mysql.log is empty, but I'm unsure where to look next?

Any ideas?

share|improve this question
    
ps -ef | grep syslog? grep log-error /path/to/my.cnf? –  quanta Aug 4 '12 at 14:19
    
@quanta the log file is /var/log/mysql.log from my.cnf but that file doesn't exist? –  Adam Aug 4 '12 at 14:28
    
touch /var/log/mysql.log && chown mysql:mysql /var/log/mysql.log, restart MySQL to see what does it say. –  quanta Aug 4 '12 at 14:39
    
@quanta still empty, sometimes the service mysqld start command hangs –  Adam Aug 4 '12 at 16:07
    
The log file you should look at is /var/log/messages. –  Michael Hampton Aug 4 '12 at 18:04
add comment

2 Answers 2

I remember once I fixed this problem with folowing solution:

try:

yum -enablerepo=remi install mysql-libs mysql.x86_64 mysql-devel.x86_64 mysql-server php-mysql

then:

Mysql -u root -p
share|improve this answer
    
Thanks, but I'm getting Error getting repository data for remi, repository not found –  Adam Aug 4 '12 at 18:31
add comment
up vote 0 down vote accepted

I solved this with help from this site, seemed to do the trick.

## Remi Dependency on Fedora 17, 16
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm 
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

## Fedora 17 ##
rpm -Uvh http://rpms.famillecollet.com/remi-release-17.rpm
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.