MySQL 5.1升級5.5操作步驟

來源:互聯網
上載者:User

參數的更改:
skip-locking 在5.5裡已經不識別了,改成skip-external-locking
basedir = /usr/local/mysql5.5
datadir =/usr/local/mysql5.5/data
innodb_data_home_dir = /usr/local/mysql5.5/data
innodb_log_group_home_dir = /usr/local/mysql5.5/data
user = mysql
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_io_capacity = 2000
innodb_file_format = Barracuda

第一步:
/usr/local/mysql5.5/bin/mysqld --defaults-file=/etc/my.cnf --skip-grant-tables &

第二步:執行更新程式
[root@ www.bkjia.com mysql5.5]# bin/mysql_upgrade
Looking for 'mysql' as: bin/mysql
Looking for 'mysqlcheck' as: bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql.sock'
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql.sock'
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.servers                                      OK
mysql.slow_log                                     OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
test.heartbeat                                     OK
test.log20111127                                   OK
test.log20111128                                   OK
test.log20111129                                   OK
test.log20111130                                   OK
test.log20111201                                   OK
test.log20111202                                   OK
test.log20111203                                   OK
test.log20111204                                   OK
test.log20111205                                   OK
test.log20111206                                   OK
test.log20111207                                   OK
test.t1                                            OK
test.t2                                            OK
Running 'mysql_fix_privilege_tables'...
OK

第三步:
/usr/local/mysql5.5/bin/mysqladmin -uroot -p123456 shutdown

第四步:
/usr/local/mysql5.5/bin/mysqld_safe  --defaults-file=/etc/my.cnf --user=mysql &

mysql> select version();
+------------+
| version()  |
+------------+
| 5.5.19-log |
+------------+
1 row in set (0.00 sec)

mysql> select @@innodb_version; 
+------------------+
| @@innodb_version |
+------------------+
| 1.1.8            |
+------------------+
1 row in set (0.00 sec)

至此,升級過程完畢。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.