TOC | Previous | Next | Documentation Home

Customizing MySQL settings

A default Reciprocal Net site software installation uses MySQL as its database engine.  While it is possible to employ most any Java-accessible SQL engine with the site software, most administrators find it convenient to use the Red Hat-sanctioned version of MySQL.  The MySQL packages should have been downloaded and installed earlier, if they weren’t already present on your system.

The first step is to start the mysqld dameon.  From the GNOME desktop, navigate to the System/Administration menu in the upper-left corner of the screen and launch the Services program.  In the Service Configuration window that appears, look in the left-lower pane and find the mysqld item.  Highlight mysqld and click the Start button on the program’s toolbar.  Click the OK button on the success message that appears a few seconds later.  Set the Service Configuration program aside but leave it open.

The next step is to secure MySQL by setting the root passwords.  Invent a database root password for yourself.  This might be the same as GNU/Linux’s root password, or it might be different (recommended).  Go to a command prompt and type the following command:

mysqladmin –u root password ‘your password‘

, replacing your password with your desired password.

Some systems may be equipped with a second root account.  Set the password on the second account by typing the following command:

mysqladmin –u root –h $HOSTNAME password ‘your password

.  This second command may fail with an Access denied error message if there was no second root account; do not be alarmed.  Continue forth.

Now, you almost certainly want to modify the way in which MySQL authenticates users because the default configuration can interfere with password-based authentication.  At a command prompt, type:

mysql –u root –p

to open MySQL’s interactive console.  When prompted, type the database root password that you invented a moment ago.  You should see a welcome message and a mysql> prompt.  Type the following sequence of four commands:

USE mysql;

DELETE FROM user WHERE user=’’ OR host=’localhost’ OR host=’’;

UPDATE user SET host=’%’;


.  The last command should exit the interactive console and return to a shell command prompt.

Lastly, it is necessary to configure the MySQL daemon to auto-start every time the computer boots.  At a command prompt, type:

chkconfig mysqld on


TOC | Previous | Next | Documentation Home