Welcome to the Linux community forum and interact with 2 million technical staff to access Typehelp; orhforhelp. login. mysqlmysqlmysqlmysqlselectversion (); + ----------- + | version () | + ----------- + | 5.5.29 | + -----
Welcome to the Linux community forum and interact with 2 million technical staff> enter Type 'help; 'or' \ H' for help. type '\ C' to clear the current input statement. mysql select version (); + ----------- + | version () | + ----------- + | 5.5.29 | + -----
Welcome to the Linux community forum and interact with 2 million technicians>
Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.
Mysql>
Mysql>
Mysql>
Mysql> select version ();
+ ----------- +
| Version () |
+ ----------- +
| 5.5.29 |
+ ----------- +
1 row in set (0.00 sec)
Note: If the mysql client is not installed, there will be no commands such as mysql and mysqladmin.
Or use the following command to log on to mysql:
# Mysql-u root-p
Enter password: (Enter the password)
-U is followed by the user name.-p requires the password. Press enter and enter the password at the Enter password.
Note: This mysql file is located in the/usr/bin directory. It is not a file with the Startup file/etc/init. d/mysql described later.
When installing mysql5.6, the installation package randomly generates a password for the root user, which is in the '/root/mysql_secret' file.
After logging on with mysql-u root-p [password], you must use the following command to change the password:
Mysql> set password = PASSWORD ('20140901 ');
If you do not execute set password, execute other commands and you will encounter the following error:
ERROR 1820 (HY000): You must set password before executing this statement
7. Generate the my. cnf File
By default, mysql does not generate the my. cnf file, but you can find a cnf file in the/usr/share/mysql/directory to generate the my. cnf file, as shown below:
Cp/usr/share/mysql/my-huge.cnf/etc/my. cnf
Edit my. cnf and modify or add the relevant parameters as needed.
[1] [2]