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
Optimization ideas There are two main optimizatio...
background First of all, I would like to state th...
First post the effect picture: A scroll bar appear...
Table of contents Preface Simulating data Merged ...
1.docker search mysql查看mysql版本 2. docker pull mys...
Heart Attributes opacity: .999 creates a stacking...
This article shares with you the installation and...
Friends who are doing development, especially tho...
The accessibility of web pages seems to be somethi...
First look at the code and effect↓ <style> ...
A design soldier asked: "Can I just do pure ...
This article introduces Docker+Jenkins automatic ...
1. Summary of location usage Location can locate ...
Before reading this article, it is best to have a...
Table of contents Overview 1. Path module 2. Unti...