当前位置:网站首页>mysql5.7.x 数据授权导致1141
mysql5.7.x 数据授权导致1141
2022-04-22 05:54:00 【GreatorMan】
基于mysql5.7.x
1、数据库备份,后修改配置文件,新增如下配置:
skip-grant-tables 跳过表的权限验证,用户可以执行增删改查
2、然后重新启动mysql,
service mysqld restart
如果mysql没有注册,可以找到mysql/bin下面的mysqld,执行./mysqld restart 也是一样的
3、查看数据授权:
show grants;
4、修改权限,
在mysql数据库中执行:
UPDATE `mysql`.`user` SET `Host`='localhost', `User`='root', `Select_priv`='Y', `Insert_priv`='Y', `Update_priv`='Y', `Delete_priv`='Y', `Create_priv`='Y', `Drop_priv`='Y', `Reload_priv`='Y', `Shutdown_priv`='Y', `Process_priv`='Y', `File_priv`='Y', `Grant_priv`='Y', `References_priv`='Y', `Index_priv`='Y', `Alter_priv`='Y', `Show_db_priv`='Y', `Super_priv`='Y', `Create_tmp_table_priv`='Y', `Lock_tables_priv`='Y', `Execute_priv`='Y', `Repl_slave_priv`='Y', `Repl_client_priv`='Y', `Create_view_priv`='Y', `Show_view_priv`='Y', `Create_routine_priv`='Y', `Alter_routine_priv`='Y', `Create_user_priv`='Y', `Event_priv`='Y', `Trigger_priv`='Y', `Create_tablespace_priv`='Y', `ssl_type`='', `ssl_cipher`='', `x509_issuer`='', `x509_subject`='', `max_questions`='0', `max_updates`='0', `max_connections`='0', `max_user_connections`='0', `plugin`='mysql_native_password', `authentication_string`='*AF73E80C6232D0438D09FB61B287C556B4DFE144', `password_expired`='N', `password_last_changed`='2019-06-21 13:38:30', `password_lifetime`=NULL, `account_locked`='N' WHERE (`Host`='localhost') AND (`User`='root');
5、注释掉数据库配置文件中得配置
skip-grant-tables ,并重启MYSQL服务器;
6.查看
show grants;
版权声明
本文为[GreatorMan]所创,转载请带上原文链接,感谢
https://blog.csdn.net/GreatorMan/article/details/103035271
边栏推荐
猜你喜欢

Redis数据类型使用场景

Idea插件之RestfulToolkit

COPU助力北大研究生开源公选课丨开源PostgreSQL研发课程成功进入北京大学

直击痛点,九州云5G专网助力一汽富晟智慧物流建设

Kyushu cloud was selected into China's top 500 Xinchuang in 2021

MySQL basics 2

Postgreshub中文资源网介绍

Good news | Kyushu cloud was rated as "Zhejiang high tech enterprise research and development center"

Sort sort

并发专题详解
随机推荐
《信息系统项目管理师总结》第一章 项目整体管理
Solutions for minors protection in the social industry of digital beauty technology: guarding the "social circle" of minors
Kyushu cloud was selected into China's top 500 Xinchuang in 2021
Promise
Method of querying cumulative value in MySQL
mysql 外键约束
数美科技入选2021朝阳高科技高成长20强
Nacos源码启动报错解决方法
数美科技社交行业未成年人保护解决方案:守护未成年人的“社交圈”
PostgreSQL 13.3、12.7、11.12、10.17和9.6.22发布了!
async与await
Summary of redis core knowledge points (super detailed)
OpenInfra Live | 九州云黄舒泉当选Track Chair并带来精彩主题分享
使用PG_STAT_REPLICATION监视复制
Jasmine X4 tutorial instructions, graphic explanation tutorial
Postgreshub中文资源网介绍
One mountain is higher than another. Comparison of parameters between panda H3 and panda h3plus
数美科技荣获《银行家》“十佳智能风控管理创新奖”
获取日期之间的天数、获取中文日期、获得日期的下一个星期一的日期、获取工作日、获取休息日
Kyushu cloud, the brand with the most investment value of the year, was selected into the "2021 new economy annual peak list" of AI media