I have seen a lot of MySQL-related syntax recently. I also want to learn how to write some MySQL stored procedures, so I want to install MySQL. I encountered some problems in the process, which I will record here~ Step 1: Download First, go to the official website to download the MySQL version that matches your computer. The URL is as follows: https://www.mysql.com/ Then, go to the download page: 1) Go to the download page 2) Find the location in the red box 3) Click Download 4) Go to the download page, find the matching version on the page, and click Download 5) Unzip after downloading: D:\Users\chen_lib\mysql-8.0.16-winx64 (here Xiaobai unzips to this address) Step 2: Configure environment variables Variable Name: MYSQL_HOME Variable value: D:\Users\chen_lib\mysql-8.0.16-winx64 Add to path: %MYSQL_HOME%\bin Step 3: Installation 1. Generate data file In Start, run cmd Enter the D:\Users\chen_lib\mysql-8.0.16-winx64\bin directory. When you cd here, you cannot add a slash after D:, otherwise an error will be reported. After entering the path, execute the command mysqld --initialize-insecure --user=mysql At this time, the data directory is generated in the D:\Users\chen_lib\mysql-8.0.16-winx64 directory. 2. Start the service: Execute the command: net start mysql to start the MySQL service. Here I encountered an error; Solution: Execute the command: mysqld -install In fact, the installation is successful here, but I have to test it. I encountered a problem when testing it here. Continue down~ Log in to mysql: (Because no password was set before, the password is blank, no need to enter a password, just press Enter) Command: mysql -u root -p Unable to connect here. Solution: Follow this operation and find MySQL to start it Try again: Success Next, check the password. Command: mysql> select host,user,authentication_string from mysql.user; You can also modify or set the user password: Command: update mysql.user set authentication_string=password("123456") where user="root"; To take effect, you need to type this command again: flush privileges; Exit MySql Command: quit The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to deploy your first application with Docker
>>: Detailed analysis of the blocking problem of js and css
As a useful terminal emulator, Xshell is often us...
Practice is the only way to test the truth. This ...
In order to extend the disk life for storing audi...
Preface scp is the abbreviation of secure copy. s...
Record the installation and configuration method ...
On the server, in order to quickly log in to the ...
Regular expressions are often used to search and ...
This article shares the specific code for JavaScr...
When we check the source code of many websites, w...
MySQL handles duplicate data Some MySQL tables ma...
The code under the easyui framework is as follows...
environment: 1 CentOS Linux release 7.5.1804 (Cor...
In many cases, arrays are often used when writing...
When I surf the Net, I often see web sites filled...
Table of contents Preface application Filters Dra...