AppBridge does not provide a custom installer for MySQL on Linux. However, customer are free to install and configure MySQL on Linux using the standard Linux installation methods. This installation guide is specifically tailored for the Ubuntu distribution. 

Install MySQL using terminal

 

All commands must be executed in the Ubuntu terminal with sufficient privileges

 

  1. Download the key list:

  2. Install the package from the key list:

    sudo dpkg -i mysql-apt-config_0.6.0-1_all.deb

  3. Update the package lists:

    sudo apt-get update

  4. Install from the mysql deb package:

    sudo apt-get install mysql-community-server

    Set a password for root user.  **Store this password securely**


  5. Run MySQL (and set a password for MySQL root user if not prompted during installation):

    mysql -u root -p

    - Input chosen password to start MySQL.

     

  6. Create an admin user:

    CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
    GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost';

     

    CREATE USER 'username'@'%' IDENTIFIED BY 'password'; 
    GRANT ALL PRIVILEGES ON *.* TO 'username'@'%';

  7.  Type: FLUSH PRIVILEGES;

  8.  Check User Accounts to ensure admin account was added correctly:

    SELECT User FROM mysql.user;

  9. If admin was added successfully, type: exit 

MySQL configuration

  1. Navigate to the MySQL configuration file which contains mysqld.  The default location is: /etc/mysql/mysql.conf.d/mysqld.cnf

  2. Open the MySQL configuration file by typing:

    sudo vi mysqld.cnf
  3. Locate the following text location: # Instead of skip-networking the default is now to listen only on# localhost which is more compatible and is not less secure.

  4. Comment out the bind-address line by inserting a # at the start of the line:

    From: bind_address = 127.0.0.1To: #bind_address = 127.0.0.1
  5. Save your changes and exit the mysql.cnf file. (input ':wq' and press enter)

MySQL optimization

MySQL can be significantly optimized to ensure the fastest performance on your server. This section details a number of tweaks you can perform to get maximum performance during transformation.

Set the open files limit

  1. Open the default Ubuntu limits configuration file

    sudo vim /etc/security/limits.conf

  2. Add the following lines to the file

    * soft nofile 1024000
    * hard nofile 1024000
    * soft nproc 10240
    * hard nproc 10240

  3. Reboot the server

    sudo reboot

Optimize MySQL configuration

 

  1. Navigate to the MySQL configuration file which contains mysqld.  The default location is: /etc/mysql/mysql.conf.d/mysqld.cnf

  2. Open the MySQL configuration file by typing:

    sudo vi my.cnf

  3. Locate the [mysqld] section of the options file, and insert the required parameters and values (the values in the below image are arbitrary. Please tune your database according to the specifications of your DB server):

    SettingDescription
    transaction-isolationSet to READ-COMMITTED
    open_files_limitSet to 65535
    max_connectionsSet to 10000
    innodb_buffer_pool_sizeSet to 80% of the total server RAM available for a dedicated server. If MongoDB is also installed, set to 50% of the total server RAM available.
    innodb_read_io_threadsSet to the number of logical CPUs on server
    innodb_write_io_threadsSet to the number of logical CPUs on server
    innodb_open_filesSet to 5x the number of maximum connections

    Example:

    transaction-isolation=READ-COMMITTED

    open_files_limit=65535

    innodb_buffer_pool_size=83G

    innodb_read_io_threads=16

    innodb_write_io_threads=16

    innodb_open_files=50000

    max_connections=10000

  4. Save your changes and exit the mysql.cnf file. (input ':wq' and press enter)

  5. Restart the MySQL service

    sudo service mysql restart

Next: Installation - MongoDB (Ubuntu)

 

Attachments:

Host_Settings.png (image/png)
Edit Host Settings.png (image/png)