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
I recently encountered a problem when doing IM, a...
introduce Have you ever spent a whole day trying ...
This article describes the Mysql self-join query....
1. Introduction to Compose Compose is a tool for ...
1. Check BIOS First check which startup mode your...
Table of contents 1. Environmental Preparation 1....
In writing styles, we can often see this situatio...
jQuery realizes the effect of theater seat select...
Preface Before, I used cache to highlight the rou...
Preface: I believe that those who need to underst...
If you only want to back up a few tables or a sin...
Everyone is familiar with the meta tag in desktop...
I am planning to build my own website, so I took ...
By default, the width and height of the table are...
Table of contents Loop - for Basic use of for loo...