MySQL official website download address: https://dev.mysql.com/downloads/mysql/ After the new version installation package is unzipped, there is no data folder and my-default.ini mentioned in the online tutorial, as shown in the figure below According to many online tutorials, the installation still failed, the result is: 1.Can't change dir to 'D:\from20181022\soft\mysql-5.7.24\mysql-5.7.24-winx64\data' (Errcode : 2 - No such file or directory) 2.The MySQL service is starting and the MySQL service cannot be started. After trying to integrate, the final successful installation steps are as follows 1. Unzip 2. Create my.ini in the following directory with the following content: character_set_server=utf8 #Many websites here use default-character-set=utf8, which is prone to errors port = 3306 basedir=D:\\from20181022\\soft\\mysql-5.7.24\\mysql-5.7.24-winx64 #datadir=D:\MySQL\MySQL Server 5.7.23\data You don’t need to create an empty data folder yourself max_connections=200 character-set-server=utf8 default-storage-engine=INNODB You can copy and paste directly, mainly modify the path after basedir, note that the path is \\ instead of \ 3. Enter the DOS command line and use administrator to enter a. Enter the MySQL bin directory and enter mysqld –install to install MySQL D:\from20181022\soft\mysql-5.7.24\mysql-5.7.24-winx64\bin>mysqld -install Service successfully installed. b. Enter mysqld --initialize --user=root --console (initialize and create a root account. You can copy it directly) After running... [Note] A temporary password is generated for root@localhost: After initialization, you can see that there is an additional data directory under the MySQL directory 4 Start MySQL service D:\from20181022\soft\mysql-5.7.24\mysql-5.7.24-winx64\bin>net start mysql 5. Change password 5-1 Use the default generated password to enter mysql, command mysql -u root -p (can be copied directly) D:\from20181022\soft\mysql-5.7.24\mysql-5.7.24-winx64\bin>mysql -u root -p If there is a permission problem here ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) Add a line to my.ini skip-grant-tables Skip permissions for this login, delete this line after successful login After the initial password is entered, the following will be displayed if the login is successful Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is … Server version: … Copyright © 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> 5-2 Enter the command to change the password. I changed the default password to 123456 mysql> set password = password('123456'); At this point, the MySQL environment under Windows has been installed. Summarize The above is the perfect solution for the problem that MYSQL5.7.24 is installed without a data directory and my-default.ini 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 I 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:
|
<<: How to use Vue+ElementUI Tree
>>: Summary of solving the yum error problem after upgrading Python to 3.6.6 on CentOS 7
Overview Let's summarize some SQL statements ...
I recently reviewed some CSS-related knowledge po...
This article example shares the specific code of ...
Table of contents 1. Use default parameters inste...
What is HTTP Compression Sometimes, relatively la...
Docker Swarm is a container cluster management se...
I remember when I was interviewing for my current...
1. Introduction MDL lock in MYSQL has always been...
Today, it suddenly occurred to me that it would be...
This article describes the definition and usage o...
HTML code: <a onclick="goMessage();"...
Prepare the database (MySQL). If you already have...
Preface Sometimes, we need a floating effect requ...
Problem description (what is keep-alive) keep-ali...
When server B (172.17.166.11) is powered on or re...