Cannot Start MySQL

Hello All,

I am trying to start mysql by running the following command -


systemctl start mysql
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service and "journalctk -xe" for details.

The command fails and the follow output is generated in the /var/log/mysql/mysqld.log


2018-10-05 16:07:52 139648559725568 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
2018-10-05 16:07:52 139648559725568 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-10-05 16:07:52 139648559725568 [Note] InnoDB: Uses event mutexes
2018-10-05 16:07:52 139648559725568 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-10-05 16:07:52 139648559725568 [Note] InnoDB: Using Linux native AIO
2018-10-05 16:07:52 139648559725568 [Note] InnoDB: Number of pools: 1
2018-10-05 16:07:52 139648559725568 [Note] InnoDB: Using SSE2 crc32 instructions
2018-10-05 16:07:52 139648559725568 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
2018-10-05 16:07:52 139648559725568 [Note] InnoDB: Completed initialization of buffer pool
2018-10-05 16:07:52 139647613601536 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-10-05 16:07:52 139648559725568 [Note] InnoDB: Highest supported file format is Barracuda.
2018-10-05 16:07:53 139648559725568 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-10-05 16:07:53 139648559725568 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-10-05 16:07:53 139648559725568 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-10-05 16:07:53 139648559725568 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-10-05 16:07:53 139648559725568 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-10-05 16:07:53 139648559725568 [Note] InnoDB: Waiting for purge to start
2018-10-05 16:07:53 139648559725568 [Note] InnoDB: 5.7.23 started; log sequence number 1603484
2018-10-05 16:07:53 139647455827712 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-10-05 16:07:53 139647455827712 [Note] InnoDB: Buffer pool(s) load completed at 181005 16:07:53
2018-10-05 16:07:53 139648559725568 [Note] Plugin 'FEEDBACK' is disabled.
2018-10-05 16:07:53 139648559725568 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2018-10-05 16:07:53 139648559725568 [Note] Recovering after a crash using tc.log
2018-10-05 16:07:53 139648559725568 [Note] Starting crash recovery...
2018-10-05 16:07:53 139648559725568 [Note] Crash recovery finished.
2018-10-05 16:07:53 139648559725568 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
2018-10-05 16:07:53 139648559725568 [Note] Server socket created on IP: '127.0.0.1'.
2018-10-05 16:07:53 139648559725568 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

Does anyone know the cause of this? This is a clean installation.

Thanks,
Benjamin

What does the ownership look like?

ls -l /var/lib/mysql

Try this…

systemctl stop mysql
mysql_install_db
systemctl start mysql

Try adding a “d” signifying daemon to the end of “mysql”

ie

systemctl start mysqld

And,
Then don’t forget to configure your mysql security, the following describes how to create a script that executes the script with answers but you can also just run the script in a console

https://en.opensuse.org/User:Tsu2/MySQL_and_Mariadb

TSU

Not correct, my error.
There is a mysql service and in the case of mariadb, a mariadb service.
But, not a mysqld service, only a maysqld process.

TSU

Thank you all for your replies.

I am sorry for the delay in responding. I was able to resolve the issue by reinstalling Mariadb. It’s possible that I may have messed with the my.cnf file and that was preventing the program from starting.

Thanks again!