In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This download and installation is mysql 5.7.22 (zip compressed version).
One: download
1. Download mysql version 5.7.22 from the official website: https://dev.mysql.com/downloads/mysql
Two: installation
two。 Extract the downloaded mysql and put the decompressed database on disk E (you can choose the appropriate disk according to the actual situation)
2.1 configure environment variables:
Winserver server environment variable location: server manager-local server-computer name-advanced-environment variable
Add the mysql bin file path after the system variable path.
For example: E:/mysql-5.7.22-winx64\ bin
2.2 configure mysql
If the mysql configuration file mysql-default.ini exists in the directory, modify it directly. Does not exist, or create a new configuration file, such as my.ini
The configuration file is modified as follows:
Basedir = E:\ mysql-5.7.22-winx64 (mysql root directory)
Datadir = E\ mysql-5.7.22-winx64\ data (mysql database storage directory)
Port = 3306 (mysql is open to the public. Default is 3306, which can be modified)
2.3 start mysql
2.3.1 start cmd
2.3.2 switch disk, command: e:
2.3.4 enter the bin directory of mysql, and command: cd E:\ mysql-5.7.22-winx64\ bin
2.3.5 install the mysql service, command: mysql-install
Returned result: Service successfully installed
Win+r executes services.msc to view the service to see if the mysql service has appeared.
If it cannot be installed, you need to install the MSVCR120.dll service first:
Solution: download Microsoft officially and install vcredist_x64.exe and vcredist_x86.exe respectively:
Https://www.microsoft.com/zh-cn/download/details.aspx?id=40784
2.3.6 initialize mysql and specify the superuser password, command: mysql-- initinalize-insecure-- user==mysql
2.3.7 start the mysql service, command: net start mysql
Can also be found in the service, right-click to open the service.
2.4 problems and Solutions
2.4.1 when net start mysql starts the mysql service, it fails to start and the result is returned: system error 2 the system cannot find the specified file
Execute services.msc to view the mysql service, right-click on the service-attribute-General, and check whether the executable path is correct. If not, it may be caused by switching the drive letter when starting mysql. Execute the command: mysqld-remove to remove the mysql service and then reinstall.
2.4.2 when net start mysql starts the mysql service, the startup fails and the result is returned: the mysql service cannot be started and the service does not report any errors. Type NET HELEPMSG**** for more help.
Look for a file with the suffix .err in the previously configured datadir path (if the specified path cannot find the .err file, create the path first, then start the path, and then start the service), which records the mysql error log. If the error file in the log is [ERROR] Can't open the mysql .Please run mysql _ upgrade to create it, clear the datadir file first, and then execute the command initialization: mysqld-- initialize-insecure-- user=mysql.
Three: log in
3.1Login to mysql
3.1.1 start cmd
3.1.2 login, command: mysql-u root-p because the initialization superuser did not specify a password, so the password is empty, enter directly, you will see the welcome message: Welcome to the MySQL monitor
3.2 change the root password
3.2.1 View all the initial databases, where the mysql library is the library that has just been initialized and contains user login information
3.2.2 Select the database, command: use mysql
3.2.3 check existing users and passwords. Note: mysql5.7 user password field is authentication_string, prior to 5.7is password.
3.2.4 modify root password
Update user set authentication_string = password ('1234565') where user = 'root'; (update user root password to 12345)
Flush privileges; (refresh the system permissions related table, note: if you do not execute this command, only the authentication_string in the user user table will be modified, and the login password will not be changed)
Four: enable remote access
4.1 query user host
Host: localhost means only local logins are allowed; host: ip: only specified ip users are allowed to log in; host:% allows arbitrary ip logins
4.2 New users that allow remote connections to the mysql database
Grant all on *. * to sa@'%'indentified by '123456'with grant option
Flush privileges
Create a user with a login name of sa and a password of 123456 for any ip access (% can be replaced with ip)
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.