|
 |
|
Previous
·
Next
|
knowmad
|
Date: 12/22/2006 3:25 pm · Subject: SQLForm - cannot add new asset · Rating: 15
It looks like some of the new logic that was added recently may have lead to some problems. We are no longer able to add SQLForms due to the following error: Some error(s) occurred: - Databaselink does not have enough privileges (Needs ALTER, CREATE, DELETE, INDEX, INSERT, SELECT, UPDATE)
I confirmed the database link user and password was correct. I also confirmed the privileges for this user. The existing SQLForms and SQLReports which use this link appear to be working fine. William
|
| Back to Top |
Rate [ | ]
|
| |
martink
|
Date: 12/23/2006 5:49 am · Subject: Re: SQLForm - cannot add new asset · Rating: -3
I put that in there to prevent fatal errors on sqlform addition.
Probably it's is a bit of a too strong medicine. Can you please post
the results of the following query for the databaselink you use? SHOW GRANTS FOR CURRENT_USER();
|
| Back to Top |
Rate [ | ]
|
| |
knowmad
|
Date: 12/29/2006 1:28 pm · Subject: Re: SQLForm - cannot add new asset · Rating: -1
mysql> SHOW GRANTS FOR CURRENT_USER(); +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Grants for jvgqtvro@localhost | +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, ALTER, EXECUTE ON *.* TO 'jvgqtvro'@'localhost' IDENTIFIED BY PASSWORD '*E24909AF8D94E418FF1C0F73D1093C4F274E891C' | | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `bonterrabuilders\_data`.* TO 'jvgqtvro'@'localhost' | | GRANT ALL PRIVILEGES ON `bonterrabuilders_com`.* TO 'jvgqtvro'@'localhost' | +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 3 rows in set (0.02 sec) As you can see all the grants are there. I did some debugging and the @privileges array was empty after you gathered the grants for the user. Looks like a regex or split error.
|
| Back to Top |
Rate [ | ]
|
| |
martink
|
Date: 1/2/2007 10:12 am · Subject: Re: SQLForm - cannot add new asset · Rating: -14
Two questions: 1) What DSN do you use? 2) Is the \ in bonterrabuilders\_data supposed to be there?
|
| Back to Top |
Rate [ | ]
|
| |
knowmad
|
Date: 1/18/2007 9:31 am · Subject: Re: SQLForm - cannot add new asset · Rating: -1
Yes, the backslash is coming through, apparently from mysql. Right now, it's showing 2 backslashes when I dump the @grants. I've added lines to the module to dump database name and the @grants list: Databasename = bonterrabuilders_data $VAR1 = [ 'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, ALTER, EXECUTE ON *.* TO \'jvgqtvro\'@\'localhost\' IDENTIFIED BY PASSWORD \'*E24909AF8D94E418FF1C0F73D1093C4F274E891C\'', 'GRANT ALL PRIVILEGES ON `bonterrabuilders_com`.* TO \'jvgqtvro\'@\'localhost\'', 'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `bonterrabuilders\\_data`.* TO \'jvgqtvro\'@\'localhost\'' ]; Here's what I get from the show grant command via mysql cmd-line tool: mysql> show grants for current_user; +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Grants for jvgqtvro@localhost | +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, ALTER, EXECUTE ON *.* TO 'jvgqtvro'@'localhost' IDENTIFIED BY PASSWORD '*E24909AF8D94E418FF1C0F73D1093C4F274E891C' | | GRANT ALL PRIVILEGES ON `bonterrabuilders_com`.* TO 'jvgqtvro'@'localhost' | | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `bonterrabuilders\_data`.* TO 'jvgqtvro'@'localhost' | +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ As you can see, somewhere in the dbLink->db->buildArray methods, special chars are getting backslashed which is causing the backslash that mysql adds to get backslashed again. Is there a way we can tell the dbLink calls not to add more backslashes. We can add a backslash to the db name via following: $databaseName =~ s/_/\\_/g; William
|
| Back to Top |
Rate [ | ]
|
| |
martink
|
Date: 1/5/2007 6:44 am · Subject: Re: SQLForm - cannot add new asset · Rating: -6
I figured out what the bug was. Apparently there are a gazillion ways
to construct dsn's. I committed a fix in 7.3.4 that should take this in
account. If it still doesn't work, please reopen and post the dsn you
use in the databaselink.
|
| Back to Top |
Rate [ | ]
|
| |
knowmad
|
Date: 1/5/2007 8:01 am · Subject: Re: SQLForm - cannot add new asset · Rating: -3
Thanks Martin. Sorry I didn't get back to you earlier but glad to hear you got it figured out. We'll test it when 7.3.4 gets released.
|
| Back to Top |
Rate [ | ]
|
| |
TheSeparator
|
Date: 2/9/2007 7:01 pm · Subject: Re: SQLForm - cannot add new asset · Rating: -7
I experience this bug still in 7.3.8 Was this supposed to be solved ? Regards, TheSeparator
|
| Back to Top |
Rate [ | ]
|
| |
colink
|
Date: 2/10/2007 12:32 am · Subject: Re: SQLForm - cannot add new asset · Rating: -3
Can you please post your DSN? Without it we have no way to fix the bug.
|
| Back to Top |
Rate [ | ]
|
| |
TheSeparator
|
Date: 2/12/2007 4:25 am · Subject: Re: SQLForm - cannot add new asset · Rating: -2
Hi, This is the dsn used: DBI:mysql:MyTestBase:localhost Hope this helps, Regards, TheSeparator
|
| Back to Top |
Rate [ | ]
|
| |
|
 |
 |
|