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.

  1. 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
  2. Update the Shares application config file located at /opt/aspera/shares/u/shares/config/database.yml.
    Replace the bolded example variables with your MySQL server information.
                            
    production:
        database: shares
        username: "mysql_user"
        password: "3xamp13MySQLp4zzw0rd1234567"
        host: 10.0.0.0
        port: 1234
        encoding: utf8
        reconnect: false
        pool: 5
                    
    production_stats_collector:
        database: stats_collector
        username: "mysql_user"
        password: "3xamp13MySQLp4zzw0rd1234567"
        host: 10.0.0.0
        port: 1234
        encoding: utf8
        reconnect: false
        pool: 5
    
  3. Update the stats collector configuration file located at /opt/aspera/shares/u/stats-collector/etc/persistence.xml.
    Replace the bolded example variables with your MySQL server information.
                           
        <!-- connection URL: jdbc:mysql://HOST:PORT/DATABASE -->
        <property name="hibernate.connection.url" value="jdbc:mysql://10.0.0.0:1234/stats_collector"/>
        <property name="hibernate.connection.username" value="mysql_user"/>
        <property name="hibernate.connection.password" value="3xamp13MySQLp4zzw0rd1234567"/>
                        
  4. Restart all services.
    Run the following commands to restart all Shares services at once.
    
    # service aspera-shares stop
    # service aspera-shares start
  5. 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