1. Create MySQL Database

NOTE: For Optimal performance, the Database should be geographically close to the Stream Manager.

NOTE: For managed mysql engines you need to allow network access to port 3306 from the Stream Manager instance.

NOTE 2: currently, Red5 Pro autoscaling only support MySQL version 5.x (5.7 or 5.8).

Installing And Updating MySQL on Ubuntu 16.04

  • Install MySQL (reference) sudo apt-get install mysql-server - you will be prompted to set the root password.
  • (Optional) Run the MySQL security script sudo mysql_secure_installation to lock down the database as you see fit.
  • Test to make sure that MySQL is running systemctl status mysql.service
  • If MySQL isn't running, you can start it with sudo systemctl start mysql
  • Add non-root user:

    • Connect to database as root mysql -u root -p (enter root password).
    • Create new user: at mysql> prompt: CREATE USER 'mynewuser'@'localhost' IDENTIFIED BY 'goodPassword'; where mynewuser is your dbadmin and goodPassword is your secure password.
    • If you are successful, you will see Query OK, 0 rows affected (0.00 sec)
    • Apply privileges to the new user: GRANT ALL PRIVILEGES ON * . * TO 'mynewuser'@'localhost';
    • Reload the privileges to make sure the new ones are in place: FLUSH PRIVILEGES;
  • Create cluster database:

    • Connect with the new user: type quit to logout root user, then mysql -u mynewuser -p
    • Create database: CREATE DATABASE cluster;
  • Add Cluster schema:

    • Download the Red5 Pro Server Distribution, and unzip on your server.
    • Navigate to {red5prohome}/webapps/streammanager/WEB-INF/sql/ to find the cluster.sql file.
    • Run the sql script: mysql -u mynewuser -p cluster < cluster.sql (you will be prompted to enter the password that you set above).