Additions:
Install the
MySql package when you install
CentOS, Ed/X/Ubuntu or
Red Hat RHEL (Extras)
Localhost
? & named server ?
Deletions:
Install the
MySql package when you install
CentOS or
Red Hat RHEL (Extras)
# mysqladmin -u root -h <localhost.localdomain> password "mypassword"
Additions:
Install the
MySql package when you install
CentOS or
Red Hat RHEL (Extras)
Initially there are two
MySql 'root' accounts (not the same as your *nix root) and two Anonymous accounts
# service mysqld start
Deletions:
Install the
MySql package when you install
CentOS or Red Hat RHEL
Initially there are two 'root' accounts (not the same as *nix root) and two anonymous accounts
The oldest known version of this page was edited on
2006-05-30 07:10:31 by WikkaWiki (unregistered user)
Install
Install the
MySql package when you install
CentOS or Red Hat RHEL
Secure
Initially there are two 'root' accounts (not the same as *nix root) and two anonymous accounts
You will probably want to set passwords on the 'root' accounts and delete the anonymous accounts
# mysql -u root
mysql> use mysql
mysql> select user,host,password from user;
| user | host | password |
| root | localhost | |
| root | localhost.localdomain | |
| | localhost | |
| | localhost.localdomain | |
4 rows in set (0.01 sec)
mysql> quit
MySQL Initialise Passwords
# mysqladmin -u root password "mypassword"
# mysqladmin -u root -h <localhost.localdomain> password "mypassword"
Now that you've set a password you'll need to use it EVERY time !
MySQL Initialise Anonymous Passwords
# mysql -u root -p
Enter password:
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('mypassword');
mysql> SET PASSWORD FOR ''@'<localhost.localdomain>' = PASSWORD('mypassword');
mysql> quit
MySQL Delete Anonymous Accounts
# mysql -u root -p
Enter password:
mysql> use mysql
mysql> DELETE FROM mysql.user WHERE User = '';
mysql> FLUSH PRIVILEGES;
mysql> quit
MySQL verify that root has passwords and anaonymous accounts have been deleted
# mysql -u root -p
Enter password:
mysql> use mysql
mysql> select user,host,password from user;
| user | host | password |
| root | localhost | **************** |
| root | localhost.localdomain | **************** |
2 rows in set (0.01 sec)
mysql> quit
REFERRERS
MySql