简体   繁体   English

Mysql Workbench错误1044/1142:访问/授权命令被拒绝给用户``@'localhost'

[英]Mysql workbench Error 1044 / 1142: Access / Grant command denied to user ''@'localhost' for

I work on a Mac OSX 10.6.8, and I use Mysql Workbench to learn how to handle databases (I'm a beginner as far as databases go). 我使用Mac OSX 10.6.8,并且使用Mysql Workbench学习如何处理数据库(就数据库而言,我是一个初学者)。 Now, I have created a few users, and I'm trying to toy around with giving these users' rights, and let them interact with each other by granting and revoking each other various rights. 现在,我已经创建了一些用户,并且我在尝试赋予这些用户权利,并通过授予和撤消其他各种权利使他们彼此互动。

I have logged in via the root user and supposedly given all "toy users" their initial rights by using the necessary grant queries (verified via queries using "show grants"), but then I try to log in as the various users. 我已经通过root用户登录,并假定使用必要的授权查询(通过使用“ show Grants”的查询进行了验证)为所有“玩具用户”赋予了其初始权限,但随后我尝试以各种用户身份登录。 Let's say two of these users are named "Sofia" and "Martin", and I want Sofia to give Martin the update- and insert-rights to a table "Book". 假设其中两个用户分别名为“ Sofia”和“ Martin”,我希望Sofia为Martin提供对表“ Book”的更新权和插入权。 Sofia was given the necessary privileges from my root-login unless I am mistaken, so I write (when logged in as Sofia) 除非我没有记错,否则从我的root登录名开始,索非亚都获得了必要的特权,所以我写(以索非亚身份登录时)

grant update, insert on Book to Martin;

This yields the error 这产生了错误

Error 1142: GRANT command denied to user ''@'localhost' for table 'book' 错误1142:表'book'的用户'@'localhost'被拒绝使用GRANT命令

Further, I try to figure out what rights Sofia does have, and enter the following query 此外,我试图找出什么样的权利索非亚确实有,并输入以下查询

show grants for Sofia;

when logged in as Sofia. 以索非亚身份登录时。 The response: 响应:

Error 1044: Access denied to user ''@'localhost' for database 'mysql' 错误1044:对用户'@'localhost'的数据库'mysql'访问被拒绝

What is this mysterious ''@'localhost' user the errors are talking about? 错误正在谈论的这个神秘的“ @'localhost”用户是什么? What should I do to make things work? 我应该怎么做才能使事情正常?

grant update, insert on Book.* to `Martin`@`%`;

please click edit to see the back-ticks 请单击“编辑”以查看反向提示

See the MySQL manual page on SHOW GRANTS 请参阅SHOW GRANTS上的MySQL手册页

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误1044(42000):用户'@'localhost'对数据库'mysql'的访问被拒绝 - ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql' 错误 1044 拒绝用户 ''@'localhost' 访问数据库 - Error 1044 access denied for user ''@'localhost' to database MySQL 错误:#1142 - SELECT 命令拒绝用户 - MySQL Error: #1142 - SELECT command denied to user ERROR 1044(42000):用户''@ localhost'拒绝访问 - ERROR 1044 (42000): Access denied for user ''@'localhost' 在MySQL工作台中执行GRANT命令时拒绝用户访问 - Access denied for user while executing the GRANT command in MySQL workbench 如何使用命令提示符创建mysql数据库? 我收到错误ERROR 1044(42000):用户''@ localhost'拒绝访问数据库'ivs' - How to create mysql database using command prompt? I'm getting error ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'ivs' MySQL 1044(42000):使用Mac对用户'@'localhost'到数据库'mysql'的访问被拒绝 - MySQL 1044 (42000): Access denied for user ' '@'localhost' to database 'mysql' with Mac mysql> 使用 mysql; 但是......错误1044(42000):用户''@'localhost'对数据库'mysql'的访问被拒绝 - mysql> use mysql; but … ERROR 1044 (42000): Access denied for user '' @ 'localhost' to database 'mysql' 错误 1044 (42000):拒绝用户 'root'@'localhost' 访问数据库 (MySQL - MariaDB) - ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database (MySQL - MariaDB) 错误1044(42000):用户''@localhost对数据库的访问被拒绝 - ERROR 1044 (42000) : Access denied for user ' '@localhost to database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM