Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-expand-tabs-free domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/websitedevait/public_html/wp-includes/functions.php on line 6131
Installing MySQL Server on CentOS Dedicated or Cloud Server | Advanced Internet Technologies

This article gives you detailed instructions on how to install and securely manage MySQL on a CentOS Dedicated or Cloud Server. This is specifically for dedicated servers where you have root level access (i.e. Self Managed or partially managed). If you are here looking for how to install MySQL on an AIT Fully Managed platform, then you will need to review this FAQ.

  1. Install the MySQL server by using yum.
    • yum install mysql-server
  2. Next, start MySQL.
    • /sbin/service mysqld start
  3. Once started, secure MySQL using this tool.
    • /usr/bin/mysql_secure_installation
  4. Allow remote connections to your MySQL database. This command will open up the default MySQL port on your server. You don’t have to do this if you are not planning on remotely connecting to your MySQL server from any other location.
    • I INPUT -p tcp –dport 3306 -m state –state NEW,ESTABLISHED -j ACCEPT -I OUTPUT -p tcp –sport 3306 -m state –state ESTABLISHED -j ACCEPT
  5. Start or restart the MySQL service.
    • /sbin/service mysqld start
  6. Connect to the MySQL database using the MySQL CLI tool. You will be prompted for your password.
    • /usr/bin/mysql -u root -p
  7. If needed, set your new password (if not already done above).
    • /usr/bin/mysqladmin -u root password ‘new-password’
    • or
    • /usr/bin/mysqladmin -u root –password=’new-password’ -h hostname-of-your-server ‘new-password’]

That’s it!