Trying to add an SQLForm to a page, but receive the following.
Some error(s) occurred:
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.
In your database, please execute this statement and post the answer back here:
show grants for current_user
GRANT USAGE ON *.* TO 'base'@'localhost' IDENTIFIED BY PASSWORD '*xxxxx'
GRANT ALL PRIVILEGES ON `base%`.* TO 'login'@'localhost'
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.
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
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.
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.