升级的mysql5.7修改完root账户密码后仍然无法登陆,查阅资料可能和user表的plugin 字段为空有关. 1.首先将my.ini中加入在[mysqld]节点上加skip-grant-tables 主要作用是:跳过表中的验证,可以无密码登陆. 2.登录之后查询plugin字段值: mysql> select plugin from user where user = 'root'; 执行结果plugin字段为空. 3.更新plugin字段为mysql默认值: mysql> update
1.修改数据库对指定用户和ip权限 a. IP为192.168.0.1的用户jack拥有对数据库datebase的表table的 增删改查权限, ,连接密码为password grant select,insert,update,delete,create,drop on database.table to jack@192.168.0.1 identified by 'password'; b. 192.168.0.1的用户jack拥有对数据库datebase所有表的所有操作权限,连接密码为p
参考:https://www.cnblogs.com/activiti/p/7810166.html # alter user 'root'@'localhost' identified by '123456' # 或者 update user set authentication_string = password('root'), password_expired = 'N', password_last_changed = now() where user = 'root';
1.my.ini文件,删除最后一行的"skip-grant-tables 2.执行"use mysql;",使用mysql数据库; 3.执行:update mysql.user set password=password("123456") where user="root" 4.grant all privileges on . to root@'%' identified by '123456' with grant option
一. 创建远程连接账号 1. 终端连接服务器 ssh -p 端口号 用户名@ip地址 例如:ssh -p 22 yyy@1.2.3.4 2.进入mysql mysql -u 用户名 -p 然后输入密码 3.创建远程账号 3.1 use mysql; 3.2 select User,authentication_string,Host from user; 3.3 create user 用户名@'%' identified by '密码' 3.4 grant all privileges on
[参考文章]:mysql修改root密码和设置权限 1. 修改密码 1.1 set password 登录mysql set password for 用户名@localhost = password('新密码'); 1.2 mysqladmin mysqladmin -u用户名 -p旧密码 password 新密码 1.3 user表 mysql> use mysql; mysql> update user set password=password('新密码') where user='