PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5
If you need to specify startup options when you run the server, you can indicate them on the command line or place them in an option file. For options that are used every time the server starts, you may find it most convenient to use an option file to specify your MySQL configuration. This is particularly true under the following circumstances:
The installation or data directory locations are different from the default locations (
C:\Program Files\MySQL\MySQL Server 5.7andC:\Program Files\MySQL\MySQL Server 5.7\data).You need to tune the server settings, such as memory, cache, or InnoDB configuration information.
When the MySQL server starts on Windows, it looks for option files in several locations, such as the Windows directory,C:\, and the MySQL installation directory (for the full list of locations, seeSection 4.2.2.2, “Using Option Files”). The Windows directory typically is named something likeC:\WINDOWS. You can determine its exact location from the value of theWINDIR environment variable using the following command:
C:\> echo %WINDIR% MySQL looks for options in each location first in themy.ini file, and then in themy.cnf file. However, to avoid confusion, it is best if you use only one file. If your PC uses a boot loader whereC: is not the boot drive, your only option is to use themy.ini file. Whichever option file you use, it must be a plain text file.
When using the MySQL Installer to install MySQL Server, it creates themy.ini in the default location, and the user executing MySQL Installer is granted full permissions to this newmy.ini file.
In other words, be sure that the MySQL Server user has permission to read themy.ini file.
You can also make use of the example option files included with your MySQL distribution; seeSection 5.1.2, “Server Configuration Defaults”.
An option file can be created and modified with any text editor, such as Notepad. For example, if MySQL is installed inE:\mysql and the data directory is inE:\mydata\data, you can create an option file containing a[mysqld] section to specify values for thebasedir anddatadir options:
[mysqld]# set basedir to your installation pathbasedir=E:/mysql# set datadir to the location of your data directorydatadir=E:/mydata/dataMicrosoft Windows path names are specified in option files using (forward) slashes rather than backslashes. If you do use backslashes, double them:
[mysqld]# set basedir to your installation pathbasedir=E:\\mysql# set datadir to the location of your data directorydatadir=E:\\mydata\\dataThe rules for use of backslash in option file values are given inSection 4.2.2.2, “Using Option Files”.
As of MySQL 5.7.6, the ZIP archive no longer includes adata directory. To initialize a MySQL installation by creating the data directory and populating the tables in the mysql system database, initialize MySQL using either--initialize or--initialize-insecure. For additional information, seeSection 2.9.1, “Initializing the Data Directory”.
If you would like to use a data directory in a different location, you should copy the entire contents of thedata directory to the new location. For example, if you want to useE:\mydata as the data directory instead, you must do two things:
Move the entire
datadirectory and all of its contents from the default location (for exampleC:\Program Files\MySQL\MySQL Server 5.7\data) toE:\mydata.Use a
--datadiroption to specify the new data directory location each time you start the server.
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5