ANS Documentation

Improve This Doc
  • Cloud
  • Domains and DNS management
  • Backup and High Availability
  • eCommerce Stacks
  • Security
  • Email
  • Monitoring and usage management
  • Networking
  • Operating systems
    • Linux
      • Basics
      • Apache
      • Control Panels
      • FTP
      • Magento
      • Miscellaneous
      • MySQL
      • NGINX
      • PHP
      • PHP-FPM
      • Setting up Websites
      • NFS
      • VPN
      • Percona
      • SSH
      • SSL
      • Git
      • Redis
      • Elasticsearch
      • MongoDB
      • Ncdu
    • VMware ESXi
    • Windows
  • Webcelerator
  • MyUKFast
  • Home >
  • Operating systems >
  • Linux >
  • MySQL >
  • Installing MySQL

Installing MySQL¶

MySQL is somewhat infamous for being the number one hobbyist database whilst also being the world’s second most widely used (overtaken only by SQLite and its prolific usage on Android / Apple devices).

Installation¶

MySQL is available from the standard repositories on CentOS and can be installed with the following command:

CentOS 5 & 6:

yum install mysql-server

CentOS 7:

yum install mariadb-server

This will also install the MySQL command line client to allow you to interact with the new MySQL server.

Set MySQL to always start on boot¶

CentOS 5 & 6:

chkconfig mysqld on

CentOS 7:

systemctl enable mariadb

Start your MySQL server¶

CentOS 5 & 6:

service mysqld start

CentOS 7:

systemctl start mariadb

Configuration¶

The MySQL configuration file is usually located in the following location:

/etc/my.cnf

There are many guides on how to ‘tune’ MySQL on the internet, most of which contain conflicting, misleading or even damaging information. Any guide that claims to have ‘the best’ my.cnf layout should be treated with suspicion. For a guide on a few of the more common steps, please do check out our MySQL Troubleshooting and Tuning guide.

While these guides can help with some common issues and configurations, they are no substitute for consulting an experienced DBA who can optimise for your application and solution, especially if your application is not standard off-the-shelf software.

Next Article > Migrate Your Databases

  • Useful Links
  • SMB
  • Enterprise
  • Channel
  • Public Sector
  • ANS Data Centres
  • About ANS
  • Careers
  • Blog
  • Get in touch
  •  
  • Sales 0800 458 4545
  • Support 0800 230 0032
  • Get in touch

© ANS Group Limited | Terms and Conditions | Corporate Guidance | Sitemap
ANS Group Limited, registered in England and Wales, company registration number 03176761, registered office 1 Archway, Birley Fields, Manchester M15 5QJ