Page 1 of 1

MySQL stops after ~1.5 seconds

PostPosted: 18. June 2009 22:02
by alphabetho
I've tried uninstalling and reinstalling, and have checked that Port 3306 is clear. What could the problem be? When I try to look at the CD demo i get:


Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\xampp\htdocs\xampp\cds.php on line 77
Could not connect to database!
Is MySQL running or did you change the password?



and attempting to open phpMyAdmin gives me:

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
Connection for controluser as defined in your configuration failed.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.




thanks for any help!

Re: MySQL stops after ~1.5 seconds

PostPosted: 18. June 2009 22:06
by Wiedmann
Code: Select all
Access denied for user 'root'@'localhost' (using password: NO)

What could the problem be?

Your user "root" have a password, but your script is not using one for the connection.

Re: MySQL stops after ~1.5 seconds

PostPosted: 18. June 2009 22:23
by alphabetho
I have changed NOTHING from defaults. This is not my script -> it's the demos!

Re: MySQL stops after ~1.5 seconds

PostPosted: 18. June 2009 23:14
by Wiedmann
I have changed NOTHING from defaults.

Maybe not you...

This is not my script -> it's the demos!

Correct. The demos don't work if "root" have a password.

--> restore your backup from the MySQl systgem database, if you don't know the "root" password.

Re: MySQL stops after ~1.5 seconds

PostPosted: 19. June 2009 00:33
by alphabetho
I don't quite understand - I'm a beginner!

I downloaded XAMPP from http://www.apachefriends.org/en/xampp-windows.html#641.

Interestingly, when I try changing the password under the security tab, it ALWAYS says successful, regardless of the "current" password. Also, when adding directory protection, all seems to work perfectly, but when I access the files remotely I am asked for a user name and password, but entering the correct inputs just puts it into a loop refreshes and asks again.

*edited out dumb comment*



Thanks!!

Re: MySQL stops after ~1.5 seconds

PostPosted: 19. June 2009 02:13
by alphabetho
The problem is that it won't stay running! not with the scripts, (as far as I can tell).

Re: MySQL stops after ~1.5 seconds

PostPosted: 19. June 2009 10:55
by el-quds
:?
U may try to remove the read only attribute from the phpmyadmin directory u might have access denied on the file that needs changing ..u can also try the xamp security permissions ... something around permissions is preventing u from making changes on some pages in phpmyadmin..

another thing try making a new database with root user and no password for some quick installation like a forum or a amagazine a fresh install and see if he can connect to the new database and why if not ?

:|