mysql

作者: HaoDongZ | 来源:发表于2019-03-07 15:48 被阅读0次
1. mysql 忘记root 密码    mysqld_safe --skip-grant-tables & 
    UPDATE mysql.user SET authentication_string = PASSWORD('MY_NEW_PASSWORD') WHERE User = 'root' AND Host = 'localhost';
FLUSH PRIVILEGES;
登录mysql 重新设置密码 SET PASSWORD = PASSWORD('cMY_NEW_PASSWORD');
FLUSH PRIVILEGES;
2. create database wordpress default character set utf8 collate utf8_general_ci;
3. grant all privileges on wordpress.* to wordpress@'localhost' identified by'PASSWORD';
mysql8
1.Navicat连MySql8报错的问题

用mysql命令行登陆mysql,执行以下命令,修改加密方式

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

mysql> FLUSH PRIVILEGES;

2.允许远程连接Mysql8

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'root';

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;

mysql> flush privileges;

![image.png](https://img.haomeiwen.com/i15537910/a32ba4b05649c616.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

相关文章

网友评论

      本文标题:mysql

      本文链接:https://www.haomeiwen.com/subject/uqocpqtx.html