在CentOS7中mysql被 MariaDB所代替,幸得@贵在坚持 提点,顺利下载 MariaDB等相关软件但是安装完毕后,mariadb还是无法正常启动:
[root@localhost ~]# service mariadb start
Redirecting to /bin/systemctl start mariadb.service
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.
按照信息提示1:
[root@localhost ~]# systemctl status mariadb.service
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled)
Active: failed (Result: exit-code) since 二 2015-01-13 14:35:10 CST; 43s ago
Process: 23805 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=1/FAILURE)
Main PID: 13627 (code=exited, status=0/SUCCESS)
1月 13 14:35:10 localhost.localdomain mariadb-prepare-db-dir[23805]: https://mariadb.com/kb/en/installing-s...db
1月 13 14:35:10 localhost.localdomain mariadb-prepare-db-dir[23805]: MariaDB is hosted on launchpad; You ca...nd
1月 13 14:35:10 localhost.localdomain mariadb-prepare-db-dir[23805]: email lists at http://launchpad.net/maria
1月 13 14:35:10 localhost.localdomain mariadb-prepare-db-dir[23805]: Please check all of the above before s...rt
1月 13 14:35:10 localhost.localdomain mariadb-prepare-db-dir[23805]: at http://mariadb.org/jira
1月 13 14:35:10 localhost.localdomain mariadb-prepare-db-dir[23805]: Initialization of MySQL database failed.
1月 13 14:35:10 localhost.localdomain mariadb-prepare-db-dir[23805]: Perhaps /etc/my.cnf is misconfigured.
1月 13 14:35:10 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
1月 13 14:35:10 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
1月 13 14:35:10 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
按照信息提示2:
[root@localhost ~]# journalctl -xn
-- Logs begin at 五 2015-01-09 21:21:16 CST, end at 二 2015-01-13 14:37:18 CST. --
1月 13 14:37:18 localhost.localdomain mariadb-prepare-db-dir[23931]: https://mariadb.com/kb/en/instal ... es-mysql_install_db
1月 13 14:37:18 localhost.localdomain mariadb-prepare-db-dir[23931]: MariaDB is hosted on launchpad; You can find the latest source and
1月 13 14:37:18 localhost.localdomain mariadb-prepare-db-dir[23931]: email lists at http://launchpad.net/maria
1月 13 14:37:18 localhost.localdomain mariadb-prepare-db-dir[23931]: Please check all of the above before submitting a bug report
1月 13 14:37:18 localhost.localdomain mariadb-prepare-db-dir[23931]: at http://mariadb.org/jira
1月 13 14:37:18 localhost.localdomain mariadb-prepare-db-dir[23931]: Initialization of MySQL database failed.
1月 13 14:37:18 localhost.localdomain mariadb-prepare-db-dir[23931]: Perhaps /etc/my.cnf is misconfigured.
1月 13 14:37:18 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
1月 13 14:37:18 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
1月 13 14:37:18 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
报错信息上说Perhaps /etc/my.cnf is misconfigured
我上网查了一下,说要用/usr/share/mysql/my-huge.cnf 来替换原来的/etc/my.cnf
但问题依旧
网上还说要在my.cnf里配置 datadir = /var/lib/mysql 但问题依然存在
请各位大神帮帮我吧,在此谢过
分享至: