Upgrading MySQL Server 5.1 Directly To MySQL Server 8.0 On Centos 6 With MySQLDump

00:02:20 Checking the MySQL version in some test sites.
00:06:00 Running the database backup script.
00:07:05 Installing Percona Toolkit to get the user logins.
00:09:15 Adding the MySQL 8.0 repo to the Centos 6
00:12:10 Starting the new MySQL service.
00:12:55 Changing the temporary root password.
00:17:15 Loading the backup into the new database.
00:19:10 Adding back the passwords.
00:20:40 Checking that the sites are working again.

In this video I am showing how to upgrade some databases from MySQL 5.1 to MySQL 8.0 and I ended up doing this video because of how I had to migrate some of my old databases, to a newer major version of MySQL. The process is not that difficult when it comes to getting the data across, but the problems then start to arise for when it comes to migrating the passwords.
Below is the backup script:
#MYSQL_USER=root
#MYSQL_PASS=rootpassword
#MYSQL_CONN="-u${MYSQL_USER} -p${MYSQL_PASS}"
#
# Collect all database names except for
# mysql, information_schema, and performance_schema
#
SQL="SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN"
SQL="${SQL} ('mysql','information_schema','performance_schema','sys')"

DBLISTFILE=/tmp/DatabasesToDump.text
mysql ${MYSQL_CONN} -ANe"${SQL}" > ${DBLISTFILE}

DBLIST=""
for DB in `cat ${DBLISTFILE}` ; do DBLIST="${DBLIST} ${DB}" ; done

MYSQLDUMP_OPTIONS="--routines --triggers --single-transaction"
mysqldump ${MYSQL_CONN} ${MYSQLDUMP_OPTIONS} --databases ${DBLIST} > all-dbs.sql


Below are the other commands:
yum install http://repo.percona.com/release/6/RPMS/noarch/percona-toolkit-2.2.20-1.noarch.rpm
pt-show-grants > grants.sql

https://dev.mysql.com/downloads/repo/yum/

#mv /usr/lib64/mysql/plugin/component_validate_password.so /usr/lib64/mysql/plugin/component_validate_password.so.disabled

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'New%Password';
mysql> UNINSTALL COMPONENT "file://component_validate_password";

CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'password123';
GRANT ALL ON drupal.* TO 'drupal'@'localhost';