naturephoenix Posted October 7, 2012 Share Posted October 7, 2012 (edited) To connect to my database I manage only with : $db=new mysqli('localhost','root','','name_of_database'); Ok I can always edit my config file, but what when I want to add some new users with their privileges. This is what have I done mysql>grant select, insert, update, delete, index, alter, create, drop -> on name_of_database.* -> to new_user identified by ‘new_user_pass’; And when I open user table inside phpmyadmin, into mysql database, I see new user called "new_user" with pass "new_user_pass". But all privileges are set to NO. Then I edit privileges manually in phpmyadmin(i set them all to YES just like user with name "root") But $db=new mysqli('localhost','new_user','new_user_pass','name_of_database'); is not working. Can someone help me out with this. Edited October 7, 2012 by naturephoenix Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted October 7, 2012 Share Posted October 7, 2012 The forum you posted in is for questions related to this site. Moving to proper forum. Quote Link to comment Share on other sites More sharing options...
Christian F. Posted October 7, 2012 Share Posted October 7, 2012 When you grant privileges, you also have to flush the old ones from memory. That's the actual problem. As far as the DB user goes, I reckon you were looking in the "user" table, which controls access to the entire DB server. When you grant privileges on a per-database case, you can find them in the "db" table. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.