1. Download MySQLDownload address: https://dev.mysql.com/downloads/mysql/ 2. Unzip the compressed packageAfter the download is complete, decompress the compressed package directly. 3. Initialize mysqlCreate a new data file and a new my.ini configuration file Create an empty folder called data under the unzipped mysql directory, and then create a new configuration file called my.ini under D:\Program Files\mysql-8.0.25-winx64. Write the following code in the file: [mysqld] #Set the character set used by the server to utf-8 character-set-server=UTF8MB4 #Bind IPv4 address bind-address=0.0.0.0 #Set the mysql port number port = 3306 #Set the installation directory of mysql basedir=F:/mysql-5.7.23 #Set the storage directory of mysql database data datadir=C:/mysql-5.7.23/data #Maximum number of connections allowed max_connections=2000 #The default storage engine that will be used when creating a new table default-storage-engine=INNODB #Set the default encoding of mysql and database [mysql] default-character-set=utf8 [mysql.server] default-character-set=utf8 #Set the client default character set [client] default-character-set=utf8 The # sign and the Chinese characters behind it must be deleted. The final effect is as shown below: One thing to note here is that if the data file is not empty, an error will be reported: The designated data directory D:\Program Files\mysql-8.0.25-winx64\data\ is unusable. You can remove all files that the server added to it. Solution: Delete the files in the data folder. Run cmd as an administrator and enter the bin directory of mysql 4. Install MySQL serviceExecute the command: mysqld --install If you need to uninstall, use the command mysqld --remove Execute the command: mysqld --initialize --user=root --console Here I encountered an error: The reason is that the encoding format in my my.ini file is incorrect. Just modify it according to the error prompts. Start the mysql service. Use the command: net start mysql Log in to mysql and execute the command: mysql -uroot -p: The random password just initialized encountered an error: Change password command: set password = password('new password') Stop service Use the command: net stop mysql This is the end of this article about the detailed tutorial on MySQL database installation and configuration. For more relevant MySQL installation and configuration content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Use Docker to create a distributed lnmp image
>>: A detailed introduction to for/of, for/in in JavaScript
Table of contents 1. Demand Method 1 Method 2 Met...
Use CSS3 to animate the input box similar to the ...
Since 2019, both Android and IOS platforms have s...
There are very complex HTML structures in web pag...
Table of contents 1. Database Operation 1.1 Displ...
This article shares the specific code of a simple...
Table of contents Placeholder replacement Console...
This topic is an internal sharing in the second h...
Table of contents As a global variable Variable H...
In general guestbooks, forums and other places, t...
1. Packetdrill compilation and installation Sourc...
need: Use vue to realize QR code scanning; Plugin...
Structure related tags ---------------------------...
1. Log in to mysql: mysql -u root -h 127.0.0.1 -p...
Table of contents 1. Introduction 2. Self-increme...