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
Preface Zabbix is one of the most mainstream op...
1. Overview of DDL Atomicity Before 8.0, there wa...
<br />Once, Foyin and Mr. Dongpo were chatti...
Preface Hello everyone, I am Liang Xu. At work, w...
Preface As we all know, bash (the B ourne-A gain ...
In the interview, you should have experienced the...
Related articles: Install Docker using yum under ...
Effect: When the slideshow moves in one direction...
Enter Alibaba vector icon library Alibaba Vector ...
Table of contents Preface 1. Trigger Overview 2. ...
This article example shares the specific code of ...
Table of contents 1. What is Set 2. Set Construct...
In the process of making web pages, we often use f...
One demand Generally speaking, a company has mult...
This article mainly involves solutions to problem...