Mysql – Cant initialize MySQL. “thesqld_safe thesqld from pid file /var/run/mariadb/mariadb.pid ended”

mariadbMySQLmysqldmysqld-safe

I am doing a fresh install of MySQL on Fedora 22.
After I run mysql_install_db I try to start the daemon using mysqld_safe but it does not work. The system says:

mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended

How do I get this to work?

Here are the mariadb.log contents:

mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
[Note] /usr/libexec/mysqld (mysqld 10.0.23-MariaDB) starting as process 20443 ...
[Note] InnoDB: Using mutexes to ref count buffer pool pages
[Note] InnoDB: The InnoDB memory heap is disabled
[Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
[Note] InnoDB: Memory barrier is not used
[Note] InnoDB: Compressed tables use zlib 1.2.8
[Note] InnoDB: Using Linux native AIO
[Note] InnoDB: Using CPU crc32 instructions
[Note] InnoDB: Initializing buffer pool, size = 128.0M
[Note] InnoDB: Completed initialization of buffer pool
[ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
[ERROR] InnoDB: The system tablespace must be writable!
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
[ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
[ERROR] Plugin 'Aria' init function returned error.
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
[Note] /usr/libexec/mysqld: Shutdown complete
mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended

Best Answer

The error says:

The system tablespace must be writable

Please check the permission of the data directory of MySQL