This section discusses tasks that you should perform after installing MySQL:
If necessary, initialize the data directory and create the MySQL grant tables. For some MySQL installation methods, data directory initialization may be done for you automatically:
Windows distributions prior to MySQL 5.7.7 include a data directory with pre-built tables in the
mysqldatabase. As of 5.7.7, Windows installation operations performed by MySQL Installer initialize the data directory automatically.
Installation on Linux using a server RPM distribution.
Installation using the native packaging system on many platforms, including Debian Linux, Ubuntu Linux, Gentoo Linux, and others.
Installation on OS X using a DMG distribution.
For other platforms and installation types, including installation from generic binary and source distributions, you must initialize the data directory yourself. For instructions, see Section 2.10.1, “Initializing the Data Directory”.
Assign passwords to the initial
rootaccount in the grant tables, if that was not already done during data directory initialization. Passwords prevent unauthorized access to the MySQL server. For instructions, see Section 2.10.4, “Securing the Initial MySQL Accounts”.
Optionally, arrange for the server to start and stop automatically when your system starts and stops. For instructions, see Section 2.10.5, “Starting and Stopping MySQL Automatically”.
Optionally, populate time zone tables to enable recognition of named time zones. For instructions, see Section 10.6, “MySQL Server Time Zone Support”.
When you are ready to create additional user accounts, you can find information on the MySQL access control system and account management in Section 6.2, “The MySQL Access Privilege System”, and Section 6.3, “MySQL User Account Management”.