|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Cannot connect_Access Denied
Hi Iam very new to this and don't know very much about mysql but would like to learn but I cannot seem to get everything working right. Ihave set up apache which is working and php which is working and also msql but whenever I try to access mysql i get
Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'xxxx@127.0.0.1' (Using password: YES) in c:\public_html\test.php on line 3 I set the username and password in the Mysql admin do I need to set the password elsewhere? Not sure if I have layed out enough info if not I can explain more. Thanks for any help |
|
#2
|
|||
|
|||
|
try using the following code to connect to your database
$dbConn = mysql_connect("localhost","root"); |
|
#3
|
||||
|
||||
|
Quote:
I couldnt connect to mysql server with the above code Web server returned the following error: Quote:
But the code $dbConn = mysql_connect("172.16.4.1","root") is OK (the connect is suscessfull) Could you tell me why ? Ive Installed RedHat Linux7, Apache, PHP4.01, mySQL (rpm files included in RedHat Linux7 CDs) on the same server. |
|
#4
|
|||
|
|||
|
check apache.conf
search for localhost or 127.0.0.1 in ur config file
it seems that you ' ve set your server to work online (with a constant IP) pointing ur browser to URL(your IP)/phpinfo.php might help u get more info about ur settings |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > Cannot connect_Access Denied |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|