Install MySQL on Fedora

Version 9

    This article documents how to install MySQL on Fedora Linux 13. It may be useful for later versions as well.

    Install MySQL Server

    # yum install mysql-server
    

    The client package is installed as a dependency.

    Start Server

    # service mysqld start
    

    On the first start, MySQL will initialize the system tables and remind you to set a password for the root user.

    Set Root Password

    $ mysql_secure_installation
    

    The script allows you to set a root password. Additionally it gives you the options below to make your MySQL installation more secure.

    • remove anonymous user
    • disallow root login remotely
    • remove test database

    Create Database

    Connect to the server as root.

    $ mysql -u root -p
    Enter password:
    

    Create the database.

    mysql> create database jbpm3;
    Query OK, 1 row affected (0.01 sec)
    

    Create Login

    Connect to the server as root.

    $ mysql -u root -p
    Enter password:
    

    Create the user.

    mysql> create user 'jbpm3'@'localhost' identified by 'jbpm3';
    Query OK, 0 rows affected (0.02 sec)
    

    Important

    This statement may be recorded in a history file such as ~/.mysql_history, which means that plain text passwords can be seen by anyone having read access to such files.

    Grant privileges on the database to the new user.

    mysql> grant alter, create, delete, drop, index, insert, select, update on jbpm3.* to 'jbpm3'@'localhost';
    Query OK, 0 rows affected (0.00 sec)
    

    Create Tables

    Execute SQL statements in a script file like this:

    $ mysql -u jbpm3 -p jbpm3 < jbpm.jpdl.mysql.sql
    Enter password:
    

    Good luck