In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Error log:
[mysql@host-172-24,115,217,217] $service mysql restart
Shutting down MySQL.. SUCCESS!
Starting MySQL..180426 13:36:03 mysqld_safe Logging to'/ usr/local/mysql/data/alert.log'.
180426 13:36:03 mysqld_safe Starting mysqld daemon with databases from / usr/local/mysql/data
. . . . . . . ... ERROR!
2. Analysis log:
(1) View logs
Usr/local/mysql/data/alert.log
Found that: Version: '5.5.59 MariaDB Server MariaDB' socket:'/ usr/local/mysql/data/mysql.sock' port: 3306 MariaDB Server
Indicates that the mysqld has been started.
(2) View the process
[mysql@host-172-24115217 fd] $ps-ef | grep mysqld
Mysql 20633 10 13:36 pts/5 00:00:00 / bin/sh / usr/local/mysql/bin/mysqld_safe-- datadir=/usr/local/mysql/data-- pid-file=/usr/local/mysql/data/mysqlProcess.pid
Mysql 21736 20633 0 13:36 pts/5 00:00:02 / usr/local/mysql/bin/mysqld-basedir=/usr/local/mysql-datadir=/usr/local/mysql/data-plugin-dir=/usr/local/mysql/lib/plugin-log-error=/usr/local/mysql/data/alert.log-pid-file=/usr/local/mysql/data/mysqlProcess.pid-socket=/usr/local/mysql/data/mysql.sock-port=3306
Mysql 22436 7333 0 13:40 pts/3 00:00:00 grep mysqld
Analysis:
From the log and process information, you can see that this mysqld service is normal. Then why did the startup failure occur?
Third, the reasons for excavation
Now that the mysqld service process is working, whether it is possible to log in from another machine. After testing
[mysql@host-172-24115218] $mysql-h272.24.115.217-uroot-pmysql
Welcome to the MariaDB monitor. Commands end with; or\ g.
Your MariaDB connection id is 1
Server version: 5.5.59-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
MariaDB [(none)] >
After authentication, you can log in.
Four: conclusion
It can be inferred from this.
The client configuration of the mysql server is incorrect, causing the mysql process to read the configuration resulting in an exception
Check / etc/my.cnf findings are as follows:
[client]
# socket = / usr/local/mysql/data/mysql.sock
Default-character-set = gbk
Port = 3306
Missing red part, after comment, restart everything normally again.
Want to improve:
It is hoped that the shell scripts related to the startup process of mysql can also add corresponding logs to assist in analyzing the problem.
That is all.
Good Luck!
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.