iwan iwan - 1 year ago 154
SQL Question

mysql data directory location

I installed mysql in Mac after downloding its dmg file version 64 bit.
While trying to create a database it gave me error 1006 -- can't create database. After browsing a number of website, it seems due to user ownership setting of mysql "data directory" location that needs to be changed.

Where is mysql default "data directory"? I could not find /var/lib/mysql in localhost.


Answer Source

See if you have a file /etc/my.cnf. If so, it should tell you where the data directory is. For example:


My guess is that your mysql might be installed to /usr/local/mysql-XXX.

This link might be useful:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download