Creating SQL user and external access problems

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Creating SQL user and external access problems

Postby fiddlefaddle » 22. April 2013 21:31

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.
fiddlefaddle
 
Posts: 2
Joined: 22. April 2013 20:58
Operating System: Windows Server 2012

Re: Creating SQL user and external access problems

Postby Altrea » 23. April 2013 06:09

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Creating SQL user and external access problems

Postby fiddlefaddle » 23. April 2013 19:18

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
fiddlefaddle
 
Posts: 2
Joined: 22. April 2013 20:58
Operating System: Windows Server 2012

Re: Creating SQL user and external access problems

Postby Altrea » 23. April 2013 19:34

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 99 guests