Rpm包安装mysql,使用包如下:
Percona-Server-client-55-5.5.38-rel35.2.el6.x86_64.rpm
Percona-Server-devel-55-5.5.38-rel35.2.el6.x86_64.rpm
Percona-Server-server-55-5.5.38-rel35.2.el6.x86_64.rpm
Percona-Server-shared-55-5.5.38-rel35.2.el6.x86_64.rpm
安装完成后,做些初始配置
cp /usr/share/percona-server/my-small.cnf/etc/my.cnf
/usr/bin/mysqld_safe --user=mysql
[root@oel65 ~]# ps aux|grep mysql
/bin/sh /usr/bin/mysqld_safe --user=mysql
/usr/sbin/mysqld --basedir=/usr--datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql--log-error=/var/lib/mysql/oel65.err --pid-file=/var/lib/mysql/oel65.pid--socket=/var/lib/mysql/mysql.sock --port=3306
UPDATE mysql.user SET password=PASSWORD('123---')WHERE User='root';
停库
/usr/bin/mysqladmin shutdown
解压
tar xvfz Percona-Server-5.6.19-rel67.0-618.Linux.x86_64.tar.gz
mvPercona-Server-5.6.19-rel67.0-618.Linux.x86_64 Percona-Server-5.6.19
升级
cd Percona-Server-5.6.19
bin/mysqld_safe --defaults-file=/etc/my.cnf--user=mysql --datadir=/var/lib/mysql --log-error=/var/lib/mysql/oel65.err--pid-file=/var/lib/mysql/oel65.pid --socket=/var/lib/mysql/mysql.sock--port=3306 --skip-grant-tables &
bin/mysql_upgrade--defaults-file=/etc/my.cnf --user=mysql --socket=/var/lib/mysql/mysql.sock-uroot -p123--- &
bin/mysqladmin shutdown -p
bin/mysqld_safe --defaults-file=/etc/my.cnf--user=mysql --datadir=/var/lib/mysql --log-error=/var/lib/mysql/oel65.err--pid-file=/var/lib/mysql/oel65.pid --socket=/var/lib/mysql/mysql.sock--port=3306 &
upgrade过程:
[root@oel65 Percona-Server-5.6.19]#bin/mysql_upgrade --defaults-file=/etc/my.cnf --user=mysql--socket=/var/lib/mysql/mysql.sock -uroot -p123--- &
[4] 4868
[root@oel65 Percona-Server-5.6.19]#Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: bin/mysql
Looking for 'mysqlcheck' as: bin/mysqlcheck
Running 'mysqlcheck' with connectionarguments: '--port=3306' '--socket=/var/lib/mysql/mysql.sock' '--socket=/var/lib/mysql/mysql.sock'
Warning: Using a password on the commandline interface can be insecure.
Running 'mysqlcheck' with connectionarguments: '--port=3306' '--socket=/var/lib/mysql/mysql.sock''--socket=/var/lib/mysql/mysql.sock'
Warning: Using a password on the commandline interface can be insecure.
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.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info 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
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the commandline interface can be insecure.
Running 'mysqlcheck' with connectionarguments: '--port=3306' '--socket=/var/lib/mysql/mysql.sock''--socket=/var/lib/mysql/mysql.sock'
Warning: Using a password on the commandline interface can be insecure.
Running 'mysqlcheck' with connectionarguments: '--port=3306' '--socket=/var/lib/mysql/mysql.sock''--socket=/var/lib/mysql/mysql.sock'
Warning: Using a password on the commandline interface can be insecure.
moe.moe_test OK
OK
过程中遇到问题:
error while loading shared libraries:libssl.so.6
如下解决:
ln -sf /usr/lib64/libssl.so.10/usr/lib64/libssl.so.6
ln -sf /usr/lib64/libcrypto.so.10/usr/lib64/libcrypto.so.6
ERROR 1436 (HY000) at line 1920: Threadstack overrun: 6448 bytes used of a 131072 byte stack, and 128000 bytes needed.Use 'mysqld -O thread_stack=#' to specify a bigger stack.
如下解决:
修改/etc/my.cnf文件,加大thread_stack参数