Move Database to another server

At this moment the database sits on the same server 127.0.0.1. I would like to move the database to another server we have dedicated for some of our mysql dbs. I have attempted to find the best process for doing so, but given the importance of getting it right, I would greatly appreciate some guidance. Thank you so much.

Hi @rpelletier,

First of all, be aware that the Kaltura Server will not work correctly with MySQL 5.7. MySQL 5.6 can be made to work but I recommend using 5.5 which is the most tested version.

Kaltura CE is shipped with a utility script called /opt/kaltura/bin/kaltura-export-db.sh which can assist in exporting the data. Basically, it just uses mysqldump to iterate over all the tables on a given DB [passed as an argument] and then compresses the result using GZIP.
This is very good for backup purposes but for exporting and importing a complete DB, you may prefer to just dump the entire DB into a file and then use the mysql CLI client on the new server to import the data.

When using mysqldump, make sure to pass --routines. This is most important for the DWH DBs.

The DBs you’ll have to export and later import are:

| kaltura             |
| kaltura_sphinx_log  |
| kalturadw           |
| kalturadw_bisources |
| kalturadw_ds        |
| kalturalog          |

In addition, the Kaltura Server has 2 MySQL users [‘kaltura’ and ‘etl’]. If you’re importing to the same MySQL version as the original, exporting the mysql DB in its entirety should work OK, otherwise, you’ll need to manually create these users and run the required GRANT statements.

If you need to do that, you can use /opt/kaltura/bin/db_actions.rc as reference.
Of course, when creating these two users, you need to set a passwd compatible with what the application uses. That is set in /opt/kaltura/app/configurations/db.ini, the directives to look at are:

propel.connection.password
dwh.connection.password

Once you’re done, to switch to the new server, you’ll need to edit /opt/kaltura/app/configurations/db.ini, /opt/kaltura/dwh/.kettle/kettle.properties and /etc/kaltura.d/system.ini and set the new host/IP.

1 Like

Thank you Jess, as usual you are a rock star!

@jess

I’m moving the DB to AWS RDS

for db.ini line where it says:
sphinx1.adapter = mysql
sphinx1.connection.dsn = “mysql:host=127.0.0.1;port=9312;”

sphinx2.adapter = mysql
sphinx2.connection.dsn = “mysql:host=127.0.0.1;port=9312;”

should I change it to the RDS endpoint and port 3306?

Hi @DvB,

No, these directives refer to Sphinx not to MySQL.
The MySQL ones are:

propel.connection.dsn
propel2.connection.dsn 
propel3.connection.dsn
1 Like

@jess

so any connection.dsn I should leave as default?

Thanks!

oops read that wrong, so change propel*
and leave sphinx alone
:slight_smile:

Hi @DvB,

That’s correct…

Cheers,

1 Like