19.2 Creating a MySQL/MariaDB Database

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

For more information about MySQL, see the following references:

For information on installing SLES 12 and using MariaDB, see the SLES 12 Documentation and MariaDB web sites.

The following database tools can be helpful:

To create the MySQL database:

  1. Review the MySQL requirements listed in Database Server Requirements.

  2. Ensure that the MySQL database server and client have been installed and configured, as described in Installing and Running the Database Server.

  3. Ensure 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 separate MySQL database server.

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

  5. Ensure 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/MariaDB.

    2. Specify your password.

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

    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.




      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. Copy the teaming-4.0.n-db.zip file from the Vibe server where the Vibe installation program is located and copy it to the database server.


    Download and unzip the Vibe software onto the database server.

  8. In the directory where the Vibe Installation program is located on the database server, or in the location where you copied the teaming-4.0.n-db.zip file, unzip the teaming-4.0.n-db.zip file.

  9. Change to the db subdirectory.

  10. Change to the db/scripts/sql subdirectory.

  11. Copy the mysql-create-empty-database.sql script to a convenient temporary location on the server where you want to create the database, and ensure that your database management utility is on your path so that you can run it from that directory.

  12. Specify the following command to run the MySQL database creation script:

    mysql -uuser -ppassword < mysql-create-empty-database.sql
  13. Configure MySQL to allow access from a separate server:

    mysql -uuser -ppassword
    mysql> grant all privileges on *.* 
            -> to 'username'@'%'
            -> identified by 'password' 
            -> with grant option
            -> ;
  14. Edit the mysql-liquibase.properties file to use your specific credentials.

    For example:

    vi mysql-liquibase.properties

  15. Populate the database that you just created:

    ./manage-database.sh mysql updateDatabase

  16. Verify that the database tables were created:

    mysql -uuser -p

  17. Specify the password for the MySQL user.

  18. Specify the following command to use the default Vibe database:

    mysql> use sitescape;

    A message indicating that the database has been changed is displayed.

  19. Specify the following command to show that the tables were created:

    mysql> show tables;