MySql 数据库常用设置
程序员文章站
2022-03-22 17:49:34
...
1、设置远程连接
grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option; flush privileges; Mysql8中的使用方式 GRANT ALL ON *.* TO 'root'@'%';
2、重新设置root密码
update user set password=PASSWORD('新密码') where user='root'; flush privileges;