MySQL 5.7.21 installation and password graphic configuration tutorial, MySQL 5.7.21 graphic
The installation and password setting tutorial for MySQL5.7.21 is as follows:
Official Reference Manual
1. Unzip the MySQL 5.7.20 installation package, such as X: \ MySQL \ mysql-5.7.21-winx64. (There is no data or my. ini)
2. Configure the mysql environment variable, create MYSQL_HOME, and add % MYSQL_HOME % \ bin in Path;
3. Configure my. ini. and put my. put ini in the bin directory (1. if you put it in the mysql-5.7.21-winx64 directory, the following execution of net start mysql may not start MYSQL service, 2. data is not automatically generated)
[Client] default-character-set = utf8 [mysqld] # decompress directory such as: D: \ MySQL \ mysql-5.7.21-winx64 basedir = % MYSQL_HOME % # decompress directory such as: D: \ MySQL \ mysql-5.7.21-winx64 \ data datadir = % MYSQL_HOME % \ data port = 3306 default-character-set = utf8
4. enter the command line as an administrator (you can search for and Enter cmd to find) and enter the command in the X: \ MySQL \ mysql-5.7.21-winx64 \ bin directory: mysqld -- initialize-insecure (generate password-less root user), the data file appears in the mysql-5.7.20-winx64 directory
5. Enter mysqld -- install. If Service successfully installed is displayed, the registration is successful.
Note:If this operation reports the error Install/Remove of the Service Denied !, We recommend that you use the Administrator identity to enter the command prompt.
6. start the MySQL service with the command: net start mysql
7. Set the password mysqladmin-u root password
8. Change the password as follows: Enter mysql-uroot-p. Because you have logged on to MYSQL before, enter the password you just set. (for the first time you log on to root, press enter to access mysql.)>
Then enter: update mysql. user set authentication_string = password ('password you want to enter ') where user = 'root' and Host = 'localhost'; then enter: flush privileges;
9. Enter the show databases command to view the data table.
Common MySQL commands are as follows:
List of all MySQL commands: Note that all text commands must be first on line and end with ';' (to end )? (\?) Synonym for 'help '. clear (\ c) Clear the current input statement. connect (\ r) Reconnect to the server. optional arguments are db and host. delimiter (\ d) Set statement delimiter. ego (\ G) Send command to mysql server, display result vertically. exit (\ q) Exit mysql. same as quit. go (\ g) Send command to mysql server. help (\ h) Display this help. notee (\ t) Don't write into outfile. print (\ p) Print current command. prompt (\ R) Change your mysql prompt. quit (\ q) Quit mysql. rehash (#) Rebuild completion hash. source (\.) execute an SQL script file. takes a file name as an argument. status (\ s) Get status information from the server. tee (\ T) Set outfile [to_outfile]. append everything into given outfile. use (\ u) Use another database. takes database name as argument. charset (\ C) Switch to another charset. might be needed for processing binlog with multi-byte charsets. warnings (\ W) Show warnings after every statement. nowarning (\ w) Don't show warnings after every statement. resetconnection (\ x) Clean session context.
10. Enter \ q; To exit MySQL
11. Shut down the MySQL service. Command: net stop mysql
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.