Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect to mysql database

Status
Not open for further replies.

monasa

IS-IT--Management
Jun 27, 2004
41
CA
I execute this script :

$db="b&b";

$link = mysql_connect('localhost', 'root', 'aa');

and I had :

Warning: mysql_connect(): Accès refusé pour l'utilisateur: 'root@localhost' (mot de passe: OUI) in c:\program files\easyphp1-7\ on line 30
Couldn't connect to MySQL

Please help.

Thanks in advance.

M.N
 
1) Make sure the MySql service is up and running properly (can you connect to it from a terminal, using the root/aa login?)

2) I'm not entirely sure, but I seem to remember reading something about a "localhost" connection. Try specifying the server's IP address (or even loopback - 127.0.0.1?).

Just a couple quick thoughts for you to try out :)

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
look up: Md. Ashraful Anam on a search he has a quick and easy tutorial that is to the pointthat will have you running in minutes


Hope this helps you out
good luck
Cyber

Nothing is hard when you realy want to learn it.

Max
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top