mysql-5.7.20-winx64.zipInstallation package without installation steps: https://dev.mysql.com/downloads/file/?id=473309 Environment variables settings: Put C:\Program Files\mysql-5.7.20-winx64\bin in Path Right click -- Command Prompt (Administrator) -- cd C:\software\mysql\mysql-5.7.20-winx64\bin -- subsequent steps: 1.mysqld install 2. Initialize the mysql data directory (there is no such directory after decompressing mysql-5.7) and generate a password: mysqld --initialize-insecure Success is no response 3. Execute net start mysql in the DOS interface (any directory) 4. Execute mysql -uroot in the DOS interface (any directory) to log in as the root user 5.update user set authentication_string=password('123456') where user='root' and Host = 'localhost'; Set the password to 123456 #### update MySQL.user set authentication_string=password('root') where user='root'; 6.mysql -u root -p; (Log in to mysql with password) 7.net stop mysql --mysqld remove, try to install again
Log in to MySQL When the MySQL service is already running, we can log in to the MySQL database through the MySQL client tool. First, open the command prompt and enter the following format: mysql -h hostname -u username -p
Take the example of logging in to the MySQL database just installed on the local machine. Enter mysql -u root -p in the command line and press Enter to confirm. If the installation is correct and MySQL is running, you will get the following response: Enter password: If the password exists, enter it to log in. If it does not exist, just press Enter to log in. According to the installation method in this article, the default root account has no password. After a successful login, you will see the prompt We are coming to the MySQL monitor... The command prompt will then continue with mysql> with a blinking cursor, waiting for command input. Enter exit or quit to log out. Create a database Use the create database statement to create a database. The format of the creation command is as follows: For example, we need to create a database named samp_db, execute the following command in the command line: In order to display Chinese characters in the command prompt, the database character encoding is specified as gbk through character set gbk during creation. If the creation is successful, you will get the response "Query OK, 1 row affected(0.02 sec)". Note: MySQL statements end with a semicolon (;). If you do not add a semicolon at the end of a statement, the command prompt will prompt you to continue inputting with -> (there are some exceptions, but adding a semicolon is definitely not wrong); Tip: You can use the show databases; command to see which databases have been created. Using mysqladmin method: Open the command prompt interface and execute the command: After execution, you will be prompted to enter the old password to complete the password change. If the old password is empty, just press Enter to confirm. MySQL Workbench official introduction: http://www.mysql.com/products/workbench/ MySQL Workbench download page: http://dev.mysql.com/downloads/tools/workbench/ Summarize The above is the installation and configuration method of MySQL 5.7.20 win64 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Vue Router vue-router detailed explanation guide
>>: Analysis and solution of abnormal problem of loading jar in tomcat
Preface: Basically, whether it is for our own use...
The first method: docker installation 1. Pull the...
1. Dynamic query rules The dynamic query rules ar...
Original text: http://www.planabc.net/2008/08/05/...
1. Download MySQL Community Server 5.7.16 and ins...
I am using LDAP user management implemented in Ce...
Enable remote access to MySQL By default, MySQL u...
Table of contents Overview first step Step 2 Why ...
Table of contents 1. Error phenomenon 2. Error An...
Preface While browsing GitHub today, I found this...
Web page design related questions, see if you can...
Preface Normal business needs: upload pictures, E...
SQL UNIQUE constraint The UNIQUE constraint uniqu...
An interesting discovery: There is a table with a...
Test environment: C:\>systeminfo | findstr /c:...