English 中文(简体)
我的ql忘记了那些被gged住的人:指挥官拒绝使用......%
原标题:mysql forgets who is logged in: command denied to user @ %
  • 时间:2011-06-29 21:40:55
  •  标签:
  • mysql

运行<代码>专门知识赠款;表示,我作为数据库中所有特权的用户挂牌。

履历:<代码> 错误没有显示我gged的用户名!

就这一指挥而言,我的sql忘记我是谁。 其他选修课以罚款。 谁能解释这一点? 如何确定? 感谢。

Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.5.13-log Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type  help;  or  h  for help. Type  c  to clear the current input statement.

mysql> show grants;
+---------------------------------------------------------------------------------------------------------------------+
| Grants for php@localhost                                                                                            |
+---------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO  php @ localhost  IDENTIFIED BY PASSWORD  *8F5FF90079BC601F8EA7C148475658E65A0C029D  |
| GRANT ALL PRIVILEGES ON `sunflower_work`.* TO  php @ localhost                                                      |
| GRANT ALL PRIVILEGES ON `news_demo`.* TO  php @ localhost                                                           |
| GRANT ALL PRIVILEGES ON `news_base`.* TO  php @ localhost                                                           |
+---------------------------------------------------------------------------------------------------------------------+
4 rows in set (0.00 sec)

mysql> show table status from sunflower_work;
ERROR 1143 (42000): SELECT command denied to user   @ %  for column  uid  in table  users 
mysql>

根据Tomalak的建议,我删除了用户,并以更充分的特权重新编号,没有密码。 问题依然存在。 我们现在看着这一点:

mysql> show grants;
+--------------------------------------------------+
| Grants for php@localhost                         |
+--------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO  php @ localhost  |
+--------------------------------------------------+
1 row in set (0.00 sec)

mysql> show table status;
ERROR 1143 (42000): SELECT command denied to user   @ %  for column  uid  in table  users 
mysql> 
最佳回答

这个问题很可能是你在你的数据库中拥有世界志愿人员。 这些观点可能带有特定的权利。

由于你能够用错误信息来说明,它抱怨的是different的用户,而不是你所贴的用户。 这是因为,大家可以说明如何确定看法必须研究什么权利。

当你去你的数据库时,尝试打字:

SHOW FULL TABLES IN sunflower_work WHERE TABLE_TYPE NOT LIKE  %table% ;

然后,你不妨研究那里的具体意见的权利。

问题回答

这里的答复帮助我解决了我的具体问题。 许多人感谢! 一种观点如上所述。

我陷入了麻烦,因为有关数据库是从一个有不同用户的偏远数据库的备份创建的。 用户I don t在当地有被打破的观点。 即便是根基也无法处理坠毁问题。

将DEFINER的观点改变为有效的当地用户,问题得到解决!

ALTER 
DEFINER =  a_valid_user @ localhost  
VIEW my_view
AS 
SELECT ..... 

号文件。

Many thanks again!

在程序进行之前进行图解。

如果你刚刚进口了一枚堆积薄膜,就删除这一进口和相关chem,并再次开始。

open the dump file in a text editor and delete all lines with the following content /*! ~~~~ DEFINER= root @ % SQL SECURITY DEFINER */

缩略语

这种办法是一个快速解决方案,仅用于发展环境。





相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签