In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Operating environment: centos 7
Database: mariadb
Problem description: the / var/lib/mysql_install_db command was run after the yum installation of the mariadb database was run, causing the mariadb database to fail to start or restart.
Troubleshooting:
[centos@centos mysql] $sudo systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl-xe" for details.
Through the problem description, the first thing that comes to mind is to run sudo journalctl-xe to view the following problem details, but there is no more detailed error description, which reminds me of / var/log/mariadb/error.log. After checking, I get the following error message, mysqld: File'. / mysql-bin.000013' not found (Errcode: 13), according to the prompt, check to see if the mysql-bin.000013 binary log file is missing Ls-1 / var/lib/mysql/ checked the existence of this file, but found that the owner of this file and other file owners and group permissions are not the same, change its owner and subordinate group sudo chown mysql.mysql mysql-bin.000013, restart the mariadb problem is solved.
Summary:
Under linux, most failures are recorded in log files. Don't panic when you encounter a problem, first check the problem description, and then solve the problem through log file description. Don't look up answers blindly on the Internet.
[centos@centos mysql] $sudo journalctl-xe
--
-- Unit mariadb.service has begun shutting down.
November 04 18:22:46 centos systemd [1]: Stopped MariaDB database server.
-- Subject: Unit mariadb.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has finished shutting down.
November 04 18:22:46 centos polkitd: Unregistered Authentication Agent for unix-process:13180:865667 (system bus name: 1.197)
November 04 18:22:57 centos sudo [13209]: centos: TTY=pts/1; PWD=/var/lib/mysql; USER=root; COMMAND=/bin/systemctl start mari
November 04 18:22:57 centos polkitd: Registered Authentication Agent for unix-process:13210:866892 (system bus name: 1.198 [/
November 04 18:22:57 centos systemd [1]: Starting MariaDB database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has begun starting up.
November 04 18:22:57 centos mariadb-prepare-db-dir [13217]: Database MariaDB is probably initialized in / var/lib/mysql already, not
November 04 18:22:57 centos mariadb-prepare-db-dir [13217]: If this is not the case, make sure the / var/lib/mysql is empty before r
November 04 18:22:57 centos mysqld_safe [13252]: 171104 18:22:57 mysqld_safe Logging to'/ var/log/mariadb/mariadb.log'.
November 04 18:22:57 centos mysqld_safe [13252]: 171104 18:22:57 mysqld_safe Starting mysqld daemon with databases from / var/lib/my
18:23:03 centos systemd [1]: mariadb.service: control process exited, code=exited status=1
November 04 18:23:03 centos 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.
November 04 18:23:03 centos systemd [1]: Unit mariadb.service entered failed state.
November 04 18:23:03 centos systemd [1]: mariadb.service failed.
November 04 18:23:03 centos polkitd: Unregistered Authentication Agent for unix-process:13210:866892 (system bus name: 1.198)
November 04 18:23:16 centos sudo [13683]: centos: TTY=pts/1; PWD=/var/lib/mysql; USER=root; COMMAND=/bin/journalctl-xe
[centos@centos mysql] $sudo tail-n 30 / var/log/mariadb/error.log
171104 18:22:59 Percona XtraDB (http://www.percona.com) 5.5.52-MariaDB-38.3 started; log sequence number 1597964
171104 18:22:59 [Note] Plugin 'FEEDBACK' is disabled.
171104 18:22:59 [ERROR] mysqld: File'. / mysql-bin.000013' not found (Errcode: 13)
171104 18:22:59 [ERROR] Failed to open log (file'. / mysql-bin.000013', errno 13)
171104 18:22:59 [ERROR] Could not open log file
171104 18:22:59 [ERROR] Can't init tc log
171104 18:22:59 [ERROR] Aborting
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.