Posted by silurius on June 20, 2006 at 3:32pm
Jump to:
| Project: | System Information |
| Version: | 4.7.x-1.0 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Not sure if this was intended or not (I myself would prefer a tidy note) but got this in my environment:
user warning: There is no such grant defined for user 'MYDBUSER' on host 'MYDBHOST.MYSITE.com' query: SHOW GRANTS FOR "MYDBUSER"@"MYDBHOST.MYSITE.com" in /home/...PATH.../MYSITE.com/...PATH.../drupal/includes/database.mysql.inc on line 120.
Not complaining really - this is a very useful module.
Comments
#1
Need some info
1. What MySQL version do you use ?
2. Do you use a MySQL port in $db_url in settings.php ?
#2
Drupal 4.7.2MySQL 5.0.18 / 5.0.1.6 client
PHP 5.1.2
CURL enabled
No port defined in %db_url.
#3
I had this message too on a new install.
Using my server's Plesk control panel (rather than a tool like phpMyAdmin) to create the DB and user resulted in a very "unprivileged" user (all "no" radio buttons in the phpMyAdmin view on this user). I then tweaked the user to have various typical privileges and reloaded MySQL. This resulted in the error message going away.
The red color and technical details of the MySQL error message might freak a non-tech admin out. So if this error condition is non-critical, it might be a good idea, as silurius suggests, to trap this condition and provide a "kinder and gentler" message that explains the situation and what its impact is. We might even recommend a minimal set of useful privileges for a Drupal MySQL user record. (Not being a DBA/eng, I know I err on the side of over-privileging. It would be useful to know if there is a "just right" set to use.)
#4
Can't reproduce it :(
#5
I've got this too. It surely must relate to the default permission set granted to mysql db users by default, which can obviously be different on a per host basis, it would seem?
#6
I get this error too;
There is no such grant defined for user 'user' on host 'localhost' query: SHOW GRANTS FOR "user"@"localhost" in C:\Data\drupal\includes\database.mysql.inc on line 121.My System is;
Windows 2003 Server
IIS 6
PHP 4.4.1
MySQL 4.1.20
Drupal 4.7.5
However if I log into my server, log into MySQL at the command line with the same user as is used for Drupal. I.e;
mysql -uuser -ppasswordThen just type
SHOW GRANTS;I get the permissions listing as I should. However looking in the System Info module output it says that I don't have theCREATE TEMPORARY TABLEorLOCK TABLEpermissions which is not correct.#7
I also just got the same error when I installed, activated and used the systeminfo module. Below is what the SystemInfo module displayed, as well as what myPHPAdmin reports.
DreamHost
I'm hosting my site on DreamHost and used their MySQL goodie to create the database. According to the mySQL User management page, my dbuser has all possible priviledges and may connect to the database from the following hosts:
%.dreamhost.com
%.mydomain.net
SYSTEM INFO
Information of the drupal install and system environment.
user warning: There is no such grant defined for user 'dbadmin' on host 'db.mydomain.net' query: SHOW GRANTS FOR "dbadmin"@"db.mydomain.net" in /home/.delmonte/mydomain/www/drupal-4.7.5/includes/database.mysql.inc on line 121.
<b><u>Drupal</b></u>Version 4.7.5
Sites directory www.mydomain.net
Url http://www.mydomain.net
Database prefix
Web Server
Type Apache
Version 2.0.54
PHP Interface CGI
PHP
Version 5.1.2
Magic Quotes GPC Off
Magic Quotes Runtime Off
Memory Limit
Register Globals Off
Safe Mode Off
Session Cache Limiter none
Session Save Handler user
Upload Max Filesize 7M
Extensions
CURL Support Enabled
GD Version bundled (2.0.28 compatible)
FreeType Support Enabled
XML Support Enabled
Zip Support Disabled
Zlib Support Enabled
Database
Type MySQL
Version 5.0.24a-standard-log
Charset utf8
Collation utf8_general_ci
Create Temporary Tables Disallowed
Lock Tables Disallow
myPHPAdmin - "Show Grants" SQL result
Host: db.mydomain.net
Database: concoursnet_d475
Generation Time: Feb 06, 2007 at 09:21 AM
Generated by: phpMyAdmin 2.8.2.4 / MySQL 5.0.24a-standard-log
SQL query: show grants ;
Rows: 2
Grants for dbadmin@64.111.96.0/255.255.224.0
GRANT USAGE ON *.* TO 'dbadmin'@'64.111.96.0/255.255.224.0' IDENTIFIED BY PASSWORD '7406857f5fd82123'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `concoursnet_d475`.* TO 'dbadmin'@'64.111.96.0/255.255.224.0'
#8
I still cannot reproduce this bug on my machines but it should be fixed in version 1.1 and 2.x.
#9