In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about what happens when the mysql service fails to start when mysql5.7.18 is installed. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
MySQL is a very powerful relational database. However, some beginners encounter all kinds of difficulties when installing the configuration, so let's not talk about the installation process here, but talk about the configuration process. When downloading mysql on the official website, there are msi format and zip format. Msi can run the installation directly, and zip can extract it to the directory address you like. When installing both, configuration is required to use them. The following description is mainly the default address in msi format: C:\ Program Files\ mysql-5.7.18-win32.
One. After installation or decompression, you need to configure environment variables. The process is as follows: my computer-> Properties-> Advanced system Settings-> Advanced-> Environment variables. Click path in the system variable and select Edit. Append "C:\ ProgramFiles\ mysql-5.7.18-win32\ bin;". What needs to be meant here is, not coverage! And it's best to add it at the front. The English semicolon ";" cannot be omitted. (it can also be inserted in the middle, but be sure to add it after ";". )
Click the start menu, search for cmd.exe, and left-click to run as an administrator. Be sure to run as an administrator!
If you run cmd directly, there will be an error due to insufficient permissions when typing mysqld-install: Install/Remove of theService Denied!
When you enter mysqld-install correctly and press enter, The service already exists will be displayed!
Then enter net start mysql to start the server, if it shows that the server failed, as shown in the following figure.
This is because there is no data folder in C:\ Program Files\ mysql-5.7+ directory above version 5.7. here, remember not to copy the data folder of other versions of mysql, but type mysqld--initialize-insecure-- user=mysql in the window, note that there is a space before "-" and then enter. (it takes half a minute to wait to see how fast the computer is)
(in the C:\ ProgramFiles\ mysql-5.7.18-win32 directory, there is no data folder. The following figure)
Note: in version 5.7 below, you need to modify the my-default.ini in the C:\ ProgramFiles\ mysql-5.* directory, right-click to edit it, and set the
Basedir=...
Datadir=... ..
Modify to
Basedir= C:\ Program Files\ mysql-5.*
Datadir= C:\ Program Files\ mysql-5.*\ data
OK, where "C:\ Program Files\ mysql-5.*" is determined by the actual installation location
IV. In the C:\ ProgramFiles\ mysql-5.7.18-win32 directory, show that the data folder was created successfully.
After you have created the data, type mysqld-install, and then press enter (if it is successful at step 3, you do not have to type it again)
five。 After the service starts successfully, you can log in. Enter mysql-u root-p and press enter, and Enter password appears. Because no login password is set, you don't need to enter anything, just press enter.
After entering directly, as shown in the following figure, the mysql configuration has been successful!
Thank you for reading! This is the end of the article on "what to do if the mysql service fails to start when mysql5.7.18 is installed". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.