Jump to content

Unable to connect to MySQL.


homebrewpc

Recommended Posts

Hi,

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.
Link to comment
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.



[edit]
delete should be edit, changed it, sorry
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.