gpt4 book ai didi

mysqld_safe 命令启动然后停止 OSX Lion

转载 作者:可可西里 更新时间:2023-11-01 07:28:45 25 4
gpt4 key购买 nike

我在 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 并且在“Starting daemon with dbs from/usr/local/mysql/data”之后没有其他行弹出时,它正在工作!

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 off

我终止了 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 终端!

关于mysqld_safe 命令启动然后停止 OSX Lion,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9890013/

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