mysql data directory location

后端 未结 8 1021
夕颜
夕颜 2020-11-30 21:18

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 nu

8条回答
  •  不知归路
    2020-11-30 21:42

    As suggested, I edited this message to place a proper answer.

    The 'physical' location of the mysql databases are under /usr/local/mysql

    the mysql is a symlink to the current active mysql installation, in my case the exact folder is mysql-5.6.10-osx10.7-x86_64.

    Inside that folder you'll see another data folder, inside it are RESTRICTED folders with your databases.

    You can't actually see the size of your databases (that was my issue) from the Finder because the folder are protected, you can though see from the terminal with sudo du -sh /usr/local/mysql/data/{your-database-name} and like this you'll get a nice formatted output with the size.

    In those folder you have different files with all the folders present in your database, so it's safer to check the db's folder to get a size.

    That's it. Enjoy!

提交回复
热议问题