I am a beginner in SQL and thought that the installation of open source was very simple, but some problems occurred in the process. I recorded them down and hope they can help others. MySQL official website download address: https://dev.mysql.com/downloads/mysql/Click to open the link Take version 5.7.20 as an example First, after the installation package is unzipped, there is no data folder and my-default.ini mentioned in the online tutorial, as shown in the figure below Please refer to the online tutorial for configuring environment variables. This is generally no problem. Pay attention to the following points: (1) It is not important whether the my-default.ini file exists or not. The key is to create a new my.ini file in the root directory. The specific content is as follows: [mysql] # Set the default character set of the mysql client to default-character-set=utf8 [mysqld] #Set port 3306 port = 3306 # Set the installation directory of mysql basedir=D:\\softnew\\MYSQL\\mysql-5.7.20-winx64 # Maximum number of connections allowed max_connections=200 # The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB You can copy and paste directly, mainly modify the path after basedir, note that the path is \\ instead of \ (2) Please do not create a data folder yourself Many tutorials on the Internet suggest creating a new empty data folder and then adding a sentence to the my.ini file: # Set the storage directory of mysql database data datadir=D:\\softnew\\MYSQL\\mysql-5.7.20-winx64\\data This will cause the service to fail to start. Do not add this sentence, and do not create a new data folder yourself. Let mysql automatically generate data. Specifically: Open the cmd command window and go to the bin directory of the MySQL installation directory. Then enter the command mysqld install to display success Then enter: Then enter: Finally, the contents of the data folder should be displayed as follows: Summarize The above is the quick solution introduced by the editor for the problem that there is no data directory and my-default.ini in the unzipped package of Windows 64-bit MySQL 5.7 or above, and the service cannot be started. 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:
|
<<: CentOS uses local yum source to build LAMP environment graphic tutorial
>>: How to make your own native JavaScript router
This article example shares the specific code of ...
Real-time replication is the most important way t...
For Linux system administrators, it is crucial to...
The detailed process of installing python3.7.0 on...
Includes the process of initializing the root use...
1. What is As a markup language, CSS has a relati...
When is the table used? Nowadays, tables are gene...
Recently, I used html-webapck-plugin plug-in for ...
This article shares the specific code of Vue to i...
Problem [root@zh ~]# [root@zh ~]# [root@zh ~]# yu...
When users install MySQL database for the first t...
Table of contents Preface 1. Nginx+Tomcat 2. Conf...
This is an article about website usability. The a...
I recently used Docker to upgrade a project. I ha...
Table of contents Preface Installation and Usage ...