- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Upgrading MySQL Binary or Package-based Installations on Unix/Linux
152 Lectures 16 hours
87 Lectures 5.5 hours
Let us understand how MySQL binary and package-based installations can be upgraded in Unix or Linux. This can be done in-place as well as by using a logical upgrade method. Let us understand both these methods in brief −
In place upgrade
An in−place upgrade involves shutting down the old MySQL server, replacing the old MySQL binaries or the packages with the new ones.
Once this is done, the MySQL server is restarted on the existing data directory.
After this, the remaining parts of the existing installation, that require some kind of upgrade, are upgraded.
For some Linux platforms, MySQL installation from RPM or Debian packages will include ‘systemd’ support that helps manage MySQL server startup and shut down.
The command ‘mysqld_safe’ wouldn’t have been installed on such systems.
A logical upgrade involves exporting the SQL from old MySQL instance.
The existing data needs to be exported from the previous MySQL installation, which can be done using the below command -
mysqldump -u root -p --add-drop-table --routines --events --all-databases --force > data-for-upgrade.sql
The old MySQL server is shut down using the below command −
mysqladmin -u root -p shutdown
A new data directory is initiated using the below command −
mysqld --initialize --datadir=/path/to/8.0-datadir &
Reset the root password using the below command −
shell> mysql -u root -p Enter password: **** <− enter temporary root password mysql> ALTER USER USER() IDENTIFIED BY 'your new password';
Load the previously created dump file into the newly created MySQL server using the below command −
mysql -u root -p --force < data-for-upgrade.sql
MySQL Cluster Upgrade
The MGM nodes are upgraded.
The data nodes are upgraded one at a time.
The API nodes are upgraded one at a time, and this includes the MySQL servers.
The data dictionary is upgraded.
The system tables are upgraded.
The system is restarted.
- Downgrading Binary and Package-based Installations on Unix/Linux
- Installing MySQL on Unix/Linux Using Generic Binaries
- Upgrading MySQL on Windows
- Perl Installation on Unix and Linux Platform
- Init process on UNIX and Linux systems
- What are Named Pipes or FIFO in Linux/Unix systems?
- How to change file or directory permission in Linux/Unix?
- Difference between Linux and Unix
- Installing MySQL on Linux
- Linux Package Management with Aptitude
- Accessing The Unix/Linux password database (pwd)
- Select all duplicate MySQL rows based on one or two columns?
- Upgrading MySQL with the MySQL Yum Repository
- Upgrading MySQL with the MySQL APT Repository