JReceiver: Server Install - MySQL

MySQL

JReceiver requires a recent (3.23 or newer) release of MySQL. Support for other databases (Postgres, e.g.) may be forthcoming.
Linux

Install Files

Your Linux distribution very likely contains a MySQL package that you can install from CD. Consult your distribution documentation to see if it offers one that meets the requirement(s) stated above. If not, you'll have to download the binaries (or source) from http://www.mysql.com/downloads/. Follow instructions and add its /bin directory to your path.

Configure Administrator

Set the root password, replacing HOSTNAME with your hostname and ROOTPASSWORD with your chosen administrator password:

    mysqladmin -u root -h HOSTNAME -p password ROOTPASSWORD
    mysqladmin -u root -p password ROOTPASSWORD

Note: if prompted for a password during this step, simply hit enter. (i.e., on a new installation, you are changing the root password from blank to ROOTPASSWORD.)

Start the MySQL Client

Start the mysql client (prompts for password):
    mysql -u root -p mysql
You should be at the mysql> prompt.

Enter the following command...

    mysql> CREATE DATABASE jreceiver;

Create User for JDBC Access

Set up permissions and a password for what will be the JDBC user, replacing HOSTNAME with the name of your server and 'MYPASSWORD' with the password you're assigning. Single quotes are required.

    mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON jreceiver.*
           TO jreceiver_app@localhost, jreceiver_app@HOSTNAME;

    mysql> GRANT SELECT ON *.*
           TO jreceiver_app@localhost, jreceiver_app@HOSTNAME;

    mysql> UPDATE user SET Password=PASSWORD('MYPASSWORD')
           WHERE user='jreceiver_app';

    mysql> FLUSH PRIVILEGES;

    mysql> quit;
Windows

Install Files

Download a binary MySQL distribution for Windows from http://www.mysql.com/downloads/.

The MySQL Windows binary distribution is a .zip file. You'll need a decompression utility such as WinZip to extract files from the archive.

Run setup.exe. Install a "typical" installation to the folder of your choice, such as

        C:\Program Files\MySQL

Configure Administrator

Once MySQL is installed, run

        "C:\Program Files\MySQL\bin\winmysqladmin"
If my.ini has not been created yet (in C:\WINNT) you will be prompted to enter a a username and password for the database administrator. Do so, replacing ROOTPASSWORD with your chosen administrator password:
        User Name: root
        Password : ROOTPASSWORD

If successful, you will see a green traffic light icon in the system tray. If not, consult your MySQL documentation.

Start the MySQL Client

Open a new Command prompt.

If you don't know your hostname (aka 'Computer Name'), you can find it out by entering the following command:

    hostname

Start the mysql client (prompts for password):

    "C:\Program Files\MySQL\bin\mysql" -u root -p mysql
You should be at the mysql> prompt.

Enter the following command...

    mysql> CREATE DATABASE jreceiver;

Create User for JDBC Access

Set up permissions and a password for what will be the JDBC user, replacing HOSTNAME with the name of your server and 'MYPASSWORD' with the password you're assigning. Single quotes are required.

    mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON jreceiver.*
           TO jreceiver_app@localhost, jreceiver_app@HOSTNAME;

    mysql> GRANT SELECT ON *.*
           TO jreceiver_app@localhost, jreceiver_app@HOSTNAME;

    mysql> UPDATE user SET Password=PASSWORD('MYPASSWORD')
           WHERE user='jreceiver_app';

    mysql> FLUSH PRIVILEGES;

    mysql> quit;

NEXT STEP: [Install Jetty]


Copyright © 2001-2002, Reed Esau & the JReceiver Project (http://jreceiver.sourceforge.net), All Rights Reserved