Originally posted by bentschmidt
I tried the same as you and the following came up on my screen:
bes@linux:~> mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 71 to server version: 4.0.21
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SELECT user, host FROM mysql.user;
| user | host |
| | linux.site |
| bes | linux.site |
| root | linux.site |
| | localhost |
| root | localhost |
5 rows in set (0.00 sec)
You have 2 anonymous accounts (1 , 4) the root accounts (3, 5) and a bes account.
You can connect as root only from localhost and linux.site (I get the feeling that those are the same host).
If you want to be able to connect as root from somewhere you need a new root user.
Use the "grant" command to do this.
Something like :
grant <all the permisions you want> on *.* to root@<IP or host>;
SET PASSWORD FOR root@<IP or host> = PASSWORD('the_password_you_want');
Leaving the <IP or host> blank will let you connect from anywhere. If you care about security, this is a bad thing to do.
The gui is fine but you need to know basic stuff in the mysql console.
Download and read the mysql manual. It's all written in there.
Also, you might consider dropping the anonymous accounts.
DELETE FROM mysql.user WHERE User= '';
or even delete the test database:
DROP DATABASE test;