MySQL 5.7.21 installation and password graphic configuration tutorial, MySQL 5.7.21 graphic

Source: Internet
Author: User
Tags mysql commands

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.