Is this possible to start mysql from the console.

I tried with mysqld start but it fails to start, how to start it?

I didn't find my.cnf in Mac, I wanted to change datadir settings, if there any way to do this?


1 Answer 1


To start mysql, run mysqld_safe &. The ampersand at the end starts the process in the background, so you can continue to work while it runs. Most likely, it needs root privileges to run, so add sudo to the front if it doesn't work without (you will need to be logged in as an administrator).

By default, there is no my.cnf file. Defaults are used automatically. There are a few different starting files in the support-files folder, for different usage styles. You can copy any of them to start with, and place the file in any of these locations (in order searched): /etc/my.cnf /etc/mysql/my.cnf $MYSQL_DIR/etc/my.cnf ~/.my.cnf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .