Mysql fails to start
MySQL won't restart on older server with CentOS v7.9.2009, cPanel Version 110.0.70, MySQL 5.7. Anyone know how to fix this?
Error message from restart in WHM
Waiting for “mysql” to start ………Unrecognized configuration options may have caused the MySQL startup errors. The system has attempted to auto-update your MySQL configuration file for your MySQL version. This should resolve any errors that stem from an outdated MySQL configuration file. …Unrecognized configuration options may have caused the MySQL startup errors. The system has attempted to auto-update your MySQL configuration file for your MySQL version. This should resolve any errors that stem from an outdated MySQL configuration file. …failed.
Cpanel::Exception::Services::StartError Service Status
undefined status from Cpanel::ServiceManager::Services::Mysql
Service Error
(XID x69nnr) The “mysql” service failed to start.
Startup Log
Sep 03 16:42:20 qhbm001.qhbm.local systemd[1]: Failed to start MySQL Server.
Sep 03 16:42:20 qhbm001.qhbm.local systemd[1]: Unit mysqld.service entered failed state.
Sep 03 16:42:20 qhbm001.qhbm.local systemd[1]: mysqld.service failed.
Log Messages
Sep 3 16:42:18 qhbm001 mysqld: Initialization of mysqld failed: 0
2025-09-03T14:42:19.986256Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
2025-09-03T14:42:16.464712Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
mysql has failed. Contact your system administrator if the service does not automagically recover.
mysqld.log
2025-09-03T14:56:46.610755Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2025-09-03T14:56:46.610890Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2025-09-03T14:56:46.750354Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2025-09-03T14:56:46.751711Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2025-09-03T14:56:46.751729Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2025-09-03T14:56:46.752199Z 0 [Note] InnoDB: Waiting for purge to start
2025-09-03T14:56:46.802374Z 0 [Note] InnoDB: 5.7.44 started; log sequence number 31593509237
2025-09-03T14:56:46.802384Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4647ms. The settings might not be optimal. (flushed=0 and evicted=0, during the time.)
2025-09-03T14:56:46.802936Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2025-09-03T14:56:46.803190Z 0 [Note] Plugin 'FEDERATED' is disabled.
2025-09-03T14:56:46.805406Z 0 [Note] InnoDB: Buffer pool(s) load completed at 250903 16:56:46
2025-09-03T14:56:46.806116Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2025-09-03T14:56:46.806134Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2025-09-03T14:56:46.806157Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2025-09-03T14:56:46.806165Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2025-09-03T14:56:46.813674Z 0 [Warning] CA certificate ca.pem is self signed.
2025-09-03T14:56:46.813749Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2025-09-03T14:56:46.815542Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2025-09-03T14:56:46.815656Z 0 [Note] IPv6 is available.
2025-09-03T14:56:46.815677Z 0 [Note] - '::' resolves to '::';
2025-09-03T14:56:46.815685Z 0 [Note] Server socket created on IP: '::'.
2025-09-03T14:56:46.815744Z 0 [ERROR] Unix socket lock file is empty /var/lib/mysql/mysql.sock.lock.
2025-09-03T14:56:46.815753Z 0 [ERROR] Unable to setup unix socket lock file.
2025-09-03T14:56:46.815759Z 0 [ERROR] Aborting
2025-09-03T14:56:46.815790Z 0 [Note] Binlog end
2025-09-03T14:56:46.815852Z 0 [Note] Shutting down plugin 'ngram'
2025-09-03T14:56:46.815863Z 0 [Note] Shutting down plugin 'partition'
2025-09-03T14:56:46.815868Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2025-09-03T14:56:46.815886Z 0 [Note] Shutting down plugin 'ARCHIVE'
2025-09-03T14:56:46.815891Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2025-09-03T14:56:46.815974Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2025-09-03T14:56:46.815982Z 0 [Note] Shutting down plugin 'MyISAM'
2025-09-03T14:56:46.815997Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2025-09-03T14:56:46.816002Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2025-09-03T14:56:46.816008Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2025-09-03T14:56:46.816013Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2025-09-03T14:56:46.816018Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2025-09-03T14:56:46.816023Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2025-09-03T14:56:46.816028Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2025-09-03T14:56:46.816033Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2025-09-03T14:56:46.816037Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2025-09-03T14:56:46.816042Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2025-09-03T14:56:46.816047Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2025-09-03T14:56:46.816052Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2025-09-03T14:56:46.816057Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2025-09-03T14:56:46.816062Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2025-09-03T14:56:46.816067Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2025-09-03T14:56:46.816071Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2025-09-03T14:56:46.816076Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2025-09-03T14:56:46.816081Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2025-09-03T14:56:46.816086Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2025-09-03T14:56:46.816091Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2025-09-03T14:56:46.816096Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2025-09-03T14:56:46.816101Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2025-09-03T14:56:46.816106Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2025-09-03T14:56:46.816110Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2025-09-03T14:56:46.816115Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2025-09-03T14:56:46.816120Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2025-09-03T14:56:46.816125Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2025-09-03T14:56:46.816130Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2025-09-03T14:56:46.816134Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2025-09-03T14:56:46.816139Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2025-09-03T14:56:46.816144Z 0 [Note] Shutting down plugin 'InnoDB'
2025-09-03T14:56:46.816461Z 0 [Note] InnoDB: FTS optimize thread exiting.
2025-09-03T14:56:46.816898Z 0 [Note] InnoDB: Starting shutdown...
2025-09-03T14:56:46.917145Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2025-09-03T14:56:46.917394Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 250903 16:56:46
2025-09-03T14:56:48.804933Z 0 [Note] InnoDB: Shutdown completed; log sequence number 31593509256
2025-09-03T14:56:48.808232Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2025-09-03T14:56:48.808253Z 0 [Note] Shutting down plugin 'MEMORY'
2025-09-03T14:56:48.808264Z 0 [Note] Shutting down plugin 'CSV'
2025-09-03T14:56:48.808271Z 0 [Note] Shutting down plugin 'sha256_password'
2025-09-03T14:56:48.808276Z 0 [Note] Shutting down plugin 'mysql_native_password'
2025-09-03T14:56:48.808434Z 0 [Note] Shutting down plugin 'binlog'
2025-09-03T14:56:48.808875Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
Content of /etc/my.cnf
[mysqld]
sql_mode=""
performance-schema=0
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
performance-schema=0
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
performance-schema=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
default-storage-engine=MyISAM
innodb_file_per_table=1
max_allowed_packet=268435456
open_files_limit=40000
-
Hey there! The main issue here seems to be the creation of the MySQL socket file in /var/lib. Can you share the output of these commands?
ls -lah /var/lib/mysql/mysql.*
ls -ld /var/lib/mysql/
ls -ld /var/lib/0 -
ls -lah /var/lib/mysql/mysql.*
srwxrwxrwx 1 mysql mysql 0 Aug 27 03:59 /var/lib/mysql/mysql.sock
-rw------- 1 mysql mysql 0 Aug 28 03:54 /var/lib/mysql/mysql.sock.lockls -ld /var/lib/mysql/
drwxr-x--x 203 mysql mysql 12288 Sep 3 21:53 /var/lib/mysql/
ls -ld /var/lib/
drwxr-xr-x. 42 root root 4096 Sep 3 03:52 /var/lib/0 -
Thanks for sharing that - that all *looks* fine to me - can you try running this one as well to see if that works properly?
touch /var/lib/mysql/testfile
0 -
result
[root@qhbm001 ~]# touch /var/lib/mysql/testfile
[root@qhbm001 ~]#
I then went to /var/lib/mysql/ and it contains testfile
-rw-r--r-- 1 root root 0 Sep 3 22:08 testfile0 -
I'm not sure why it's complaining about that sock file from that output then. It would likely be best to create a ticket so this can be investigated directly on the server.
0 -
ok thanks cPRex, seems I have a Partner Supported License and should contact my host
0 -
They should be able to get it going for you!
0 -
Looks like MySQL is failing because of a bad socket lock file—try deleting /var/lib/mysql/mysql.sock.lock and restarting the service.
1
Please sign in to leave a comment.
Comments
9 comments