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 problems after updating ubuntu from 11.10 to 12.04 with mysql - before upgrade everything worked fine after upgrade - mysql cannot start mysql server properly. Any ideas? This is my error message:

SQL Error: Can't connect to MySQL server on '127.0.0.1' (111)

Also where can I enable errors from mysql? I did not find it anywhere. Thank you all.

When I do:

ps -ef |grep mysql

It shows me this:

root      6849  5758  0 00:44 pts/4    00:00:00 grep --color=auto mysql
share|improve this question
1  
tail -f /var/log/syslog then try to start mysql. That should give you the reason. –  Mike Jun 3 '12 at 23:04
    
paste2.org/p/2044417 more info –  Byakugan Jun 3 '12 at 23:17

3 Answers 3

up vote 3 down vote accepted

It simply looks like your server isn't running and you are trying to connect to the server before starting it first. It might be that your init scripts are somehow messed up. What command are you using to start the server manually, if you have tried this at all?

  1. Try service mysql start from a root terminal
  2. The error log is at /var/log/mysql/error.log. cat it and see if you find anything useful.
share|improve this answer
    
Here are my errors with commands I used paste2.org/p/2044417 –  Byakugan Jun 3 '12 at 23:18
    
In your my.cnf file, try commenting out default-storage-engine=innodb and see if you can get your server to start. –  jeshurun Jun 3 '12 at 23:25
    
It helped it seems but now I am having problem with this error: error while loading shared libraries: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory - when starting app using mysql ... –  Byakugan Jun 3 '12 at 23:55
    
ls /usr/lib/libmysqlclient* -al. They probably renamed this file, find out what the new name is and create an appropriate symlink. Once you get your server up, I would recommend backing up your data (if you haven't already), then do a clean install of mysql. –  jeshurun Jun 4 '12 at 0:01
    
I have find it is in folder /usr/lib/x86_64-linux-gnu/ as file libmysqlclient.so.18 so what should i do exactly? :) –  Byakugan Jun 4 '12 at 0:09

SUGGESTIONS:

1) Make sure you can start mysql manually:

sudo /etc/rc.d/mysqld start

2) "chkconfig" is one tool you can use to make sure mysqld starts automatically:

http://www.techenclave.com/open-source-linux/ubuntu-server-mysql-does-not-110400/

3) IIRC, the logs should be in /var/log/messages (general) and /var/log/mysql/*.log

4) And yeah, serverfault would probably have been a better place to post this question. As well as Linuxquestions.org

share|improve this answer
    
Here are my errors with commands I used paste2.org/p/2044417 –  Byakugan Jun 3 '12 at 23:19

You have to start mysql on your server.

There should be a startup script in /etc/init.d that you need to run.

You also should have been prompted to enter a root password.

Here are some more hints from the Ubuntu website:

https://help.ubuntu.com/12.04/serverguide/mysql.html

share|improve this answer
    
I know hot to start and setup mysql server - if you read well i mentoned that it was working excellent before upgrade now it says these errors: paste2.org/p/2044417 –  Byakugan Jun 3 '12 at 23:12

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.