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.

In my linux server when perform mysql restart by using the following command

service mysql restart 
restart: Unable to connect to Upstart: 
Failed to connect to socket /com/ubuntu/upstart: Connection refused

How to fix this issue

share|improve this question
    
Are you in a chroot? –  quanta Nov 9 '11 at 5:09
    
No i checked /etc/mysql/my.cnf there its commented out –  LINUX4U Nov 9 '11 at 6:02
1  
What is the output of stat -c %i /? –  quanta Nov 9 '11 at 6:19
    
i am getting this value 19941688 –  LINUX4U Nov 9 '11 at 6:24
add comment

1 Answer

up vote 1 down vote accepted

I'm pretty sure you are in a chroot. Take a look at this for more details.

Upstart acts as a service supervisor. The processes within a chroot are unable to communicate with the Upstart running outside of the chroot. A workaround for this is configure chroots with /sbin/initctl pointing to /bin/true:

# dpkg-divert --local --rename --add /sbin/initctl
# ln -s /bin/true /sbin/initctl

Read more...

share|improve this answer
    
it worked but now i cant login by using mysql username and password through phpmyadmin but i cam login to the mysql server by using the username and password from command line plz help –  LINUX4U Nov 9 '11 at 6:56
    
How did you configure phpMyAdmin? What options do you use from the command line? –  quanta Nov 9 '11 at 7:09
    
mysql -u username -p then i gave the password i was able to do login? i am getting mysql> prompt but when i try servrname/phpmyadmin and when i gave username and password given its showing #2002 Cannot log in to the MySQL server –  LINUX4U Nov 9 '11 at 8:08
    
What does config.inc.php look like? Did you take a look at the Apache's error log? –  quanta Nov 9 '11 at 8:19
1  
Keep in mind that: localhost ~ connect via Unix socket, 127.0.0.1 ~ connect via TCP/IP. –  quanta Nov 9 '11 at 8:31
show 1 more 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.