gpt4 book ai didi

MySQL : sudo mysqld_safe --skip-grant-tables & hangs

转载 作者:太空宇宙 更新时间:2023-11-03 11:54:09 26 4
gpt4 key购买 nike

我不小心删除了所有 mysql 用户,因此无法访问任何数据库。

我正在使用 http://www.kevssite.com/2011/07/02/deleted-rootlocalhost-account-in-mysql/链接以再次重新创建根用户帐户。

但问题是每当我发出命令 sudo mysqld_safe --skip-grant-tables & 我的脚本永远挂起。因此,我无法按照上面给出的链接中提到的后续步骤进行操作。

 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
151130 18:17:51 mysqld_safe Logging to '/var/log/mysql/error.log'.
151130 18:17:51 mysqld_safe A mysqld process already exists

最佳答案

确保在运行 mysqld_safe 之前先杀死 mysqld:

killall mysqld mysqld_safe
# give it 10 seconds or so to shut down cleanly
ps aux | grep mysqld
# if you still see mysqld, more violent action might be needed,
# but it might
# corrupt your data. But if it a test or empty install, no problem
killall -9 mysqld mysqld_safe
# now mysqld_safe should start

您还应该从 my.cnf 中删除 sysloglog-error 以解决来自 mysqld_safe.

关于MySQL : sudo mysqld_safe --skip-grant-tables & hangs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34005407/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com