首页 > 数据库 >Navicat操作mysql遇问题1142-create command denied to user×××的解决

Navicat操作mysql遇问题1142-create command denied to user×××的解决

时间:2023-04-04 23:23:34浏览次数:37  
标签:1142 GRANT create denied Navicat sec mysql root 0.00

原因: root@%表示 root用户通过任意其他端访问操作被拒绝!
授权即可:给用户添加CREATE,DROP权限。

可以查看用户授权信息:show grants;

mysql> show grants;
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' WITH GRANT OPTION |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION                                                                           |
+----------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

Mysql命令:

mysql> grant all privileges on *.* to 'root'@'%' identified by 'xxx此处为密码xxx' with grant option;
Query OK, 0 rows affected (0.00 sec)
--刷新权限
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

重启mysql容器,重新root客户端登录,Navicat可以操作新增删除操作了。

标签:1142,GRANT,create,denied,Navicat,sec,mysql,root,0.00
From: https://www.cnblogs.com/reallife/p/17288239.html

相关文章

  • cpp: create class
    PigInfo.h#ifndefPIGINFO_H#definePIGINFO_H#include<iostream>#include<string.h>#include<math.h>usingnamespacestd;/*实体类https://learn.microsoft.com/zh-cn/cpp/standard-library/cpp-standard-library-header-files?view=msvc-170......
  • 【转载】failed to open /dev/dri/renderd128 permission denied
    原文地址:https://juejin.cn/s/failed%20to%20open%20%2Fdev%2Fdri%2Frenderd128%20permission%20denied  =======================================================   这是在Linux系统中遇到的一个常见错误,表示当前用户没有权限打开设备文件/dev/dri/renderd128......
  • php遇到failed to open stream: Permission denied
    Uncaughtexception'think\exception\ErrorException'withmessage'error_log(/www/api/public/../runtime/log/201611/29.log):failedtoopenstream:Permissiondenied'in/www/api/thinkphp/library/think/log/driver/File.php当赋权限后当天可以,但是......
  • 【已解决】configure: error: C++ compiler cannot create executables
    1.背景 centos7在升级gccconfigure的时候出现的问题A100-01-$build#../configure--prefix=/usr/local/gcc--enable-threads=posix--disable-checking--disable-multilib--enable-languages=c,c++checkingbuildsystemtype...x86_64-pc-linux-gnucheckinghosts......
  • bash: /dev/null: Permission denied
    现象:  问题:一般而言,Permissiondenied问题可以通过reset权限chmod666/dev/null来解决,但在Ubuntu中,系统会自动将设备的权限还原为420crw--w----1roottty1,3Aug2611:46/dev/null。所以常用的方法并不能解决该问题。解决方案-bash:/dev/null:Permissio......
  • 修改头像,CreateModelMixin, RetrieveModelMixin, UpdateModelMixin内部的方法进行重写
    1.假设GET请求和POST请求,用的序列化类不一样,如何处理__ser.py 2.假设GET请求和POST请求,用的序列化类不一样,如何处理__views.py  3.假设GET请求和POST请求,用的序列化类不一样,如何处理总结  4.用户注册测试  5.查询用户名和用户头像  6.修改用户头像  7......
  • linux里 cannot create /www: permission denied
    这个错误信息表明你尝试在根目录下创建一个名为www的目录,但是你没有足够的权限来完成这个操作。在Linux中,根目录(/)拥有系统管理员账户(root)的特殊权限,普通用户默认没有在根......
  • 解决pip命令无法执行Python问题Unable to create process using...
    解决方法删除:Python37\Lib\site-packages\pip-19.1.dist-info删除:Python37\Scripts\pip*.exe(所有pip开头的)安装:python-mpipinstall--upgradepip......
  • django 批量创建bulk_create和批量更新bulk_update
    一、为什么要用bulk_create和bulk_update以创建1万个对象为例,相比save()循环和save()事务,bulk_效率是save()循环保存的百倍,是事务处理的近10倍:#创建model(MyModel),此处......
  • Node.js: fs.readFile/writeFile 和 fs.createReadStream/writeStream 区别
    1.先说说各自的用法:HowdoIreadfilesinnode.js?fs=require('fs');fs.readFile(file,[encoding],[callback]);//file=(string)filepathofthefiletore......