Tip: 可以对卷进行快照,以方便恢复,但是要注意的是:
[root@upgrade-slave ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_data vg_test_for_mysqlupgrade -wi-ao---- 1.73t
lv_home vg_test_for_mysqlupgrade -wi-ao---- 50.00g
lv_root vg_test_for_mysqlupgrade -wi-ao---- 100.00g
lv_swap vg_test_for_mysqlupgrade -wi-ao---- 16.00g
lv_var vg_test_for_mysqlupgrade -wi-ao---- 100.00g
[root@upgrade-slave ~]# lvcreate -L 150G -s -n lv_s_data /dev/vg_test_for_mysqlupgrade/lv_data
Logical volume "lv_s_data" created.
[root@upgrade-slave ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_data vg_test_for_mysqlupgrade owi-aos--- 1.73t
lv_home vg_test_for_mysqlupgrade -wi-ao---- 50.00g
lv_root vg_test_for_mysqlupgrade -wi-ao---- 100.00g
lv_s_data vg_test_for_mysqlupgrade swi-a-s--- 150.00g lv_data 0.00
lv_swap vg_test_for_mysqlupgrade -wi-ao---- 16.00g
lv_var vg_test_for_mysqlupgrade -wi-ao---- 100.00g
[root@upgrade-slave ~]#
安装与原数据库相同版本的mysql
[root@upgrade-slave src]# rpm -ivh Percona-Server-server-51-5.1.73-rel14.12.624.rhel6.x86_64.rpm Percona-Server-client-51-5.1.73-rel14.12.624.rhel6.x86_64.rpm
Preparing... ########################################### [100%]
1:Percona-Server-client-5########################################### [ 50%]
2:Percona-Server-server-5########################################### [100%]
151126 15:54:42 [ERROR] /usr/sbin/mysqld: unknown option '--myisam_recover_options'
151126 15:54:42 [ERROR] Aborting
151126 15:54:42 [Note] /usr/sbin/mysqld: Shutdown complete
Installation of system tables failed! Examine the logs in
/var/lib/mysql for more information.
You can try to start the mysqld daemon with:
shell> /usr/sbin/mysqld --skip-grant &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!
Starting MySQL (Percona Server).........................Manager of pid-file quit without updating file.[FAILED]
Giving mysqld 2 seconds to start
Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
See http://www.percona.com/doc/percona-server/5.1/management/udf_percona_toolkit.html for more details
[root@upgrade-slave src]# echo $?
0
[root@upgrade-slave src]#
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。