mysql5.1升级5.5操作步骤

参数的更改:

#skip-locking 在5.5里已经不识别了,改成
skip-external-locking
#log-long-format 在5.5里已经不识别了,改成
log-short-format
#log_slow_queries 在5.5里已经不识别了,改成
slow-query-log
#default-character-set = utf8 在5.5里已经不识别了,改成
character-set-server = utf8
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_file_io_threads已经不识别了,改成
innodb_read_io_threads = 8
innodb_write_io_threads = 8
 
innodb_io_capacity = 2000
innodb_file_format = Barracuda
##增加半同步配置
rpl_semi_sync_master_enabled = 1
rpl_semi_sync_master_timeout = 1000
rpl_semi_sync_slave_enabled = 1

[Warning] --myisam_max_extra_sort_file_size is deprecated and does nothing in this version. It will be removed in a
future release.


第一步:

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

第二步:执行更新程序

[root@vm02 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)
mysql> install plugin rpl_semi_sync_master soname 'semisync_master.so';
mysql> SET GLOBAL rpl_semi_sync_master_enabled=ON;
 
mysql> install plugin rpl_semi_sync_slave soname 'semisync_slave.so';
mysql> SET GLOBAL rpl_semi_sync_slave_enabled =ON;

第一次执行完后,就无需再执行了。

至此,升级过程完毕。

还没有评论,快来抢沙发!

发表评论

  • 😉
  • 😐
  • 😡
  • 😈
  • 🙂
  • 😯
  • 🙁
  • 🙄
  • 😛
  • 😳
  • 😮
  • emoji-mrgree
  • 😆
  • 💡
  • 😀
  • 👿
  • 😥
  • 😎
  • ➡
  • 😕
  • ❓
  • ❗
  • 67 queries in 0.372 seconds