Explore Courses Blog Tutorials Interview Questions
0 votes
in SQL by (6.1k points)

I had installed MySQL in my Mac operating system. After starting the SQL server using MySQL prefpane tool which is installed in the System Preference, I need to know the instruction to start from command-line. I do as follow:


su root

I am starting the MySQL server by command-line, it results with an error as below:

sh-3.2# /usr/local/mysql/bin/mysqld

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 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

111028 16:57:43 [ERROR] Aborting

111028 16:57:43 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

Where I am doing wrong ?

1 Answer

0 votes
by (12.7k points)
edited by

Try /usr/local/mysql/bin/mysqld_safe.


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)

You can also add these lines 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'

Want to be a SQL expert? Come and join this SQL training and certification program by Intellipaat.

If you want to know more about MySQL, refer to the below MySQL tutorial video that will help you out in a better way:

Related questions

0 votes
1 answer
asked Dec 20, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer
asked Nov 21, 2020 in SQL by Appu (6.1k points)

Browse Categories