plugin can create user db but user mysql access denied

FBP

Verified User
Joined
May 5, 2014
Messages
24
Hello, I made a simple plugin that uses the da api to create a database with a button click at the user level. I then attempt to have it populate the database using php mysqli / mysql to access the database with the newly created db's credentials, however it fails either way stating the dbusername @ localhost using pw yes access is denied.

I ran da in debug mode and it didn't print anything about the denied mysqli access throughout the process.

If I put the da root mysql user/pw in place of the users, it works, but I am on the user level and should be able to manipulate the db with the user who just created it, right?

Am I missing something? Thanks in advance for assistance.
 
For the given username_dbname, are you able to login to /phpMyAdmin with it?

Note that DA does run a FLUSH PRIVILEGES call after the users are set, so I'm not sure if there are any required delays in mysql before the new settings take effect..
See if a short pause affects that at all (I have my doubts it would, but worth a try).
Also try an "echo" to confirm the password being sent to MySQL is the same one used to test the login with /phpMyAdmin.

John
 
Back
Top