# Troubles to get connected to mysql

**URL:** https://forum.kirupa.com/t/troubles-to-get-connected-to-mysql/161867
**Category:** Uncategorized
**Created:** [September 7, 2005, 7:25pm UTC](https://forum.kirupa.com/t/troubles-to-get-connected-to-mysql/161867 "2005-09-07T19:25:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![multimediamkt](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@multimediamkt](https://forum.kirupa.com/u/multimediamkt)
#### Post date: [September 7, 2005, 7:25pm UTC](https://forum.kirupa.com/t/troubles-to-get-connected-to-mysql/161867/1 "2005-09-07T19:25:57Z")

</div>

[FONT=Arial]I ran the script bellow :

\<html\>  
\<head\>  
\<title\>\</title\>  
\</head\>  
\<body\>  
\<?php  
$test = mysql\_connect(“localhost”, “root@localhost”, “password which was configured on config.inc.php”);  
print “$test”;  
?\>  
\</body\>  
\</html\>

…and the outcome has been the error message :

Warning: mysql\_connect() [function.mysql-connect]:  
Access denied for user ‘root@localhost’@‘localhost’ (using password: YES) in  
c:\wamp\www\count\mysql\_php\_connection.php on line 8

## The prompt gives me root@localhost and localhost as username and server ; I´ve not clearly understood what is going on ; So please if someone could explain what is wrong I would appreciate very much ; Thank you all for your attention

## c:/wamp/mysql/bin/mysql.exe Ver 14.7 Distrib 4.1.10a, for Win95/Win98 (i32)

mysql\> \s

Connection id: 153  
Current database:  
Current user: root@localhost  
SSL: Not in use  
Using delimiter: ;  
Server version: 4.1.10a-nt  
Protocol version: 10  
Connection: localhost via TCP/IP  
Server characterset: latin1  
Db characterset: latin1  
Client characterset: latin1  
Conn. characterset: latin1  
TCP port: 3306  
Uptime: 6 hours 30 min 26 sec  
----------------------------------------------------------------------------------------------------------------[/FONT]\*\*
