Question?

[expired user #2861]'s profile image [expired user #2861] posted 16 years ago in General Permalink
Ok im Havieng trouble connecting to a db on another computer. Me and my friend are hosting a WoW server and sueing mysql and i need to be able to connect to the db from my pc. when i try to log in it says SQL Error: Access denied for user 'root'@'Blank'(using password:YES)

any help =S
ansgar's profile image ansgar posted 16 years ago Permalink
http://www.heidisql.com/forum/search.php?mode=results&search_keywords=Access+denied
[expired user #1125]'s profile image [expired user #1125] posted 16 years ago Permalink
If you're completely locked out, even from the local machine, you may have to reinitialize the "mysql" database which contains users and passwords. The mysql installation package usually contains a copy of a database with a default "root" user that has a blank password (but may only be able to connect from localhost), and you can just install that in place of your current "mysql" database.

If you're locked out, but do not want to reinitialize all user rights, you can manuall inspect your user rights tables. Start the server with --skip-grant-tables (or put "skip-grant-tables" in my.cnf or my.ini), and do "SELECT User, Host, Password FROM mysql.user". The password is hashed, but you can do a quick check with SELET PASSWORD('is_this_it?') and compare the results, to see if your password is one of any possibilities. Also, the passwords are not salted, so going the reverse direction from the hashed password to the original plaintext password is rather easy - google for "rainbow tables" and "mysql".

Regarding the Host and User field, those must match the host you are coming from and the username you are using. The hostname is determined by doing a reverse lookup via DNS for your IP address. Mysql has an option called "skip-hostname-resolve". If this is enabled, mysql clients can connect faster because the server does not have to do a reverse lookup, instead it just looks for your IP address in the Host field of the user rights tables. There's a bug however - if you connect via named pipes instead of TCP/IP, the "skip-hostname-resolve" option does not take effect, and the local machine will not be recognized as "127.0.0.1" but will be reverse-resolved to "localhost".

Please login to leave a reply, or register at first.