Prev | Current Page 1196 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

You also are asked whether
you want the MySQL server to start on boot. You should probably say ???Yes??? here.
Access to databases within MySQL is managed based on account information stored within the
mysql database. As with UNIX systems, the superuser account is named root. The default installation
does not set a password on this account, and it creates an anonymous account and a test database
that should be removed unless you are certain that you need them:
# mysql -u root mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.24 Debian-10-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> UPDATE user SET Password=PASSWORD('newpassword')
-> WHERE User='root';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> DELETE FROM user WHERE User = '';
Query OK, 2 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> DROP DATABASE test;
Query OK, 0 rows affected (0.00 sec)
mysql> \q
Bye
NOTE
654
Running Servers Part V
The UPDATE command, as used in this example, changes the password for the MySQL root account
(replace newpassword with the password you want to use), the DELETE command removes the
anonymous user, and the FLUSH command tells the running MySQL server to reload the list of
user accounts from the database.


Pages:
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208