Page 1 of 1

Locked out of mysql

PostPosted: 05. April 2007 16:20
by fulmont99
Hi All,

I am currently trying to use java with my mysql database. I tried running a program and I dont know what it did but now I cannot log into mysql. It says incorrect password. Is their a way to reset the admin password?

Thanks a million
Michael

PostPosted: 05. April 2007 16:22
by Wiedmann
but now I cannot log into mysql.

You try to login with which program?

PostPosted: 05. April 2007 16:31
by fulmont99
Wiedmann wrote:
but now I cannot log into mysql.

You try to login with which program?


Im trying to log in using phpadmin in xampp. None of the localhost sites I have created now work. Its strange because the java code I have written should just log into mysql. even it cannot get in anymore. The sites use php btw.

Thanks again,
Michael

PostPosted: 05. April 2007 16:44
by Wiedmann
Im trying to log in using phpadmin in xampp.

error message?

PostPosted: 05. April 2007 16:56
by fulmont99
Error
Cannot log in to the MySQL server

At the logon screen. Maybe it has wrecked the database and it is not the password at all. All of the databases are still in the data file. Its confusing me what could have happened.

web sites display

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\Program Files\xampp\htdocs\Project\database.php on line 6
Access denied for user 'root'@'localhost' (using password: YES)

java says

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:868)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3340)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1238)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2743)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Jdbc11.main(Jdbc11.java:23)


Michael

PostPosted: 05. April 2007 16:59
by Wiedmann
Does the login work, if you use no password for the user "root"?

PostPosted: 05. April 2007 17:00
by fulmont99
Wiedmann wrote:Does the login work, if you use no password for the user "root"?


Nope it says the same thing?

PostPosted: 05. April 2007 17:19
by Wiedmann
Nope it says the same thing

That's not possible. Without an password the (complete) error message must be an other in your own script.
Instead:
Access denied for user 'root'@'localhost' (using password: YES)

It must be:
Access denied for user 'root'@'localhost' (using password: NO)

PostPosted: 05. April 2007 17:31
by fulmont99
Sorry man, i thought you meant the logon to phpadmin:)

Anyway the result if i remove the password from the php is


Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\Program Files\xampp\htdocs\Project\database.php on line 6
Access denied for user 'root'@'localhost' (using password: NO)

Any ideas?

MM

PostPosted: 05. April 2007 17:35
by Wiedmann

PostPosted: 05. April 2007 18:11
by fulmont99
Hi, I tried changing the password a number of ways and logging in but it still is not working, is it possible the java program has done something to the database?

Thanks again for your time,
Michael