In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces you to mysql installation can not start the service solution, the content is very detailed, interested friends can refer to, I hope to help you.
I. Decompress files
After downloading MySQL, extract it to disk D, or extract it according to personal preference under the path of other drive letters. The extracted path is D:\mysql-5.7.17-winx64. After decompression, don't be too excited, you need to configure the default file!
II. Configure default files
The decompressed file has a default configuration file (my-default.ini), but the default configuration file is not easy to use, and there will be many problems when using it, such as the Chinese characters inside are all garbled. So you need to configure your personal default configuration file: create a new file under the decompressed path: my.ini, copy the following code, D:\mysql-5.7.17-winx64 appears twice in the code, this is my MySQL decompression path, you can replace it according to your own path. MySQL can now be installed.
[mysql]#Set mysql client default character set default-character-set=utf8 [mysqld]#Set port 3306 port = 3306 #Set mysql installation directory basedir="D: \mysql-5.7.17-winx64"#Set mysql database data storage directory datadir="D:\mysql-5.7.17-winx64\data"#Maximum number of connections allowed max_connections=200#Character set used by server defaults to 8-bit encoded latin1 character-set-server=utf8#Default storage engine to be used when creating new tables default-storage-engine=INNODB
Third, install MySQL
Run the command prompt as an administrator, switch to MySQL bin directory, enter mysqld install command (note mysqld instead of mysql) Enter, you can install MySQL, as shown in the following figure:
The installation is successful if the prompt is as follows:
Start MySQL Service
After MySQL is installed, you can enter net start mysql to start MySQL, enter net stop mysql to close MySQL service, or manually start/close MySQL service in service;
V. Configuring environmental variables
Although MySQL is installed successfully, it is troublesome to switch to:\mysql-5.7.17-winx64 every time to perform related operations. After configuring environment variables, MySQL can be operated conveniently. Right click on 'Computer'->' Properties'->'Advanced System Settings'->'Environment Variable', find path under system variables, click Edit button to enter Edit Path dialog box, add bin directory under MySQL decompression path in front of variable value, mine is D:\mysql-5.7.17-winx64\bin;, pay attention to add English semicolon at the end, confirm to configure environment change.
VI. Errors and precautions in installation process
When I started MySQL service after successful installation, the service failed to start, prompt: MySQL service failed to start service did not report any errors please type NET HELPMSG 3534 for more help, as follows:
Solution: After installing MySQL, open the cmd command window, and enter the bin directory in the MySQL installation directory, and then enter the following command Enter: mysqld --initialize-insecure --user=mysql
After executing the above command, MySQL will build a data folder and build a default database. The login user name is root and the password is empty. After that, you can start the mysql service by commanding net start mysql.
Note: MySQL upgraded to version 5.7 does not have a data folder. Executing mysqld --initialize-insecure --user=mysql will automatically create a new data folder.
About mysql installation can not start the service solution to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.