0

According to the MySQL document, 2.10.1 Initializing the Data Directory:

  1. Change location into the top-level directory of your MySQL installation, represented here by BASEDIR:

    shell> cd BASEDIR

    BASEDIR is likely to be something like /usr/local/mysql or /usr/local. The following steps assume that you have changed location to this directory.

    You will find several files and subdirectories in the BASEDIR directory. The most important for installation purposes is the bin subdirectory, which contains the server as well as client and utility programs.

I've checked /usr/local/mysql and /usr/local, but neither of them contains anything related to MySQL. which mysql returns /usr/bin/mysql, but I don't think /usr/bin would be MySQL's base directory.

The document says I need to create a directory called mysql-files under BASEDIR, so I want to know where to find it.

  • 1
    You don't need to create anything in the data directory. The mysql-server package (or mariadb-server installs a ready to use MySQL server. You just need to create databases – Basile Starynkevitch Jul 2 '17 at 6:13
1

/var/lib/mysql

But to be sure you can do a

locate ibdata1

and when found it will also show the directory mysql is in.

  • BTW, the debian or ubuntu packages for mysql are already creating these directories, and you don't need to explicitly create them – Basile Starynkevitch Jul 2 '17 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.