Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk10 min

How to Migrate to MySQL 8 on a Linux VPS

Migrate MySQL 5.7 to 8.0 on Ubuntu, Debian, Enterprise Linux, or Fedora with a verified backup, rehearsed compatibility checks, exact package commands, and a rollback plan.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The safest MySQL 5.7-to-8.0 migration on a Linux VPS is a rehearsed, recoverable change: inventory the existing installation, create and verify a full backup that includes the mysql system database, test the upgrade on a representative copy, then either restore a logical dump into a new MySQL 8 server or perform a supported package upgrade. MySQL 8.0 cannot be downgraded normally to 5.7 or to an earlier 8.0 release, so your verified pre-upgrade backup is the rollback plan.

Choose the migration method before touching production

There are two fundamentally different ways to move from MySQL 5.7 to MySQL 8.0. A logical migration exports SQL from the old instance, installs and initializes MySQL 8, and imports that SQL. An in-place upgrade replaces the server packages and lets the existing data directory be upgraded by the supported package path. The correct choice depends on the host, distribution, repository provenance, data size, and how much downtime you can schedule.

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Logical dump-and-restore

Use this path when you are changing VPS providers, Linux distributions, installation methods, or database forks, or when you want a clean target installation. It also gives you a clear testable artifact: the SQL dump. The trade-offs are the time required to export and import data, downtime while the final copy is made, and possible SQL edits for features that changed, were deprecated, or were removed between releases.

Supported in-place package upgrade

An in-place change can reduce data-copy time because the existing data directory remains in place. It is appropriate only when the exact installation and repository path supports the transition. A MySQL APT or Yum repository configured for the 5.7 series will not silently perform a 5.7-to-8.0 move; you must select the 8.0 series first. In-place is not a general solution for MariaDB, Percona-derived, binary-tarball, or container installations unless that product’s documented path explicitly supports it.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Decision point Logical migration In-place upgrade
Host or distribution change Suitable; install MySQL 8 on the target and restore the dump. Usually unsuitable because the original data directory and package environment are being retained.
Downtime Longer for a full import; a final dump requires writes to stop or replication to catch up. Usually limited to package installation, service restart, and validation.
Rollback Point the application back to the old server if it was preserved, or restore the pre-upgrade backup. Restore the verified pre-upgrade backup; ordinary downgrade is unsupported.
Large data sets Export and import time can be substantial; rehearse duration and disk requirements. May avoid a full data copy, but conversion and startup checks still take time.
SQL compatibility work Dumped SQL may need edits for changed, deprecated, or removed features. Existing objects are checked during startup, but application queries and stored code still require testing.
Connectors and plugins Recreate or verify users, grants, plugins, keyring settings, and application connectors on the target. Rebuild or reinstall language interfaces after the release change and verify local plugins.
Testability Easy to rehearse by importing the same dump into a disposable MySQL 8 instance. Rehearse by cloning the VPS or data directory through your supported snapshot or backup process.

Inventory the VPS and application

Record the current state before choosing commands. The inventory prevents an apparently simple package update from missing a dependency, an encryption key, or a second process that writes to the database.

  • MySQL version and exact build, obtained from the client or server with SELECT VERSION();.
  • Linux distribution and release, package manager, kernel architecture, and available disk space for backups, temporary files, and an imported copy.
  • Installation source: native distribution packages, the MySQL APT or Yum repository, a binary tarball, a container, or a MariaDB/Percona fork.
  • Data directory, binary-log location, configuration files, service name, socket path, and custom systemd overrides.
  • Databases, users, grants, authentication plugins, stored procedures and functions, scheduled events, triggers, views, generated columns, and non-default SQL modes.
  • Character sets, collations, tablespaces, encryption or keyring configuration, and any third-party plugins.
  • Replication topology, read replicas, backup jobs, cron or systemd timers, monitoring checks, and maintenance scripts.
  • Every application connector and its version, including PHP MySQL extensions, Perl DBD::mysql, language drivers, connection options, and TLS settings.

Also document how the application discovers the database: DNS name, private address, socket, environment variable, secret store, or hard-coded configuration. A successful server upgrade is not a successful migration if the application continues to use the wrong endpoint.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create and verify the rollback backup

MySQL states that downgrade from MySQL 8.0 to MySQL 5.7, and downgrade from one MySQL 8.0 release to an earlier 8.0 release, is not supported. Do not treat an attempted package removal as a rollback procedure. Preserve the old server until the new one has passed production validation, and keep a backup outside the VPS.

Take a full backup of application databases and the mysql system database. The system database contains accounts, grants, and other server metadata that a database-only export omits. Use your normal approved backup utility, and record its output location, encryption, retention, and restore credentials.

For a complete logical export, the official example is:

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
mysqldump -u root -p --add-drop-table --routines --events --all-databases --force > data-for-upgrade.sql

The command includes all databases, routines, and events, and adds drop statements before recreated tables. The --force option allows the dump to continue after some SQL errors; it does not make the resulting file complete or safe. Read the dump output and error log, investigate every error, and do not proceed merely because a file was created.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Copy the backup to storage outside the VPS. Verify that it can be read, and perform an actual restore into a disposable test server. A backup that has never been restored is only an assumption about recoverability. Check that the restored instance contains the expected databases, users, routines, events, and row counts.

Rehearse MySQL 8 compatibility

MySQL recommends performing the procedure on test systems first and then on production systems. Build a representative clone or temporary VPS with enough CPU, memory, storage, and data to expose conversion and query problems. A tiny sample database can miss issues that appear only with production-sized indexes, collations, or stored code.

  1. Install the same MySQL 8 series and configuration you intend to use in production.
  2. Restore a recent logical backup, or clone the instance using a supported snapshot method.
  3. Run application schema migrations and exercise authentication, reads, writes, transactions, background jobs, and administrative tasks.
  4. Check stored routines, triggers, events, generated columns, views, reserved words, SQL modes, character sets, and collations.
  5. Inspect the MySQL error log during startup and while running representative queries.
  6. Test every connector and plugin, including TLS, authentication plugins, keyring or encryption integration, and connection pooling.
  7. Measure restore or package-upgrade duration, disk consumption, application downtime, and the checks you will use during the production cutover.

SQL produced for an earlier release can fail on MySQL 8 because features changed, were deprecated, or were removed. Fix those statements in the rehearsal, not during the maintenance window. Rebuild or reinstall language interfaces such as PHP MySQL extensions and Perl DBD::mysql after changing the server release, then run the application against the test instance.

Logical migration: step-by-step

1. Freeze the source plan

Choose a maintenance window long enough for the final export, transfer, import, validation, and contingency. Stop jobs that write to MySQL, or arrange replication or another clearly defined method for catching up changes. Confirm that the old VPS, its data directory, and its verified backup will remain available until sign-off.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

2. Export the source

Run a MySQL-compatible export with routines and events when the application uses them. Include the mysql system database. Review warnings and errors, inspect the file size, and if practical compare object lists and row counts with the source. Compress or encrypt the dump for transfer according to your operational policy, but retain a readable copy for the restore test.

3. Install and initialize the target

Install MySQL 8 using the target distribution’s supported method. Initialize the new data directory through that method rather than copying an old data directory into an incompatible server. Start the service with systemd where applicable, confirm that it is listening on the expected socket or port, and set the intended root or administrative authentication before importing.

4. Import and investigate errors

Import the dump with a MySQL client appropriate to the target. Watch the server error log and client output. Resolve syntax, collation, authentication, privilege, and plugin errors; do not hide them with additional force options. Re-run failed statements after correcting the underlying issue, and keep a record of any intentional SQL edits.

5. Recreate and verify server objects

Confirm users, grants, authentication plugins, routines, events, triggers, views, scheduled jobs, and encryption or keyring settings. A logical dump may not reproduce external plugins or operating-system integrations automatically. Compare object counts and representative row counts, then use checksums or application-level invariants where they are meaningful for your data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

6. Point a test application at MySQL 8

Update a staging copy of the application to the new endpoint and run read/write smoke tests, login flows, queue workers, reports, migrations, and backup jobs. Check latency and errors under realistic concurrency. Only after these checks pass should you schedule the production switch.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

In-place upgrade on Ubuntu or Debian with APT

Use this procedure only for an installation whose package source and distribution are supported by the MySQL APT guide. Confirm the current series and repository configuration first. Select the MySQL 8.0 release series in the repository configuration; do not select a lower series than the one already installed, because that would be an unsupported downgrade operation.

  1. Take and verify the full rollback backup described above.
  2. Confirm that the VPS distribution release is supported by the repository and that no MariaDB or conflicting MySQL packages are supplying the server.
  3. Open the MySQL APT repository configuration and select the 8.0 series.
  4. Refresh package metadata:
    sudo apt-get update
  5. Install the server package:
    sudo apt-get install mysql-server
  6. Allow the package process to complete and note that the server restarts after the update.
  7. Inspect service status and startup logs, then run SELECT VERSION(); and perform the post-upgrade checks.

Do not add a separate mysql_upgrade command when the server is MySQL 8.0.16 or later. From 8.0.16 onward, the server performs those upgrade tasks during startup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In-place upgrade with Yum or DNF

This path applies to Enterprise Linux or Fedora-style systems using the MySQL Yum repository. The repository does not automatically move a 5.7 installation to 8.0 while the 5.7 subrepository remains selected.

  1. Verify the backup, repository support, current package source, data directory, and service unit.
  2. Disable the MySQL 5.7 subrepository and enable the MySQL 8.0 series in the repository configuration.
  3. Refresh and apply the package update with the package manager available on the VPS:
    sudo yum update mysql-server

    or:

    sudo dnf upgrade mysql-server
  4. Expect the server to restart after the package update. Check service status and the error log before allowing application traffic back.
  5. Verify the version, accounts, grants, replication, scheduled jobs, connectors, and application behavior.

Do not mix packages from unrelated repositories or attempt to force a 5.7 data directory through an unsupported fork-to-MySQL conversion. Use a logical migration when the package lineage is unclear.

Post-upgrade validation and production cutover

MySQL 8.0.16 and later perform the former mysql_upgrade work during server startup. Your responsibility is to verify the result rather than to run a redundant command.

  • Read the complete startup and error logs for upgrade failures, table errors, authentication warnings, and plugin or keyring problems.
  • Run SELECT VERSION(); and confirm that the result is the intended MySQL 8 release.
  • Check databases, table counts, views, routines, triggers, events, users, grants, authentication plugins, and TLS settings.
  • Confirm replication channels, binary logging, scheduled events, cron jobs, monitoring, and backups.
  • Run application smoke tests covering login, representative reads, writes, transactions, reports, queues, and schema migrations.
  • Monitor connection errors, query latency, resource consumption, and application logs during an observation period.

For a final cutover, stop writes or pause the application, make the final logical export or allow replication to catch up, complete the import or package switch, perform the validation checklist, and then direct application traffic to the MySQL 8 endpoint. Keep the old server isolated but intact until the agreed observation period has ended.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Rollback and failure handling

The package upgrade will not start

Do not repeatedly force package scripts. Preserve the error output, check repository series and distribution support, confirm free disk space, and restore service using the documented package recovery procedure. If the installation cannot be made healthy promptly, restore the pre-upgrade backup or switch traffic to the preserved old instance.

The server starts but objects or queries fail

Stop application writes, capture the error log and failing statements, and compare them with the rehearsal results. Typical causes include removed syntax, changed reserved words, collation differences, SQL mode changes, authentication-plugin incompatibility, missing plugins, and connector versions that do not support MySQL 8. Correct and retest on the staging copy before trying again in production.

The import reports errors

Keep the original dump unchanged, identify every failed statement, and fix the schema or SQL incompatibility in a working copy. Recreate the target if necessary and repeat the import cleanly. Never assume --force made a partial import equivalent to a valid migration.

You need to return to MySQL 5.7

There is no supported ordinary downgrade from MySQL 8.0 to 5.7 or to an earlier 8.0 release. Stop writes to the failed MySQL 8 instance, preserve relevant logs, and restore the verified pre-upgrade backup to a supported MySQL 5.7 server, or redirect traffic to the untouched old server. Reconcile any writes made after cutover before reopening the application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Final production checklist

  • Current version, Linux release, installation source, repository series, data directory, plugins, keyring, replication, and jobs are documented.
  • A full backup includes application databases and the mysql system database, is stored off-server, and has passed a restore test.
  • A representative MySQL 8 rehearsal passed schema, authentication, connector, application, and performance checks.
  • The chosen path is supported: logical migration for host, distribution, or fork changes; in-place only for an explicitly supported package path.
  • Maintenance timing, final-write handling, validation commands, monitoring, and rollback ownership are agreed before cutover.
  • After migration, logs, version, objects, grants, replication, jobs, connectors, and application transactions are verified before declaring success.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.