![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm sorry for the multi-post, but I originally checked with the folks in alt.php.sql newsgroup before coming here. I'm having a problem with MySQL, and I'm trying to work with PHP, however, I believe the problem may be on MySQL and not PHP. So here it goes: I essentially cannot connect to my MySQL (tried both 5.0.27 and 5.0.30) as root (AT) localhost (DOT) I created the root@localhost user just fine (I am aware that root@% is NOT the same thing as root@localhost). However, when I try to connect with a PHP script as user root@localhost, I get an error message essentially telling me that the server doesn't exist, or its improperly configured. However, when I try to connect to the database as root@LocalMachineHostname it connects no problem. I have verified that `ping localhost` pings 127.0.0.1, and I have the proper entry in /etc/hosts showing 127.0.0.1 localhost localhost.localdomain. I just can't figure out why MySQL wouldn't let me connect to the database as root (AT) localhost (DOT) To make the story just a tad stranger, I'm working on an OS upgrade, and I am using the same my.cnf file from a working config on a different machine, (and same php.ini) and I am using the configure-time options that I used on the original "old" machine. I'm completely lost, does anyone have any clues as to what could be going wrong in my connection to mysql? Thanks Mike |
#3
| |||
| |||
|
|
I have verified that `ping localhost` pings 127.0.0.1, and I have the proper entry in /etc/hosts showing 127.0.0.1 localhost localhost.localdomain. |
#4
| |||
| |||
|
|
I'm having a problem with MySQL, and I'm trying to work with PHP, however, I believe the problem may be on MySQL and not PHP. So here it goes: I essentially cannot connect to my MySQL (tried both 5.0.27 and 5.0.30) as root (AT) localhost (DOT) I created the root@localhost user just fine (I am aware that root@% is NOT the same thing as root@localhost). However, when I try to connect with a PHP script as user root@localhost, I get an error message essentially telling me that the server doesn't exist, or its improperly configured. However, when I try to connect to the database as root@LocalMachineHostname it connects no problem. |
|
I have verified that `ping localhost` pings 127.0.0.1, and I have the proper entry in /etc/hosts showing 127.0.0.1 localhost localhost.localdomain. |
#5
| |||||
| |||||
|
|
I'm having a problem with MySQL, and I'm trying to work with PHP, however, I believe the problem may be on MySQL and not PHP. So here it goes: I essentially cannot connect to my MySQL (tried both 5.0.27 and 5.0.30) as root (AT) localhost (DOT) I created the root@localhost user just fine (I am aware that root@% is NOT the same thing as root@localhost). |
|
However, when I try to connect with a PHP script as user root@localhost, I get an error message essentially telling me that the server doesn't exist, or its improperly configured. However, when I try to connect to the database as root@LocalMachineHostname it connects no problem. |
|
I have verified that `ping localhost` pings 127.0.0.1, and I have the proper entry in /etc/hosts showing 127.0.0.1 localhost localhost.localdomain. |
|
I just can't figure out why MySQL wouldn't let me connect to the database as root (AT) localhost (DOT) |
|
To make the story just a tad stranger, I'm working on an OS upgrade, and I am using the same my.cnf file from a working config on a different machine, (and same php.ini) and I am using the configure-time options that I used on the original "old" machine. I'm completely lost, does anyone have any clues as to what could be going wrong in my connection to mysql? |
#6
| |||
| |||
|
|
I have verified that `ping localhost` pings 127.0.0.1, and I have the proper entry in /etc/hosts showing 127.0.0.1 localhost localhost.localdomain. So your're probably running Linux. If I recall correctly, connecting to 127.0.0.1 will use a tcp connection, whereas "localhost" would use something else (a named pipe?). Is it possible to connect directly to 127.0.0.1 from PHP? |
![]() |
| Thread Tools | |
| Display Modes | |
| |