Upgrade with Mysql_upgrade upgrade Authorization form

Source: Internet
Author: User

1.7.1 upgrade with Mysql_upgrade upgrade Authorization form (1)

This upgrade method is more convenient, through the Mysql_upgrade command can be completed. Here's a demonstration of the entire upgrade process.

1) Modify the MY.CNF configuration file because the parameters in MySQL5.1 are not recognized in the 5.5 version.

  1. #skip-locking in 5.5, changed to
  2. Skip-external-locking
  3. #log-long-format in 5.5, changed to
  4. Log-short-format
  5. #log_slow_queries have not been recognized in 5.5, changed to
  6. Slow-query-log
  7. #Default-character-set = UTF8 has not been recognized in 5.5, changed to
  8. Character-set-server = UTF8
  9. #注释掉default_table_type = MyISAM? It's not recognized in 5.5 .
  10. #注释掉MyISAM_max_extra_sort_file_size's not been recognized in 5.5.
  11. #innodb_file_io_threads已经不识别了, change into
  12. Innodb_read_io_threads = 8
  13. Innodb_write_io_threads = 8
  14. # Change the previous built-in file format to Barracuda
  15. Innodb_file_format = Barracuda
  16. #注释掉同步的信息, otherwise start the times wrong
  17. #master-host = 192.168.110.20
  18. #Master-user = repl
  19. #Master-password = repl
  20. #master-connect-retry=
  21. #另如果你采用了InnoDB-plugin, write it off.
  22. #ignore_builtin_innodb
  23. #plugin-load=innodb=ha_innodb_plugin.so; innodb_trx=ha_innodb_plugin.so; innodb_locks=ha_innodb_plugin.so; innodb_lock_waits=ha_i
  24. nnodb_plugin.so; innodb_cmp=ha_innodb_plugin.so; innodb_cmp_reset=ha_innodb_plugin.so; innodb_cmpmem=ha_innodb_plugin.so;innodb_c
  25. mpmem_reset=ha_innodb_plugin.so

2) Modify Innodb_fast_shutdown equals 0. Let's take a look at what this parameter does.

Explanation: When MySQL is turned off, it is set to 1, does not erase dirty pages and insert buffer merge operations, and does not brush dirty pages into disk. Set to 0 to clean up dirty pages and insert buffer merge operations, and to brush dirty pages into the disk, so set the shutdown speed is the slowest. Set to 2, do not clean the dirty page and insert buffer merge operation, do not brush the dirty page into the disk, but instead of brush into the redo log transaction log, the next time it starts MySQL resume, the shutdown speed is the fastest. When you do an upgrade or downgrade operation, you should set it to 0 to ensure data integrity and avoid errors. This parameter supports dynamic modification.

The command to set this parameter is as follows:

    1. Set global innodb_fast_shutdown=0;

For an introduction to the Innodb_fast_shutdown parameters, see the MySQL5.5 Manual:

3) Close the MySQL service with the following command:

    1. /etc/init.d/mysql stop or mysqladmin-uroot-p123456 shutdown

4) Skip the MySQL authorization form to start the MySQL service with the following command:

    1. MySQLd --defaults-file=/etc/my.cnf--skip-grant-tables &

5) Perform the update as follows:

    1. [Email protected] mysql]#/usr/local/mysql/bin/mysql_upgrade
    2. Looking for ' MySQL ' As:bin/mysql
    3. Looking for ' Mysqlcheck ' As:bin/mysqlcheck
    4. Running ' Mysqlcheck ' with connection arguments: '--port=3306 '--socket=/tmp/mysql.sock '
    5. Running ' Mysqlcheck ' with connection arguments: '--port=3306 '--socket=/tmp/mysql.sock '
    6. Mysql.columns_priv OK
    7. Mysql.db OK
    8. Mysql.event OK
    9. Mysql.func OK
    10. Mysql.general_log OK
    11. Mysql.help_category OK
    12. Mysql.help_keyword OK
    13. Mysql.help_relation OK
    14. Mysql.help_topic OK
    15. Mysql.host OK
    16. Mysql.ndb_binlog_index OK
    17. Mysql.plugin OK
    18. Mysql.proc OK
    19. Mysql.procs_priv OK
    20. Mysql.servers OK
    21. Mysql.slow_log OK
    22. Mysql.tables_priv OK
    23. Mysql.time_zone OK
    24. Mysql.time_zone_leap_second OK
    25. Mysql.time_zone_name OK
    26. Mysql.time_zone_transition OK
    27. Mysql.time_zone_transition_type OK
    28. Mysql.user OK
    29. Test.heartbeat OK
    30. test.log20111127 OK
    31. test.log20111128 OK
    32. test.log20111129 OK
    33. test.log20111130 OK
    34. test.log20111201 OK
    35. test.log20111202 OK
    36. test.log20111203 OK
    37. test.log20111204 OK
    38. test.log20111205 OK
    39. test.log20111206 OK
    40. test.log20111207 OK
    41. Test.t1 OK
    42. Test.t2 OK
    43. Running ' Mysql_fix_privilege_tables ' ...
    44. Ok
    45. .7.1 Upgrade with Mysql_upgrade upgrade Authorization form (2)

      6) Close the MySQL service again with the following command:

        1. /etc/init.d/mysql stop or mysqladmin-uroot-p123456 shutdown

      7) normal start MySQL service, command as follows:

        1. Mysqld_safe --defaults-file=/etc/my.cnf --user=MySQL &

      8) To view the version as follows:

      1. MySQL> select version ();
      2. +-----------------------------------------------------------+
      3. | Version () |
      4. +-----------------------------------------------------------+
      5. | 5.5.20-enterprise-commercial-advanced-log |
      6. +-----------------------------------------------------------+
      7. 1 row in Set (0.00 sec)
      8. MySQL> select @ @innodb_version;
      9. +----------------------------+
      10. | @ @innodb_version |
      11. +----------------------------+
      12. | 1.1.8 |
      13. +----------------------------+
      14. 1 row in Set (0.00 sec)

      This completes the upgrade process.

      During the upgrade process, there is an issue to be aware of, which was encountered by the author prior to installation. RHEL5.3 a system crash occurred while installing MySQL5.5 (1-24), when the environment was: the system is rhel5.3,64 bit, XFS partition, MySQL5.5.20 binary version.

      When the system crashes, the author uses Delldrac remote management card capture screenshot 1-25.

      As you can see, the XFS file system has errors when reading and writing. This problem occurs because the RHEL5.3 system kernel does not bring the XFS file system, it is supported by patching to the kernel, and later the system is upgraded to RHEL5.5, the system is normal, and no freezing situation occurs.

      Attention

      RHEL5.5 version, the kernel supports XFS file systems.

Upgrade with Mysql_upgrade upgrade Authorization form

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.