Jump to content


This topic is now archived and is closed to further replies.


Unable to connect to MySQL.

Recommended Posts


I'm a complete newbie to php and MySQL and would really like to learn php and have made a start on reading through PHP 5 in Easy Steps and, unfortunately have come across a stumbling block already Sad.

I've installed Apache, php and MySQL via an XAMPP download as opposed to downloading the individual components seperately (not sure if this is good or bad).

phpinfo.php works alright however mysqltest.php does not and produces the following error message:-

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\Program Files\xampp\htdocs\xampp\in_easy_steps\mysqltest.php on line 7
sorry unable to connect to MySQL

As i'd installed XAMPP several months ago and forgotten the MySQL password that was set-up i've tried to reset the password however without avail.

[a href=\"http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/5.0/en/res...ermissions.html[/a]

Any suggestions on how to get MySQL up and running again would be appreciated.

Thank you.
Kind Regards.

Share this post

Link to post
Share on other sites
I believe you can edit mysql.ini or something and allow the root to access without password.

however, I'd suggest you reinstall the software. Maybe take a look at WAMP server too. Seems to cut it for me.

delete should be edit, changed it, sorry

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.