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
1. Create a database 2. Create a table 1. Create ...
Preface Because computer numbers are floating poi...
Table of contents MySQL result sorting - Aggregat...
Blockquote Definition and Usage The <blockquot...
Table of contents Preface 1. Preview of office do...
Solution: Just set the link's target attribute...
Table of contents Problem Description Method 1 (b...
This article example shares the specific code of ...
React Native can develop iOS and Android native a...
The editor recently wanted to get started with th...
Table of contents Docker Compose usage scenarios ...
Preface: Vue3 has been released for a long time. ...
XHTML is the standard website design language cur...
Use native JavaScript to simply implement the cou...
Container auto-start Docker provides a restart po...