Upgrade MySQL

Last updated: January 12, 2023
Audience: All UW

Upgrading MySQL

  1. Running a MySQL server on your account requires occasional maintenance. Be sure to read and understand the Guidelines and Considerations when Running MySQL.
  2. Log into your web development server using a terminal emulator. If you’re not sure how, click here for instructions.
  3. Type the following command:

    • The script will ask if you would like to upgrade mysql, just type ‘y’ and hit enter to continue.
    • The script will ask you to enter the password for the mysql ‘root’ user.  Once you hit enter, the upgrade script will run the following steps:
      • Shuts down current mysql instance
      • Creates a new .my.cnf file
      • Checks for existing port number and re-uses it in the .my.cnf file
      • Restarts MySQL and upgrades database tables to the new version.
      • Restarts MySQL again after database upgrade is complete.
    • Finally, the script will start up MySQL and give you the port number (again) and the host name.  Check that this matches your current settings.
    • Note: if errors occur during the upgrade, or if you are unable to run the following command successfully, please send email to help@uw describing the problem.
  4. Verify that MySQL is properly responding by typing the following into the command prompt:
    ~/mysql/bin/mysqladmin -u root -p version

If MySQL is running, a message similar to the following will be displayed:

Enter password:
/rc00/d21/accountname/mysql/bin/mysqladmin Ver 8.42 Distrib 5.6.39, for linux-glibc2.12 on x86_64
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Server version 5.6.39
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /rc00/d21/accountname/mysql.sock
Uptime: 2 min 42 sec

Threads: 1 Questions: 7 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.043

Success!  Your newly upgraded MySQL server is now running in your account and is ready to accept connections.  Be sure and check any current applications or websites to make sure that they are running normally.

At this point you can learn about MySQL administration to get more familiar with MySQL, and you can install phpMyAdmin to help administer your databases.