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

Mysql8.0 binary installation

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Mysql8.0 binary installation

1. Create directory authorization

Groupadd mysql

Useradd mysql

Mkdir-p / usr/local/mysql/

Mkdir-p / usr/local/mysql/data

Mkdir-p / usr/local/mysql/etc

Mkdir-p / usr/local/mysql/log

Chown-R mysql:mysql / usr/local/mysql/

two。 Configuration parameter file:

Cat > / usr/local/mysql/etc/my.cnf show variables like'% valid%pass%'

Mysql > create user root@'%' identified by 'abc123'

Mysql > show variables like'% valid%pass%'

Mysql > alter user root@'localhost' identified by 'abc123'

Mysql > show variables like'% valid%pass%'

-- create a user who can log in remotely:

Mysql > create user root@'%' identified by 'abc123'

Mysql > grant all privileges on *. * to root@'%' with grant option

Mysql > flush privileges

# create account password

CREATE USER `root` @ `127.0.0.1` IDENTIFIED BY 'shsnc\!\ @\ #'

CREATE USER `root` @ `% `IDENTIFIED BY 'shsnc\!\ @\ #'

# Grant permissions

GRANT ALL ON *. * TO `root` @ `% `WITH GRANT OPTION

# Delete permission

REVOKE all privileges ON databasename.tablename FROM 'username'@'host'

# change password

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

Mysql8 change password

Clear the password

UPDATE user SET Password = PASSWORD ('shsncboys started recently') WHERE user = 'root'

FLUSH privileges

Change the password (note that you can't change the table directly)

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY "shsnc\!\ @\"

FLUSH privileges

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