Ubuntu: MySQL server start failed (6 Solutions!!)

Ubuntu: MySQL server start failed (6 Solutions!!)

Ubuntu: MySQL server start failed

Question: I am running ubuntu server. When I tried to login to mysql(which was running),I
got the following error
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket
‘/var/run/mysqld/mysqld.sock’ (2)
But mysqld.sock file doesn’t exist inside /var/run/mysqld folder. On executing
ps aux | grep mysql command,I realized that mysql server was not running.
I then tried to restart mysql server using
service mysql start
service mysql restart
/etc/init.d/mysql start
But,the start process failed in all 3 cases. /var/log/mysql/mysql.log and /var/
log/mysql/mysql.err files are empty.
But /var/log/error.log shows following information:
140425 12:49:05 [Warning] Using unique option prefix myisam-recover instead of
myisam-recover-options is deprecated and will be removed in a future release.
Please use the full name instead.
140425 12:49:05 [Note] Plugin ‘FEDERATED’ is disabled.
140425 12:49:05 InnoDB: The InnoDB memory heap is disabled
140425 12:49:05 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140425 12:49:05 InnoDB: Compressed tables use zlib 1.2.8
140425 12:49:05 InnoDB: Using Linux native AIO
140425 12:49:05 InnoDB: Initializing buffer pool, size = 3.0G
140425 12:49:05 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 26214400 bytes!
140425 12:49:05 [ERROR] Plugin ‘InnoDB’ init function returned error.
140425 12:49:05 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE
140425 12:49:05 [ERROR] /usr/sbin/mysqld: unknown variable ‘record_buffer=64M’
140425 12:49:05 [ERROR] Aborting

140425 12:49:05 [Note] /usr/sbin/mysqld: Shutdown complete

Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):

== This solution helped 1 person ==
Increasing the available RAM by adding new Swap space might also help. Steps
Make sure that you create /swapfile of the size smaller than the available
space shown by
df -h
For example for me output of df- h was:
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.8G 1.2G 6.3G 16% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 492M 12K 492M 1% /dev
tmpfs 100M 336K 99M 1% /run
So I created using 2 G
sudo fallocate -l 2G /swapfile
And then just start the service
sudo /etc/init.d/mysql restart
Hope this helps. All the best.

== This solution helped 1 person ==
My solution:
Check if in all /etc/rc1.d … /etc/rc5.d the mysql script starts with S (Ex
S10mysql) and not K AS K10mysql.
Explanation: K prefix loads with stop, kind of kill service; and S prefix
starts with start parameter.
execute in terminal:
(command script action runlevel)
sudo update-rc.d mysql enable 2
sudo update-rc.d mysql enable 3
sudo update-rc.d mysql enable 4
sudo update-rc.d mysql enable 5

== This solution helped 23 people ==
Open a terminal(Ctrl+Alt+t) and do the following:
sudo service mysql stop
sudo rm /var/lib/mysql/ib_logfile0
sudo rm /var/lib/mysql/ib_logfile1
and comment out the line record_buffer=64M in /etc/mysql/my.cnf https://
and then restart msyql using:
sudo service mysql restart

== This solution helped 2 people ==
I had the same error message and the same emptyness in the log files. In my
config-file (my.cnf) I had specified that I wanted to use myisam tables, by
adding this line in the [mysqld]-section:
default-table-type = myisam
After upgrading mysql it seems this causes mysql not to start. I have changed
this to:
default-storage-engine = myisam
and now everything works fine.

With thanks & praise to God! With thanks to all the many who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music & music license: | Images & images license: and others | With thanks to user Vivek ( user user520064 ( user Sudheesh.M.S ( user Sergio Abreu ( user Lars Olav Tveito ( user jobin ( user girardengo ( user ananth ( and the Stack Exchange Network ( Trademarks are property of their respective owners. Disclaimer: All information is provided “AS IS” without warranty of any kind. You are responsible for your own actions. Please contact me if anything should be amiss at Roel D.OT VandePaar A.T gmail.com.

Nguồn: https://kythuatmarketingonline.com/

Xem thêm bài viết: https://kythuatmarketingonline.com/category/cong-nghe

Leave a Reply

Your email address will not be published. Required fields are marked *