Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

THANKS.

like image 277
iwan Avatar asked Sep 18 '11 02:09

iwan


People also ask

Where is data directory stored?

Each database has a data directory located under database directory.

Can I copy MySQL data directory?

You have to shut down mysql server (which is not good, if it's a production server) You have to make sure the permission of data (mysql) directory is same as the previous one.

How do I find MySQL database?

Find data across a MySQL connection by using the text search feature on any number of tables and schemas. From the schema tree, select the tables, schemas, or both to search and then right-click the highlighted items and click Search Data Table from the context menu.

Where is data directory for MySQL?

The default data directory location is C:\Program Files\MySQL\MySQL Server 8.0\data , or C:\ProgramData\Mysql on Windows 7 and Windows Server 2008. The C:\ProgramData directory is hidden by default. You need to change your folder options to see the directory and contents.


1 Answers

If the software is Sequel pro the default install mysql on Mac OSX has data located here:

/usr/local/var/mysql 
like image 75
nextzeus Avatar answered Sep 23 '22 21:09

nextzeus