In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1: download MySql
Download address on the official website: https://dev.mysql.com/downloads/mysql/
Select the corresponding download file. (my computer is 64-bit, so this download is a 64-bit download file)
2: install MySql
Open the download file and extract it to the specified file directory. (the directory I extracted here is D:\ mysql-5.7.21-winx64)
Open the extracted MySql file and create a my.ini (mysql configuration file) in the root directory
The my.ini file is as follows:
(it is recommended to copy and paste the following file directly)
Here, you need to change the paths of basedir and datadir to the decompression path of mysql.
[mysql]
# set mysql client default character set
Default-character-set=utf8
[mysqld]
# set port 3306
Port = 3306
# set the installation directory of mysql
Basedir=D:\ mysql-5.7.21-winx64
# set the storage directory of the data in the mysql database
Datadir=D:\ mysql-5.7.21-winx64\ data
# maximum number of connections allowed
Max_connections=200
# the character set used by the server defaults to the 8-bit coded latin1 character set
Character-set-server=utf8
# default storage engine to be used when creating new tables
Default-storage-engine=INNODB
Locate the CMD command prompt and right-click to run as an administrator
Enter the MySQL subdirectory bin
Enter: mysqld-- install (install) mysqld-- initialize (initialize) net start mysql (run)
3: set the MySql login password
As early as in previous versions of the mysql root account, the default password is not empty, if you log in with an empty password, you will definitely report an error.
Password setting steps:
Add "skip-grant-tables" at the end of the my.ini file to save the file and restart the mysql service cmd to enter the mysql-bin directory, enter mysql-u root-p, and enter enter. At this time, you do not need a password to log in and reset the password. Enter use mysql enter update user set authentication_string=password ("newPassword") where user= "root"; (in the new version, the password field of mysql database is changed to authentication_string) delete "skip-grant-tables" at the end of the my.ini file, save the file and restart the mysql service, and you can log in to the root account with the new password
Installation completed
Another way to set the MYSQL password.
After the mysql installation is completed, open the data folder in the mysql installation directory. There is a .err file inside. If you open it with notepad, you can see that there are lines inside.
A temporary password is generated for root@localhost: xxxxxxxx
Localhost: this is the default password. You can log in by copying this password.
The password must be reset after a successful login, otherwise the following line of error will be prompted all the time.
You must reset your password using ALTER USER statement before executing this statement.
Execute the following command to reset the password and you can use it normally. You can refer to the screenshot below.
SET PASSWORD = PASSWORD ('NEW PASSWORD')
The above is the detailed explanation and integration of the mysql download and installation process introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!
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.