Jump to content

Newbie on simple security setting


WildCard#!

Recommended Posts

Hi new to MySQL. Everything is a bit of a blur at the moment. Through time though hopefully I understand it. I installed the killer trio (Apache, PHP, MySQL) and seem to have done it with success. The problem I am facing at the moment is that it is about security on MySQL. I have set a root password and also set a password for my username. However I can still get in thorugh by using any made up usernames. Eg shell> mysql -h localhost -u BlahBlahwhateveretc and it accesses the MySQL Monitor. I have looked at the manual but does not explain clearly how to resolve this. I just want my 1 username with a password to access it and anything else to be denied, (apart from root of course).

 

Any help would be much appreciated, thanks. :D

Link to comment
Share on other sites

Diamond, cheers I done it, much appreciated. I also found this in the manual somewhere.

 

DELETE FROM mysql.user WHERE user=\'username\' and host=\'hostname\';

FLUSH PRIVILEGES;

 

However I had to do this instead

 

DELETE FROM mysql.user WHERE user=\'\';

FLUSH PRIVILEGES;

 

I deleted two records in the mysql table. Hopefully the one record wasn\'t that important. It had a NULL username and \"localhost\" as the host.

 

Maybe I\'ll find out down the line. :?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.