I'm setting up MySQL on Windows 2000 and I'm trying to make it secure. I've set a password on root directory, and I though I deleted the user where user='localhost'.
Now I can log on w/; mysql -u root -p Enter Password: ********
but I can still log on with just; mysql
Am I not able to get rid of the no password on localhost or something?
When you first install MySQL it automatically gives you as the: user = "root" and password is set to nothing. From what i can make of it you have given the user "root" a password. Also "root" has full admin access to MySQL
Umm where you talk of user = "localhost" its not a user, well at least it shouldnt have been in the first place. Unless you have created "localhost" as a user and havent given it a password that'd be your problem.
Ok first off are you using MySQL with Apache? Also are you running it for PHP or what?
Anyway i assume you did this
mysqladmin -u root password your new password (did this in cmd promt under the bin dir of MySQL? to give "root" a password)
As I said in other post, user "root" has access to pretty much everything. When you first installed MySQL this should have been the only user in the MySQL user list (or whatever you want to call it) so the user you talk of as "localhost" is not a user and it isnt anyway.
If you are correct and you have made a user "localhost" then just give that a password.
What do you mean: but I can still log on with just; mysql
i can't speak for mysql, as i use and prefer postgresql, however it may have configuration similarities, postgresql has a number of different authentication methods, which one is used is set in a config file, and one of them is 'no authentication', which means you can pretend to be anyone you want. perhaps you have something similar to this set.
whats wrong with sticking to the thread topic, hmm?
and to keep this on topic: is it possible to login remotely to the server with no username and password? if not, then i suspect its a convenience feature to allow you to do so at the command prompt
Quote from paladin: is it possible to login remotely to the server with no username and password? if not, then i suspect its a convenience feature to allow you to do so at the command prompt
That's what I think, I'll test it when I get home from school.
And Blah, it did automatically create a user localhost, was following instructions from the MySQL manual on the site. But it seemed to think I could just delete it.
Anyway, I'll try it out when I get home, thanx for the help.
Quote from paladin: whats wrong with sticking to the thread topic, hmm?
and to keep this on topic: is it possible to login remotely to the server with no username and password? if not, then i suspect its a convenience feature to allow you to do so at the command prompt
I think there is just automatically a user localhost, at first, the localhost has all priviledges, when I deleted localhost, it just gets rid of the priviledges. Thanks for your help anyway guys.
Blah, I'm positive there was a localhost, maybe it's only in the latest versions. Because logging in as localhost you don't even need to specify a username. If you want to log in as root. you need to do. mysql -u root -p Enter Password: ********
what I have done seems to have sorted out everything now though.