Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-16-2002, 03:28 AM   PM User | #1
zybler
New to the CF scene

 
Join Date: Nov 2002
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
zybler is an unknown quantity at this point
how to change mysql root password

i downloaded the phpdev423 bundle from
http://www.firepages.com.au/phpdev41.htm

after installed it, i understand that by default, MySQL has no security. I just want to know how to change the root password? What should i do to secure the server if it's connected to the internet, to prevent it being compromised by hackers?

can anyone give me a step-by-step guide on how to configure the settings to make it more secure?

Thanks in advanced.
zybler is offline   Reply With Quote
Old 11-16-2002, 10:27 AM   PM User | #2
jaysun
New to the CF scene

 
Join Date: Nov 2002
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
jaysun is an unknown quantity at this point
First of all you should remove the anonymous user from mySQL by logging into mySQL then running this sql:

mysql> DELETE FROM user WHERE host='localhost' AND user='';

Quit mySQL and from the command line run the following (make sure you are in the mysql\bin directory):

mysqladmin reload

This reloads all the table information and therefore removing the anonymous user.

Next, still in the command line:

mysqladmin -u root password <your new password>

This sets a password for the root user (admin) and your job is done

If you wan to see the priveleges set for user, db's and tables then simply view the tables in the mysql database with so sql:

e.g. select user,host from users;

Hope this helps you - JaYsuN
jaysun is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:13 PM.


Advertisement
Log in to turn off these ads.