1. 資料由默認路徑換成 /home/dh/mysql
2. cp -a 拷貝的資料檔案,
3. my.cnf中路徑修改成了:
datadir=/home/dh/mysql/
socket=/home/dh/mysql/mysql.sock
4. 新舊資料目錄的權限都是mysql
5. service mysqld start啟動后提示:
Redirecting to /bin/systemctl start mysqld.service
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
6. systemctl status mysqld.service后提示:
mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since 五 2019-09-13 22:55:25 CST; 6s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 28050 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 28031 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 24194 (code=exited, status=0/SUCCESS)
9月 13 22:55:25 localhost.localdomain systemd[1]: Failed to start MySQL Server.
9月 13 22:55:25 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
9月 13 22:55:25 localhost.localdomain systemd[1]: mysqld.service failed.
9月 13 22:55:25 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart.
9月 13 22:55:25 localhost.localdomain systemd[1]: start request repeated too quickly for mysqld.service
9月 13 22:55:25 localhost.localdomain systemd[1]: Failed to start MySQL Server.
9月 13 22:55:25 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
9月 13 22:55:25 localhost.localdomain systemd[1]: mysqld.service failed.
7. journalctl -xe后提示如下,好像一直有不同的IP在試圖登錄被拒:
9月 13 22:55:25 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
9月 13 22:55:25 localhost.localdomain systemd[1]: mysqld.service failed.
9月 13 22:55:29 localhost.localdomain sshd[28054]: reverse mapping checking getaddrinfo for 192-227-252-17-host.colocrossing.com [192.
9月 13 22:55:29 localhost.localdomain sshd[28054]: Invalid user rust from 192.227.252.17
9月 13 22:55:29 localhost.localdomain sshd[28054]: input_userauth_request: invalid user rust [preauth]
9月 13 22:55:29 localhost.localdomain sshd[28054]: pam_unix(sshd:auth): check pass; user unknown
9月 13 22:55:29 localhost.localdomain sshd[28054]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= r
9月 13 22:55:31 localhost.localdomain sshd[28054]: Failed password for invalid user rust from 192.227.252.17 port 60142 ssh2
9月 13 22:55:31 localhost.localdomain sshd[28054]: Received disconnect from 192.227.252.17: 11: Bye Bye [preauth]
9月 13 22:55:39 localhost.localdomain sshd[28057]: Invalid user node123 from 165.227.0.220
9月 13 22:55:39 localhost.localdomain sshd[28057]: input_userauth_request: invalid user node123 [preauth]
9月 13 22:55:39 localhost.localdomain sshd[28057]: pam_unix(sshd:auth): check pass; user unknown
9月 13 22:55:39 localhost.localdomain sshd[28057]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= r
9月 13 22:55:41 localhost.localdomain sshd[28057]: Failed password for invalid user node123 from 165.227.0.220 port 41006 ssh2
9月 13 22:55:42 localhost.localdomain sshd[28057]: Received disconnect from 165.227.0.220: 11: Bye Bye [preauth]
9月 13 22:55:43 localhost.localdomain sshd[28059]: Invalid user www-data from 207.154.215.236
9月 13 22:55:43 localhost.localdomain sshd[28059]: input_userauth_request: invalid user www-data [preauth]
9月 13 22:55:43 localhost.localdomain sshd[28059]: pam_unix(sshd:auth): check pass; user unknown
-------------
網上查了一圈沒有解決。
求各位大俠幫忙解決,不勝感激。
uj5u.com熱心網友回復:
啟動不了的話,看一下mysql 的錯誤日志檔案和/var/log/message檔案當中有沒有錯誤訊息。轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/96097.html
標籤:系統維護與使用區
