-4

I tried everything and I am still unable to start the MySQL service. The error is as below:

[root@localhost ~]# service mysql.server start Starting MySQL..... 
ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
[root@localhost ~]# service mysql start Starting MySQL....
ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

Things I tried:

Removing the .err file and restarting, no use. Creating a .sock file and a .pid file as the above error mentions, still no use. Almost tried all the steps in most of the forums, still nothing.

I tried all the config files, nothing seems to resolve my issue.

halfer
  • 19,824
  • 17
  • 99
  • 186
Randy Orton
  • 11
  • 1
  • 3

1 Answers1

1

Try the next steps:

First remove MySQL:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

Then reinstall:

sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_install_db
sudo /usr/bin/mysql_secure_installation

After these steps mysql process should be up and running. Anyway, if this is not happening ( you can verify by typing sudo service mysql status ) just try:

sudo service mysql start or sudo /etc/init.d/mysql start

I strongly reccommend to post your log files (/var/log/syslog) for mysql if you get any problems, so that we can advice you properly.

If you're still getting the same error, please check for svs answer from this SO question

Community
  • 1
  • 1
Cajuu'
  • 1,154
  • 2
  • 19
  • 50
  • 1
    Hello Alexander, Thank you for the prompt response, I did try to remove it completely and I am not going to lie it failed. But I am new to this so could you give me a different command to uninstall Mysql completely from my CentOS server.. I think i managed to del only the previous version and not the components or stuff like configurations ,etc. Basically i am trying to tell you that I do not have apt-get functionality , so could i completely remove Mysql using a different command. – Randy Orton Aug 19 '15 at 08:59
  • And yes for your log : [root@localhost log]# tail -200f mysqld.log 150817 11:30:52 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 150817 11:30:52 [Note] /usr/sbin/mysqld (mysqld 5.5.45) starting as process 32097 ... 150817 11:30:52 [Note] Plugin 'FEDERATED' is disabled. 150817 11:30:52 InnoDB: The InnoDB memory heap is disabled 150817 11:30:52 InnoDB: Mutexes and rw_locks use GCC atomic builtins 150817 11:30:52 InnoDB: Compressed tables use zlib 1.2.3 – Randy Orton Aug 19 '15 at 09:08
  • 150817 11:30:52 InnoDB: Using Linux native AIO 150817 11:30:52 InnoDB: Initializing buffer pool, size = 128.0M 150817 11:30:52 InnoDB: Completed initialization of buffer pool InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes InnoDB: than specified in the .cnf file 0 5242880 bytes! 150817 11:30:52 [ERROR] Plugin 'InnoDB' init function returned error. 150817 11:30:52 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 150817 11:30:52 [ERROR] Unknown/unsupported storage engine: InnoDB 150817 11:30:52 [ERROR] Aborting – Randy Orton Aug 19 '15 at 09:10
  • 150817 11:30:52 [Note] /usr/sbin/mysqld: Shutdown complete – Randy Orton Aug 19 '15 at 09:10