Using Another MySQL Server After Installation
To use another MySQL server after rpm installation has occurred, you must update .my.cnf files and application configuration files.
-
Update the .my.cnf files with your MySQL server information in each of the
following locations:
- /opt/aspera/shares/.my.cnf
- /opt/aspera/shares/u/shares/.my.cnf
- /opt/aspera/shares/u/stats-collector/.my.cnf
-
Update the Shares application config file. .
Open /opt/aspera/shares/u/shares/config/database.yml and fill in your MySQL server information (username, password, host, and port).
production: database: shares username: "mysql_username" password: "mysql_password" host: ip_address port: port_number encoding: utf8 reconnect: false pool: 5 production_stats_collector: database: stats_collector username: "mysql_username" password: "mysql_password" host: ip_address port: port_number encoding: utf8 reconnect: false pool: 5
-
Update the stats collector configuration file..
Open /opt/aspera/shares/u/stats-collector/etc/persistence.xml and fill in your MySQL server information (username, password, host, and port).
<!-- connection URL: jdbc:mysql://HOST:PORT/DATABASE --> <property name="hibernate.connection.url" value="jdbc:mysql://ip_address:port_number/stats_collector"/> <property name="hibernate.connection.username" value="mysql_username"/> <property name="hibernate.connection.password" value="mysql_password"/>
-
Restart all services.
# service aspera-shares restart
-
Disable the built-in MySQL server.
To stop the built-in MySQL from running, you must remove it from the runlevels that include it. Run the following commands:
# rm /opt/aspera/shares/etc/runit/runlevels/setup/mysqld # rm /opt/aspera/shares/etc/runit/runlevels/up/mysqld