13.2 Creating a MySQL Database

Before you begin, you should be familiar with standard database maintenance procedures.

For more information about MySQL, see the following references:

The following database tools can be helpful:

  1. Review the MySQL requirements listed in Section 2.1, Vibe Server Requirements.

  2. Make sure that the MySQL database server and client have been installed and configured, as described in Section A.2, MySQL Database Server.

  3. Make sure that the MySQL database client is also installed on the Vibe server.

    The Vibe installation program needs the MySQL client in order to communicate with the remote MySQL database server.

  4. Make sure that you know the password for the MySQL root administrator user.

  5. Make sure that innodb support is enabled.

    It is enabled by default. To verify that innodb support is enabled:

    1. Enter the following command to access the MySQL monitor:

      mysql -u root -p
      

      For information on how to set a password for your MySQL database if you have not already done so, see Configuring MySQL.

    2. Specify your password.

    3. From the MySQL prompt, enter the following command to display status information about the server’s storage engines:

      SHOW ENGINES\G
      
    4. Locate the InnoDB engine, and ensure that innodb support is enabled.

  6. Update the MySQL configuration file:

    1. Locate the MySQL configuration file and open it in a text editor.

      Linux:

      /etc/my.cnf

      Windows:

      c:\Program Files\MySQL\MySQL Server version\my.ini

    2. Under the [client] section, add the following line:

      default_character_set = utf8
      
    3. Under the [mysqld] section, add the following line:

      character_set_server = utf8
      

      Setting the character set to UTF-8 ensures that extended characters are handled correctly in the database.

    4. (Conditional) For a system with multiple network interfaces, in the [mysqld] section, add the following line:

      bind-address = mysql_server_address
      

      Replace mysql_server_address with the IP address that you want MySQL to bind to and to listen on.

    5. Save the updated configuration file, then exit the text editor.

  7. In the directory where you copied the database scripts (Step 4 in Section 13.1, Preparing to Manually Create a Database), enter the following command to run the MySQL database creation script:

    mysql -uuser -ppassword < create-database-mysql.sql
    
  8. Configure MySQL to allow access from a remote server:

    mysql -uuser -ppassword
    mysql> grant all privileges on *.* 
            -> to 'username'@'%'
            -> identified by 'password' 
            -> with grant option
            -> ;
    
  9. Skip to Section 13.5, Installing Vibe with a Remote Database.