avec l’option recreate-broken-system-tables
:
2018-11-06 16:14:58,491 [INFO] []
2018-11-06 16:14:58,493 [INFO] Trying to restart mysqld in safe mode...
181106 16:14:59 mysqld_safe Logging to '/var/lib/mysql/smidge.noho.st.err'.
181106 16:14:59 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2018-11-06 16:15:01,630 [WARNING] Can't connect to mysql in safe mode (error: 2003: Can't connect to MySQL server on '127.0.0.1:3306' (111 Connection refused)), wait 1min and retry (this somethime fix it because mysql ™)
2018-11-06 16:15:01,633 [WARNING] Attemp number 1 (will try this a maximum number of 3 times)
2018-11-06 16:16:01,706 [WARNING] Can't connect to mysql in safe mode (error: 2003: Can't connect to MySQL server on '127.0.0.1:3306' (111 Connection refused)), wait 1min and retry (this somethime fix it because mysql ™)
2018-11-06 16:16:01,719 [WARNING] Attemp number 2 (will try this a maximum number of 3 times)
181106 16:16:02 mysqld_safe Logging to '/var/lib/mysql/smidge.noho.st.err'.
181106 16:16:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2018-11-06 16:17:01,769 [WARNING] Can't connect to mysql in safe mode (error: 2003: Can't connect to MySQL server on '127.0.0.1:3306' (111 Connection refused)), wait 1min and retry (this somethime fix it because mysql ™)
2018-11-06 16:17:01,771 [WARNING] Attemp number 3 (will try this a maximum number of 3 times)
181106 16:17:02 mysqld_safe Logging to '/var/lib/mysql/smidge.noho.st.err'.
181106 16:17:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2018-11-06 16:18:01,834 [ERROR] I'm not able to relaunch mysql in safe mode so I can't fix it, aborting :(
(ve) root@smidge:~/git/auto-fix-mysql# 181106 16:18:02 mysqld_safe Logging to '/var/lib/mysql/smidge.noho.st.err'.
181106 16:18:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
(et je ne récupère pas le prompt à la fin)
avec l’option recreate-apps-users
:
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
Traceback (most recent call last):
File "auto-fix-mysql", line 502, in <module>
parser.dispatch()
File "/root/git/auto-fix-mysql/ve/local/lib/python2.7/site-packages/argh/helpers.py", line 55, in dispatch
return dispatch(self, *args, **kwargs)
File "/root/git/auto-fix-mysql/ve/local/lib/python2.7/site-packages/argh/dispatching.py", line 174, in dispatch
for line in lines:
File "/root/git/auto-fix-mysql/ve/local/lib/python2.7/site-packages/argh/dispatching.py", line 277, in _execute_command
for line in result:
File "/root/git/auto-fix-mysql/ve/local/lib/python2.7/site-packages/argh/dispatching.py", line 260, in _call
result = function(*positional, **keywords)
File "auto-fix-mysql", line 368, in recreate_apps_users
subprocess.check_output(["systemctl", "restart", "mysql"])
File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['systemctl', 'restart', 'mysql']' returned non-zero exit status 1
Dans les deux cas, je n’ai pas pu redémarrer le service mysql ensuite.