I installed MySQL on a desktop PC (VISTA). But after typing “mysql” at the DOS prompt, I get an error message: “ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: NO)“. My question is how do I successfully login to use MySQL? I’ve heard of phpMyAdmin – isn’t this better? Thank you
You cannot login at MySQL server with a simple mysql command at the prompt. It is bound to result in the MySQL login error 1045 (28000): Access denied error. Actually, the command is incomplete as the login details are missing.
Anyway, this is a very minor issue and can be solved quickly by using the correct MySQL login command at the terminal window.
The MySQL package comes with a Command Line Client (CLC) with which you can work with the database. The commands need to be typed in manually and this helps you in learning the language properly. I advise beginners to use the CLC because it provides a simple interface through which one can get a hands-on (literally) experience.
The MySQL Command Line Client can be launched from “All Programs” -> “MySQL” -> “MySQL Server 5.1” -> “MySQL Command Line Client“. You can also load it up from a terminal window, but simply typing mysql followed by the “Enter” key at the DOS prompt will throw the “ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: NO).
To successfully login at MySQL you need to provide the password. For instance, if you launch the MySQL Command Line Client (image below), it waits for you to type in the password.
A simple “mysql” command at the DOS prompt is insufficient for logging in at MySQL. You need to use:
>mysql -u root -p
Wherein, root is the username and should be changed if your login information is different. The program now waits for you to enter the password which was set up when MySQL was installed on the Windows computer.
Should you use MySQL clients like phpMyAdmin?
Yes you can install phpMyAdmin on a Windows 7 machine (or Vista, in your case), but I recommend using it only when you’ve mastered at least the basic SQL commands.
In 2006, Time magazine honoured Wikipedia editors, meaning anyone in the world, with their "Person Of The Year" title! [more...]