Can't connect to any database except "test"

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

Can't connect to any database except "test"

Postby nbenford » 21. March 2012 15:19

Hi

I hope someone might be able to help me.

I have installed XAMPP on Windows 7 and have been working all day trying to get a connection to a database I created. I have checked and checked again that all my permissions are correct and that the user name & password I was using but I kept getting

Connected successsfullycant use <nameofmydatabase>: Access denied for user ''@'localhost' to database '<nameofmydatabase>'

However, when I substituted the name of my database for the preinstalled "test" database that came with XAMPP, I got a successful connection. Does anyone know why this might be?

Will it be ok to populate the "test" database with my tables seeing as it is the only way I can get the connection to work?

Hoping someone might be able to shed some light.

Thanks
nbenford
 
Posts: 2
Joined: 21. March 2012 15:12
Operating System: Windows 7

Re: Can't connect to any database except "test"

Postby hackattack142 » 23. March 2012 01:58

Which permissions did you set?

Were they global permissions or per database permissions?

Does it work if you test with the root user?
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: Can't connect to any database except "test"

Postby nbenford » 23. March 2012 10:03

I have now solved the issue - but would still like to try and understand more about it - and it seems to be related to permissions.

I used MySQL Workbench to examine the configuration and user permissions in more detail, and what I found was that apart from the pma and root users, and the username I had created for myself (which had full permissions globally and for the database) there was also listed the user <anonymous> (that is exactly how it appears in the list of users) - and it was to this user that all the permissions for the "test" database were assigned.

I thought I would experiment by giving the <anonymous> user permissions to my database - and then I was able to connect to it.

I would really love to understand more about why this is! Can anybody help?

Thanks
nbenford
 
Posts: 2
Joined: 21. March 2012 15:12
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 73 guests