我在OSX Lion上运行mysql 5.5.22.我的问题是mysqld_safe启动并在起始位置停止,就像这样.
我输入了这个命令:mysqld_safe
120327 05:33:57 mysqld_safe Logging to '/usr/local/mysql/data/The-BatMobile.local.err'.
120327 05:33:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
mysqld_safe程序现在已经停止了25分钟的最后一行代码.有人有想法吗?我完成的谷歌搜索显示了Lion的一些问题,但在这个特定问题上没有任何问题.
编辑//
在阅读了mysql错误日志之后,我发现mysqldsafe可能已经运行了前一行代码:
120327 05:33:57 mysqld_safe Logging to '/usr/local/mysql/data/The-BatMobile.local.err'.
120327 05:33:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
我的假设是否正确?
这是错误日志:
21 120327 11:21:58 mysqld_safe mysqld from pid file /usr/local/mysql/data/the- batmobile.pid ended
22 120327 11:23:06 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
23 120327 11:23:06 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
24 120327 11:23:06 [Note] Plugin 'FEDERATED' is disabled.
25 120327 11:23:06 InnoDB: The InnoDB memory heap is disabled
26 120327 11:23:06 InnoDB: Mutexes and rw_locks use GCC atomic builtins
27 120327 11:23:06 InnoDB: Compressed tables use zlib 1.2.3
28 120327 11:23:06 InnoDB: Initializing buffer pool, size = 128.0M
29 120327 11:23:06 InnoDB: Completed initialization of buffer pool
30 120327 11:23:06 InnoDB: highest supported file format is Barracuda.
31 120327 11:23:06 InnoDB: Waiting for the background threads to start
32 120327 11:23:07 InnoDB: 1.1.8 started; log sequence number 1595675
33 120327 11:23:07 [Note] Event Scheduler: Loaded 0 events
34 120327 11:23:07 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
35 Version: '5.5.22' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)
解决方法:
我想我找到了自己问题的答案!
当执行命令mysqld_safe并且在’使用/usr/local/mysql / data中的dbs启动守护进程’之后没有弹出其他行时,它正在运行!
120327 05:33:57 mysqld_safe Logging to '/usr/local/mysql/data/The-BatMobile.local.err'.
120327 05:33:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
我做了两次测试来证实这一点:
测试1:mysqld_safe关闭
我杀死了mysqld_safe进程并尝试使用“mysql -u root -p”登录,它给了我这个错误.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2):
测试2:mysqld_safe:on
有用!我使用“mysql -u root -p”登录并弹出mysql终端!
标签:mysql,osx-lion
来源: https://codeday.me/bug/20190530/1183948.html