3. Configure SQL Database
Click on the newly created database to go to the Instance info screen.
- If you have not yet added the Stream Manager IP, then you can do so from the left-hand
connenctions
menu
Create the “cluster” Database
- From the left-hand menu, click on Databases
- Under MySQL Databases, click on
Create database
- Name the new database: cluster
- Leave the default character set (utf8)
- Click Add to finish
Add a Database User Account
- From the left-hand menu, click on Users
- Click on Create user account
- Set a username and password
- NOTE: these will be used by the Stream Manager, so make sure to note the username/password you’ve created; For security, do not use the same password as you set for the root account.
- Allow any host
- Create to add the user account
- NOTE: you will not be able to alter permissions once you’ve created the user, but you can update the password through google cloud dashboard
Make a note of the following for stream manager configuration:
- SQL Host IP Address (Can be seen in the Overview section)
- Database access username and password (from step 4)
Populate the Cluster Database Tables
You will find cluster.sql in the {red5prohome}/webapps/streammanager/WEB-INF/sql
directory of the latest Red5 Pro server distribution. This file should be used to populate the cluster database. You can do this using MySQL Workbench, or even via the Google Developer Console by:
Using Google Developer Console
- Under Storage Tab, Storage menu option in the sliding menu pane on left, CREATE BUCKET (for example: autoscaling). Click on your new bucket, then UPLOAD FILES, to add the
cluster.sql
file to the bucket. - Import the file through the Google Cloud SQL management tool:
- From left-hand navigation, choose SQL
- Click on your database instance, then click on IMPORT (format of import – SQ6.
- Browse to the
cluster.sql
file. Show advanced options, and enter Database name: “cluster” - Then click on Import.