|
Previous
·
Next
|
xootom
|
Date: 7/3/2007 11:39 am · Subject: SQLForm says Databaselink does not have enough privileges · Rating: 7
Trying to add an SQLForm to a page, but receive the following. Some error(s) occurred: - Databaselink does not have enough privileges (Needs ALTER, CREATE, DELETE, INDEX, INSERT, SELECT, UPDATE)
I
have checked the database links in admin and added all these as
keywords, and ensured that the mysql user has all privileges on the
database. SQLReports are working fine through the same link.
|
| Back to Top |
Rate [ | ]
|
| |
colink
|
Date: 7/3/2007 11:42 am · Subject: Re: SQLForm says Databaselink does not have enough privileges · Rating: -2
In your database, please execute this statement and post the answer back here: show grants for current_user
|
| Back to Top |
Rate [ | ]
|
| |
xootom
|
Date: 7/3/2007 11:51 am · Subject: Re: SQLForm says Databaselink does not have enough privileges · Rating: 0
GRANT USAGE ON *.* TO 'base'@'localhost' IDENTIFIED BY PASSWORD '*xxxxx' GRANT ALL PRIVILEGES ON `base%`.* TO 'login'@'localhost'
|
| Back to Top |
Rate [ | ]
|
| |
colink
|
Date: 7/3/2007 3:34 pm · Subject: Re: SQLForm says Databaselink does not have enough privileges · Rating: 2
We'll begin working on the bug. In the short term, if you change the grants to just base.* instead of base%.*, it should begin working right away.
|
| Back to Top |
Rate [ | ]
|
| |
xootom
|
Date: 7/5/2007 10:51 am · Subject: Re: SQLForm says Databaselink does not have enough privileges · Rating: 0
Thank you, I have created a new database and login specific to it, which is working.
|
| Back to Top |
Rate [ | ]
|
| |
knowmad
|
Date: 7/16/2007 1:41 pm · Subject: Re: SQLForm says Databaselink does not have enough privileges · Rating: 0
Colin, There is a bug in _databaseLinkHasPrivileges() where it does not return a true value if grants are anything but ALL PRIVILEGES. I have attached a patch. William
Attached Files
|
| Back to Top |
Rate [ | ]
|
| |
colink
|
Date: 7/16/2007 4:13 pm · Subject: Re: SQLForm says Databaselink does not have enough privileges · Rating: 0
William, Thanks for pointing that out. When I ported the code from the SQLForm to the DatabaseLink, I noticed that, too and have already fixed it. The relevant svn revs, for reference, are 4359 (for branch/WebGUI_7.3) and 4348-4350, 4358 for HEAD. The really cool thing is now you can debug these things in a test that regressable so nothing old will get broken as new fixes are added.
|
| Back to Top |
Rate [ | ]
|
| |
colink
|
Date: 7/16/2007 4:09 pm · Subject: Re: SQLForm says Databaselink does not have enough privileges · Rating: 1
Fixed in 7.3.21 Note for future privilege bugs. There is now a test in t/DatabaseLink.t where you can enter in new DSNs or new grant messages and debug them programmatically, rather than trying to setup databases and the like.
|
| Back to Top |
Rate [ | ]
|
| |