Backing Up the Database Configuration File

Technical Articles

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US

Not every customization made to MySQL 5.6 or 5.7 will be compatible with MySQL 8.0, so it is not recommended to copy the database configuration file from your currently installed version of MySQL for use as the database configuration file for MySQL 8.0. However, it is best practice to back up your current database configuration file to keep for reference for when you are making customizations to MySQL 8.0.

  1. Log in to the server hosting the MySQL database.
  2. Locate the my.cnf file in the following location: /etc/my.cnf
  3. Copy the my.cnf file to the current user's home directory by executing the following command:
    cp /etc/my.cnf ~/