Page 1 of 1

Creating SQL user and external access problems

PostPosted: 22. April 2013 21:31
by fiddlefaddle
Xampp version 1.8.1
Control Panel 3.1.0
Windows Server 2012

I'm trying to get external access to a SQL database. The problem is when I create a new user (since you can't use root outside of localhost).
After entering/selecting all the fields in phpadmin (password, privileges), it creates the user without a password and no privilege.
I'm not sure why this is happening and perhaps someone could help me along.

Re: Creating SQL user and external access problems

PostPosted: 23. April 2013 06:09
by Altrea
Hi fiddlefaddle,

Please start new threads with the words "Hi" or "Hello". A short salutation is an act of politeness. Even if the internet is an virtual area, there is always a human being behind the screen. A polite beginning is the first positive impression you can leave here and helps to get polite answers too. Please keep that in mind if you start a new thread in any community board. Thank you.

fiddlefaddle wrote:since you can't use root outside of localhost.

Well, thats not correct. you can use the user root even from external connections, but this user needs to be permitted from hosts other than localhost.
And i think thats the problem with your new user too. So please provide us the information you typed in in the user creation form.

best wishes,
Altrea

Re: Creating SQL user and external access problems

PostPosted: 23. April 2013 19:18
by fiddlefaddle
Hello Altrea, sorry if I came off as rude. I will follow your advice.

I select the database in phpMyAdmin and click privileges.
Then I add the user and fill out the fields: username, any host (%), password, and select "Grant all privileges on database "x".

When it is added, I log out of root and I try to log in with the created user with the password. I get "Cannot log in to the MySQL server" but if I just leave password field empty, it logs in and only has access to "information_schema" database.
When I log back on root to check privileges, it says that the said username has privileges to database "x" but it does not.
I've tested adding user a few more times and the same happens, I can't log in with the newly created user unless I leave the password field blank and the only access it has is to "information_schema" despite it saying otherwise when checking privileges with root.

Thanks,
fiddlefaddle

Re: Creating SQL user and external access problems

PostPosted: 23. April 2013 19:34
by Altrea
Du you have a user %@localhost (% = Any) in your database?
If that is the case, then this user will always have a higher priority for logins than your user root@%
more to read here: viewtopic.php?f=16&t=52384&p=201304#p201304