mysql data directory location

后端 未结 8 971
夕颜
夕颜 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:52

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

    For example:

    [mysqld]
    set-variable=local-infile=0
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    user=mysql
    ...
    

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

    You may find these MySQL reference manual links useful:

    • Installing MySQL 8.0 on MacOS
    • Installing MySQL 5.7 on MacOS
    • Installing MySQL 5.6 on MacOS
    • Installing MySQL 5.5 on MacOS

提交回复
热议问题