Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Graphic and text tutorial of mysql 8.0.13 installation and configuration method under win10

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Mysql 8.0.13 installation configuration method to share with you, I hope it will be helpful to you.

1. Download the mysql-8.0.13 installation package

Download address, select zip installation package to download.

2. Extract to the directory you want to install

3. Create a my.ini configuration file

[mysqld] # Port port = 3306#mysql installation directory basedir = E:/amp/mysql8#mysql data storage directory datadir = E:/amp/mysql8/data# maximum number of connections max_connections = 102 "by default the server uses the character set character-set-server = utf8mb4# default storage engine default-storage-engine = INNODB# service unique identification server_id =" whether slow query slow_query_log is enabled = "specify slow query day The path and name of the log file slow_query_log_file = slow.log#SQL statement running time exceeds this value will be recorded long_query_time = 1 turn on binlog log log-bin = mysql-bin#sql mode sql_mode = NO_ENGINE_SUBSTITUTION STRICT_TRANS_TABLES # pay attention here The default password verification plug-in for mysql8 has been changed to caching_sha2_password# to be compatible with the previous one. Change it back to mysql_native_passworddefault_authentication_plugin = mysql_native_password [mysql] default-character-set = utf8mb4 [client] port = 3306default-character-set = utf8mb4

4. Run the command line program as an administrator, enter the bin directory of mysql, and run the installation instructions

Without a password:

Mysqld-initialize-insecure-console

Automatically randomly generate passwords:

Mysqld-initialize-console

Install and start the service:

Mysqld-- install [service name] net start [service name]

5. Log in to mysql using the randomly generated password above and change the root password

Mysql-u root-p

Before mysql8.0.4, you can directly use the following methods:

SET PASSWORD=PASSWORD ('new password')

Mysql8.0.4 can only use the following ways from the beginning:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' New password

Query user table information

Select host,user,plugin from mysql.user

Because mysql8.0 cancels the syntax for creating users by grant directly, you must create user before grant.

Create user 'username' @ 'host' identified with mysql_native_password by 'password'

Authorize all permissions:

Grant all privileges on *. * to 'username' @ 'host'

Set permissions as needed:

Grant select,insert,update,delete,create,drop,alert on *. * to 'username' @ 'password'

View user permissions:

Show grants for 'username' @ 'host'

6. If necessary, you can add the bin directory of mysql to the environment variable.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report