MySQL Forums
Forum List  »  PHP

Re: creating database users
Posted by: peter le roux
Date: December 19, 2012 07:42AM

Thank you very much, that did work.

what i added, which might only have been parially necessary was to drop the user then create it before granting access to it. but it is working now, so thank you very much :)

whole thing now looks like this:


DbExecute($db, "drop user '".$usn."'@'localhost';");
DbExecute($db, "create user '".$usn."'@'localhost';");

and then
"grant ALL on ".DATABASE_NAME.".* to '".$usn."'@'localhost';";// identified by password '".$pwd."';";// with grant option

i don't really care about the password as it is happening on local machine, but i will add it back now if it wants to work.

and i removed the user ANY from everywhere like you suggested.

anyway, i'm really happy, thank you :)

Options: ReplyQuote


Subject
Written By
Posted
December 18, 2012 02:15AM
December 18, 2012 02:22AM
December 18, 2012 11:31AM
December 19, 2012 01:01AM
December 19, 2012 01:07AM
December 19, 2012 02:19AM
December 19, 2012 05:43AM
Re: creating database users
December 19, 2012 07:42AM
December 19, 2012 03:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.