5.2.1 Procedure 4: Upgrading Application

Table 5-2 Procedure 4: Upgrading Application

STEP # This procedure upgrades the MySQL application on the server.Check off ( ✓ ) each step as it is completed. Boxes have been provided for this purpose under each step number. SHOULD THIS PROCEDURE FAIL, CONTACT MY ORACLE SUPPORT AND ASK FOR ASSISTANCE.

1.

☐

Linux server: Stop MySQL replication

  • Log into Query Server as root.

    # cd /usr/bin/

  • Stop MySQL:

    # ./mysqladmin shutdown -p
    Enter password: <mysql password>

2.

☐

Linux server: Backup the my.cnf file

Copy the /etc/my.cnf file to /var/tmp/ directory

#/etc/my.cnf

3.

☐

Linux server:

Create mysql1 directory if not exist

# mkdir /usr/mysql/mysql1

4.

☐

Linux server: If upgrading MySQL using DVD, otherwise skip this step

Insert the Upgrade Media into the DVD drive of Linux server. Run the following command:

# cd /cdrom/cdrom0

Go to step 6.

5.

☐

Linux server: Mount the ISO if upgrading MySQL using iso

First copy the MySQL ISO to /tmp directory of query server. Login on query server as root user and run the following commands:

# cd /
# mkdir /mnt/iso
# mount -o loop <Name of ISO> /mnt/iso

Example:

# mount -o loop LSMSQS.linux-14.1.0.0.0_141.3.0.iso /mnt/iso

6.

☐

Linux server: Upgrade MySQL package

# ./install_mysql_linux

7.

☐

Linux server: Unmount the ISO if upgraded MySQL using ISO, otherwise skip this step

After completing the upgrade of MySQL, unmount the ISO:

# cd /
# umount /mnt/iso

8.

☐

Linux server: Eject the media if upgraded MySQL using DVD, otherwise skip this step

After completing the upgrade of MySQL, eject the DVD and return the media to its case:

# cd /
# eject cdrom

9.

☐

Linux server: Check ownership of mysql1 directory

# ls -ltr /usr

Change the ownership and permission of mysql1 directory in /usr by using the following commands:

# chown mysql:mysql /usr/mysql/mysql1/
# chmod 755 /usr/mysql/mysql1

Verify once more that the ownership and permission has been changed.

# ls -ltr /usr

10.

☐

Linux server: Modify MySQL configuration file

Run the following command:

# vi /etc/my.cnf

Copy the content of Procedure 3 step 9 in my.cnf file and save it.

11.

☐

Linux server: Stop MySQL if running

  • Check if MySQL process is running:

    # ps –ef | grep mysql

  • If it is not running, directly go to next step of this procedure. If it is running, stop MySQL.

    # cd /usr/bin
    # ./mysqladmin shutdown –p
    Enter password: <mysql password>

12.

☐

Linux server: Reset the password

  • Change to directory /usr/bin

    # cd /usr/bin

  • Reset the password using the following commands:

    # /usr/sbin/mysqld --skip-grant-tables &
    # ./mysql
    mysql> UPDATE mysql.user SET PASSWORD=PASSWORD('<Enter password>'), password_expired = 'N' WHERE USER = 'lsmsrepl';
    Query OK, 2 rows affected (0.07 sec) Rows matched: 2 Changed: 2 Warnings: 0
    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)
    mysql> exit;
  • Stop MySQL.

    # ./mysqladmin shutdown –p
    Enter password: <mysql password>
  • Restart MySQL

    # /usr/sbin/mysqld --basedir=/usr --skip-replica-start &

13.

☐

Linux server: Upgrade

complete

Upgrade and configuration are now complete. Go to next step in Table 6.

End of Procedure

THIS COMPLETES THE UPGRADE