问题描述
我为我的Mac安装了mySQL。除了用安装在System Preference中的mySQL.prefPane工具启动SQL服务器之外,我想知道从命令行启动的指令。
我如下:
I installed mySQL for my Mac. Beside starting the SQL server with mySQL.prefPane tool installed in System Preference, I want to know the instruction to start from command-line.I do as follow:
我通过命令行启动mySQL服务器,它产生如下错误:
I start the mySQL server by command-line, it produce error as below:
111028 16:57:43 [Warning]设置lower_case_table_names = 2,因为
文件系统为/usr/local/mysql-5.5.17-osx10.6-x86_64/data/是case
不敏感
111028 16:57:43 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.5.17-osx10.6-x86_64/data/ is case insensitive
111028 16:57:43 [错误]致命错误:请阅读
手册的安全性如何以root身份运行mysqld!
111028 16:57:43 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
111028 16:57:43 [ERROR]正在中止
111028 16:57:43 [ERROR] Aborting
111028 16:57:43 [注意] / usr / local / mysql / bin / mysqld:关闭完成
111028 16:57:43 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
请帮助我!
编辑:
原因在这里:
以下xdazz的回答中描述了一个解决方案。
A solution is described in the xdazz's answer below.
推荐答案
尝试 / usr / local / mysql / bin / mysqld_safe
示例: / p>
Example:
shell> sudo /usr/local/mysql/bin/mysqld_safe
(Enter your password, if necessary)
(Press Control-Z)
shell> bg
(Press Control-D or enter "exit" to exit the shell)
也可以添加这些到你的bash启动脚本:
You can also add these to your bash startup scripts:
export MYSQL_HOME=/usr/local/mysql
alias start_mysql='sudo $MYSQL_HOME/bin/mysqld_safe &'
alias stop_mysql='sudo $MYSQL_HOME/bin/mysqladmin shutdown'
这篇关于在Mac OS Lion上从命令行启动MySQL服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!