Problems connecting to mysql using phpMyAdmin

Ali A Samii samii at me.com
Thu Nov 18 21:46:34 PST 2010


Yes,

I am able to connect using the command line.

On 19 Nov, 2010, at 06:45 , Ryan Schmidt wrote:

> 
> On Nov 18, 2010, at 23:40, Ali A Samii wrote:
> 
>> I am unable to connect to mysql using phpMyAdmin. I get a #2002 Cannot log in to the MySQL server error.
>> 
>> I have restarted mysql, reset the password, and rerun the security configuration all from the command line without any problems.
>> 
>> But when I try to connect from phpMyAdmin, I get the #2002 error.
>> 
>> I googled it and there are recommendations to change the config.inc.php file and change the following line
>> 
>> From
>> $cfg['Servers'][$i]['host'] = 'localhost';
>> to
>> $cfg['Servers'][$i]['host'] = '127.0.0.1';
>> 
>> Which I did, but it made no difference. Makes sense that it made no difference as I have already defined 127.0.0.1 in my /etc/hosts file.
> 
> That suggestion is meant to rule out problems relating to the difference between the socket file and a network connection. Connecting to "localhost" uses the socket file. Connecting to "127.0.0.1" opens a network connection.
> 
>> Does anyone have a suggestion?
> 
> Are you able to connect to mysql using that username and password on the command line?
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2659 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101119/432417be/attachment.bin>


More information about the macports-users mailing list