Obi Wan Shinobi wrote:
What happens if you try:
C:\mysql\bin> mysql -u root
I log in. But then again I can put in anything in the place of 'root'
and it will log in (it says Welcome to the MySQL monitor). It doesn't
even turn me away if I type in a random name.
Let me explain something. If you log in when you use username 'root',
you either get in or you won't get it. If you get it, you will have root
privileges. If you however use another username, a username that either
doesn't exists or is 'test', then you will by default be logged in as
user 'test' and you will have access to test database only.
So what has happened here is this:
- You failed to set password for root
- That means you don't yet have any password for root
Log in to mysql with this command:
C:\mysql\bin>my sql -u root
And once you get inside, type in this command (convert the some password
text with the password you prefer).
SET PASSWORD FOR root = PASSWORD('some password');
After that you should have root password set. Try log out, and then try
again:
C:\mysql\bin>my sql -u root
This time you shouldn't get it. Try
C:\mysql\bin>my sql -u root -p
And you should be asked for password. And once you have given it
correctly, you should get in as root.
Or try to log in as a test user, try
C:\mysql\bin>my sql -u whatever
And you should get in, but without root privileges.