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 > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article records the mysql 8.0.17 installation and configuration tutorials, for your reference, the specific contents are as follows
1. Download the installation package
Download address: install package
two。 Extract the installation package to the directory
Unzipped to D:\ mysql-8.0.17-winx64 here
(some of the files in the figure are generated by subsequent installation steps)
3. Configure environment variables
My computer → right-click the → properties → advanced system settings → environment variable
Click "Edit" to add the address of the bin folder of MySQL
4. Configuration file
Create a new my.ini file in the MySQL folder D:\ mysql-8.0.17-winx64 and write the following information:
(pay attention to change the path for different installation addresses)
[mysqld] # set port 3306 port=3306# set mysql installation directory basedir=D:\\ mysql-8.0.17-winx64 # remember to use double slash\\, single slash I will make mistakes here, but look at other people's tutorials, there are plenty of single slashes. Try it yourself # set the directory where the data of the mysql database is stored datadir=D:\\ mysql-8.0.17-winx64\\ Data # here is the same as above # maximum number of connections max_connections=200# allows the number of connection failures. This is to prevent anyone from attempting to attack the character set used by the max_connect_errors=10# server of the database system from this host. By default, the default storage engine default-storage-engine=INNODB# that UTF8character-set-server=utf8# will use when creating a new table uses the "mysql_native_password" plug-in authentication default_authentication_plugin=mysql_native_ password [MySQL] # to set the mysql client default character set default-character-set=utf8 [client] # setting. Set the port port=3306default-character-set=utf8 used by default when the mysql client connects to the server
5. Install MySQL
Open cmd as an administrator, go to the MySQL installation path, and enter the following command to initialize the database:
Mysqld-initialize-console
Be careful! There is a paragraph in the output of the execution:
[Note] [MY-010454] [Server] A temporary password is generated for root@localhost: zyNrYHh3yF-E
Where root@localhost: the "zyNrYHh3yF-E" after it is the initial password (without the first space). You need to remember this password before you change it, and you need to use it for subsequent logins.
If the shutdown is fast, or if you don't remember, it's okay. Delete the initialized datadir directory, execute the initialization command again, and it will be regenerated. Of course, you can also use security tools to force you to change your password, and you can do whatever you want.
Reference: data-directory-initialization-mysqld
6. Installation service
Enter in the MySQL installation directory D:\ mysql-8.0.17-winx64\ bin
Mysqld-install
The original command should be: mysqld-- install [service name]
However, the following service name can be left unwritten, and the default name is mysql. Of course, if you need to install multiple MySQL services on your computer, you can distinguish them with different names, such as mysql5 and mysql8.
7. Start the MySQL service
Start MySQL:
Net start mysql
(stop the service by ordering net stop mysql. Uninstall the MySQL service by sc delete MySQL/mysqld-remove command)
8. Change password
Enter: in the MySQL installation directory D:\ mysql-8.0.17-winx64\ bin:
Mysql-u root-p
Enter the previous password to enter MySQL.
Execute the command in MySQL:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' New password
Change the password, pay attention to the end of the command; be sure to have, this is the syntax of mysql
Installation completed
You can check the database installed by default
Show databases
Look at the default MySQL user:
Select user,host,authentication_string from mysql.user
Administrator root's host is localhost, which means localhost login access only. If you want to allow other ip logins to be open, you need to add a new host. If you want to allow all ip access, you can directly modify it to "%"
Reference for other operations: MySQL creates users and authorizes
Wonderful topic sharing:
Installation tutorials for different versions of mysql
Installation tutorials for each version of mysql5.7
Installation tutorials for each version of mysql5.6
Installation tutorials for each version of mysql8.0
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support 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.