In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Extract the files to a directory
This is the decompressed directory.
Take the my.ini file into the test.
Double-click to open my.ini
Find these two lines and change them to your own decompression path to save.
Right-click this computer property
Find the advanced system settings configuration environment variable
The new variable value of the environment variable is the path to extract the file.
Path Click path Edit
New
Then open cmd as an administrator to enter the file path
Open a command line window and type: mysqld-- install
This command is to install the service. After execution, you will be prompted for success in English. At this time, you can see the MySQL service in your windows service. Remove the service command: mysqld remove
Then enter:
Mysqld-initialize-console
This step is performed because there is no data folder in MySQL5.7, so you need to use these commands to generate the data folder and initialize the random login password
After execution, there will be a large piece of English. It doesn't matter if you don't understand it. At the end, you see a [email protected]: followed by a series of alphanumeric symbols, which is a random password automatically generated by MySQL for you. To write it down, root is the login user name, which we need to use when we log in to the MySQL database later (or press enter directly to enter)
Start the mysql service
Can only be used after installation when the mysql service is started
Enter on the command line:
Net start mysql
Change the default password
Before the system randomly generated password can only be used to log in, and then change the password, do not use mysql, can only be used after modification
After the mysql service is started
Command line input: mysql-u root-p
Then you will be prompted to enter the password, which is the password generated earlier.
The successful login is the image above. Enter the following command in turn:
Use mysql; update user set authentication_string=password ("newpassword") where user= "root"; flush privileges
At this point, mysql has been fully installed and configured, and you can use it directly. As shown in the figure, you can view the original databases.
Command to stop the service: exit
After that, log in to mysql again and directly enter the modified password.
Error report during installation and matters needing attention
When I started the MySQL service after a successful installation, the service could not start. Hint: the MySQL service could not start the service without reporting any errors. Please type NET HELPMSG 3534 for more help, as follows:
Solution: after installing MySQL, open the cmd command window and go to the bin directory in the MySQL installation directory
Then enter the following command to enter:
Mysqld-initialize-insecure-user=mysql
After executing the above command, MySQL will create a data folder and set up the default database
The login user name is root, the password is empty, and then you can start the mysql service with the command net start mysql.
Note: there is no data folder when MySQL is upgraded to version 5.7. executing the mysqld-- initialize-insecure-- user=mysql command will automatically create a new data folder.
The above is all the knowledge points about the successful installation of mysql and the successful initialization of password operation on the first installation. Thank you for your reading and support.
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.