MySQL User Accounts · Aug 3, 09:14 PM by Dylan Doxey
Okay, so you've just installed MySQL and phpMyAdmin and now you want to login and start using it.
Well, don't fret.
The default username password for getting into MySQL is root with no password.
However, that might not be enough. Be sure you've installed
- phpmyadmin
- mysql-client
- mysql-server
Then use the command line interface and do:
dylan@eres:~$ mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.0.45-Debian_1ubuntu3-log Debian etch distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> GRANT ALL PRIVILEGES ON *.* TO 'rumplestiltskin'@'localhost' IDENTIFIED BY 'rumpiespass' WITH GRANT OPTION; Query OK, 0 rows affected (0.00 sec) mysql>
My observation is that the latest Debian installer for mysql-server prompts you to specify a root password. However, if this is not the case for you, then maybe you think the root account should have a password also. Most people will agree.
Do this:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('rootiespass');
Be aware, you probably have multiple root accounts.
To find out, do this:
SELECT * from user WHERE User = 'root';
I got this information from:
http://dev.mysql.com/doc/refman/5.0/en/adding-users.html
http://dev.mysql.com/doc/refman/5.0/en/set-password.html
One less Google search for me next time.
Good luck, and may the force be with you.

Commenting is closed for this article.
