Difference between revisions of "Secure your mysql"
From mx Help Wiki
m |
(→Securing MySQL) |
||
Line 1: | Line 1: | ||
== Securing MySQL == | == Securing MySQL == | ||
− | (the following instructions | + | (the following instructions adapted from http://www.securityfocus.com/infocus/1726) |
'''Change admin password''' | '''Change admin password''' | ||
Line 7: | Line 7: | ||
Changing the database administrator's password (empty by default). First run MySQL (if it is not already): | Changing the database administrator's password (empty by default). First run MySQL (if it is not already): | ||
− | + | yourterminal$ mysql -u root -p | |
− | + | when prompted for a password leave it blank (i.e., just hit 'return') | |
− | + | then change the administrator's password as follows: | |
− | + | ||
− | + | mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yournewpaswd'); | |
− | ''' | + | But replace yournewpaswd (keep the single quotes in there though) with a password that '''you will not forget'''. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Revision as of 16:27, 19 January 2007
Securing MySQL
(the following instructions adapted from http://www.securityfocus.com/infocus/1726)
Change admin password
Changing the database administrator's password (empty by default). First run MySQL (if it is not already):
yourterminal$ mysql -u root -p
when prompted for a password leave it blank (i.e., just hit 'return')
then change the administrator's password as follows:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yournewpaswd');
But replace yournewpaswd (keep the single quotes in there though) with a password that you will not forget.