Can't connect to mysql

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

Can't connect to mysql

Postby mchojrin » 20. July 2009 21:38

Hi:

I have XAMPP 1.7.1 installed on a CentOs and I can't connect to a mysql server with a password enabled user, either from PHP nor from the CLI. Any idea? Thanks.
mchojrin
 
Posts: 5
Joined: 28. January 2009 17:05

Re: Can't connect to mysql

Postby mchojrin » 20. July 2009 23:46

Let me add a few details I just found out:

I believe there must be some kind of problem with the MySql Linux implementation that comes toghether with the XAMPP package (At least version 1.7+).

I found that when I try to connect to my server from my WinXP to the MySql (On the RH) it works just fine (through a GUI Query Browser), but when I try this from a VM terminal (using the CLI mysql client) i can only log with empty password users.

I tried using the old_password function and even created a user with a password from the CLI, but when I got out of the client, I couldn't log back in with the newly created user (which, btw, worked fine from WinXP).

I tried all that at work (XAMPP 1.7.1), but then when I got back home I tried the same on an XAMPP 1.7 and the same thing happened.

My work configuration is the following:

WinXP hosting a RH VM both with XAMPP 1.7.1. On the WinXP I have MySQL query browser installed.
mchojrin
 
Posts: 5
Joined: 28. January 2009 17:05

Re: Can't connect to mysql

Postby Wiedmann » 20. July 2009 23:59

I believe there must be some kind of problem with the MySql Linux implementation that comes toghether with the XAMPP package

You can connect to MySQL with phpMyAdmin, using the default "root" user and maybe your own password enabled user?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Can't connect to mysql

Postby mchojrin » 21. July 2009 13:45

I have solved the problem. It's a weird thing about how MySql manages the users. You can find more info at:

http://dev.mysql.com/doc/refman/5.1/en/ ... users.html

Basically, in order to have it working you need to grant your users permissions on both '%' AND 'localhost'. I don't really see why, I mean, '%' should include 'localhost', but apparently MySql guys don't think the same way :)

Anyway, thank you!
mchojrin
 
Posts: 5
Joined: 28. January 2009 17:05


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 20 guests