Name required. Email will not be published required. Email Address. Powered by WordPress Designed by Switchroyale. All rights reserved. Other names may be trademarks of their respective owners. It described how to set the root password, create a database, and add a user for the database. This artcile examines MySQL congfiguration in a little more detail so you can adjust its configuration and be ready in case something goes wrong. Run the following command:.
The first part of the lengthy response describes the options you can send to the server when you launch it. The second part displays the configuration set during the server compilation. Comment lines, starting with , document the use of the different settings. They show details about the location of log files, database files, and other details.
The configuration file contains lines with a single word in square brackets, like [client] or [mysqld]. Those sections are configuration groups. They make important configuration elements more visible to the programs that read the configuration file. The server configuration section is, technically, a collection of tools. That includes the server mysqld , the client mysql , and other tools. Those programs look in my.
The client configuration section controls the mysql client, and the mysqld section controls the server configuration. Log files are the best place to start troubleshooting any program. By default, MySQL stores its log files in the following directory:. View the my. In the example shown above, note the following: 1. The mysql client uses options from boththe [client] and [mysql] groups, so it would use all three options shown.
MySQL server looks for files in standard locations. Standard files are different for Linux and Windows: — In Linux, use the my. There is no single my. The server might read multiple my. You can view option file lookup locations, the order in which they are read, and groups with options:. The standard option files are as follows: 1. You can create a user-specific option file named. Windows :Programs look for option files in the following order: my.
To view the locations of options file and the order in which they are read, use the mysql command-line client with the —help option. The following command filters the output of the command:. A backslash followed by a valid escape sequence character is converted to the character represented by the sequence.
A backslash not followed by a valid escape sequence character remains unchanged. The rules for escape sequences in option files differ slightly from the rules for escape sequences in string literals in SQL statements. See Section 9. This can be done several ways. Some examples:. If an option group name is the same as a program name, options in the group apply specifically to that program. For example, the [mysqld] and [mysql] groups apply to the mysqld server and the mysql client program, respectively.
The [client] option group is read by all client programs provided in MySQL distributions but not by mysqld. The [client] group enables you to specify options that apply to all clients. For example, [client] is the appropriate group to use to specify the password for connecting to the server. But make sure that the option file is accessible only by yourself, so that other people cannot discover your password. Be sure not to put an option in the [client] group unless it is recognized by all client programs that you use.
Programs that do not understand the option quit after displaying an error message if you try to run them. List more general option groups first and more specific groups later. For example, a [client] group is more general because it is read by all client programs, whereas a [mysqldump] group is read only by mysqldump.
Options specified later override options specified earlier, so putting the option groups in the order [client] , [mysqldump] enables mysqldump -specific options to override [client] options. To create option groups to be read only by mysqld servers from specific MySQL release series, use groups with names of [mysqld It is possible to use! MySQL makes no guarantee about the order in which option files in the directory are read.
Any files to be found and included using the! On Windows, this directive checks for files with the.
0コメント