77范文网 - 专业文章范例文档资料分享平台

MySQL 5.5.25(rpm)安装及升级到5.6.26 for RedHat Enterprise Li

来源:网络收集 时间:2020-06-23 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

MySQL5.5.25(rpm)安装及升级到5.6.26 for RedHat Enterprise Linux 6.4

环境:RedHat Enterprise Linux 6.4(64bit) MySQL:5.6.25 IP:192.168.15.166

步骤一:准备工作:

a、建议删除系统存在的mysql用户 [root@mysql01 Desktop]# idmysql

uid=27(mysql) gid=27(mysql) groups=27(mysql) [root@mysql01 Desktop]# userdel -r mysql

b、清理已安装的mysql程序包 [root@suzzy ~]# rpm -qa|grepmysql mysql-server-5.1.66-2.el6_3.x86_64 dovecot-mysql-2.0.9-5.el6.x86_64 qt-mysql-4.6.2-25.el6.x86_64 rsyslog-mysql-5.8.10-6.el6.x86_64 mysql-5.1.66-2.el6_3.x86_64

mod_auth_mysql-3.0.0-11.el6_0.1.x86_64 mysql-devel-5.1.66-2.el6_3.x86_64 mysql-libs-5.1.66-2.el6_3.x86_64

使用rpm -e 包名(都地上面显示)来清除安装包,如果碰到不能报错不能删除,加上参数 --nodeps强制删除即可。 例如:

[root@suzzy ~]# rpm -e qt-mysql-4.6.2-25.el6.x86_64 error: Failed dependencies:

qt4-mysql is needed by (installed) akonadi-1.2.1-2.el6.x86_64 [root@suzzy ~]# rpm -e qt-mysql-4.6.2-25.el6.x86_64 --nodeps

[root@suzzy ~]#rpm -e mysql-server-5.1.66-2.el6_3.x86_64 --nodeps [root@suzzy ~]# rpm -e dovecot-mysql-2.0.9-5.el6.x86_64 --nodeps [root@suzzy ~]# rpm -e qt-mysql-4.6.2-25.el6.x86_64 --nodeps [root@suzzy ~]# rpm -e rsyslog-mysql-5.8.10-6.el6.x86_64 --nodeps [root@suzzy ~]# rpm -e mysql-5.1.66-2.el6_3.x86_64 --nodeps

[root@suzzy ~]# rpm -e mod_auth_mysql-3.0.0-11.el6_0.1.x86_64 --nodeps [root@suzzy ~]# rpm -e mysql-devel-5.1.66-2.el6_3.x86_64 --nodeps [root@suzzy ~]# rpm -e mysql-libs-5.1.66-2.el6_3.x86_64 --nodeps

直到下面语句找不到mysql包为止

[root@mysql01 ~]# rpm -qa | grepmysql [root@mysql01 ~]#

注意:在卸载完成之后需要删除配置文件/etc/my.cnf和数据库文件/var/lib/mysql,保守起见

可将配置文件my.cnf进行改名处理。

[root@mysql01 Desktop]# rpm -qpl MySQL-client-advanced-5.6.25-1.el6.x86_64.rpm [root@mysql01 Desktop]# rpm -qpl MySQL-devel-advanced-5.6.25-1.el6.x86_64.rpm [root@mysql01 Desktop]# rpm -qpl MySQL-embedded-advanced-5.6.25-1.el6.x86_64.rpm [root@mysql01 Desktop]# rpm -qpl MySQL-server-advanced-5.6.25-1.el6.x86_64.rpm [root@mysql01 Desktop]# rpm -qpl MySQL-shared-advanced-5.6.25-1.el6.x86_64.rpm [root@mysql01 Desktop]# rpm -qpl MySQL-shared-compat-advanced-5.6.25-1.el6.x86_64.rpm [root@mysql01 Desktop]# rpm -qpl MySQL-test-advanced-5.6.25-1.el6.x86_64.rpm

步骤二:开始安装

1、建立用户组及用户

[root@mysql01 ~]# groupaddmysql

[root@mysql01 ~]# useradd -g mysqlmysql

2、将下载好的mysql程序rpm包上传至服务器 此处略过 或者:

[root@mysql01 Desktop]# unzip V76360-01.zip [root@mysql01 Desktop]# rpm -ivh MySQL-*

Preparing... ########################################### [100%] 1:MySQL-devel-advanced ########################################### [ 14%] 2:MySQL-client-advanced ########################################### [ 29%] 3:MySQL-test-advanced ########################################### [ 43%] 4:MySQL-embedded-advanced########################################### [ 57%] 5:MySQL-shared-compat-adv########################################### [ 71%] 6:MySQL-shared-advanced ########################################### [ 86%] 7:MySQL-server-advanced ########################################### [100%] 2015-08-28 10:56:58 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2015-08-28 10:56:58 0 [Note] /usr/sbin/mysqld (mysqld

5.6.25-enterprise-commercial-advanced) starting as process 4981 ...

2015-08-28 10:56:58 4981 [Note] InnoDB: Using atomics to ref count buffer pool pages 2015-08-28 10:56:58 4981 [Note] InnoDB: The InnoDB memory heap is disabled

2015-08-28 10:56:58 4981 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2015-08-28 10:56:58 4981 [Note] InnoDB: Memory barrier is not used 2015-08-28 10:56:58 4981 [Note] InnoDB: Compressed tables use zlib 1.2.3 2015-08-28 10:56:58 4981 [Note] InnoDB: Using Linux native AIO 2015-08-28 10:56:58 4981 [Note] InnoDB: Using CPU crc32 instructions

2015-08-28 10:56:58 4981 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2015-08-28 10:56:58 4981 [Note] InnoDB: Completed initialization of buffer pool

2015-08-28 10:56:58 4981 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

2015-08-28 10:56:58 4981 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB 2015-08-28 10:56:58 4981 [Note] InnoDB: Database physically writes the file full: wait...

2015-08-28 10:56:59 4981 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB 2015-08-28 10:57:00 4981 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB 2015-08-28 10:57:01 4981 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

2015-08-28 10:57:01 4981 [Warning] InnoDB: New log files created, LSN=45781 2015-08-28 10:57:01 4981 [Note] InnoDB: Doublewrite buffer not found: creating new 2015-08-28 10:57:01 4981 [Note] InnoDB: Doublewrite buffer created

2015-08-28 10:57:01 4981 [Note] InnoDB: 128 rollback segment(s) are active. 2015-08-28 10:57:01 4981 [Warning] InnoDB: Creating foreign key constraint system tables.

2015-08-28 10:57:02 4981 [Note] InnoDB: Foreign key constraint system tables created 2015-08-28 10:57:02 4981 [Note] InnoDB: Creating tablespace and datafile system tables. 2015-08-28 10:57:02 4981 [Note] InnoDB: Tablespace and datafile system tables created. 2015-08-28 10:57:02 4981 [Note] InnoDB: Waiting for purge to start

2015-08-28 10:57:02 4981 [Note] InnoDB: 5.6.25 started; log sequence number 0 2015-08-28 10:57:02 4981 [Note] RSA private key file not found:

/var/lib/mysql//private_key.pem. Some authentication plugins will not work. 2015-08-28 10:57:02 4981 [Note] RSA public key file not found:

/var/lib/mysql//public_key.pem. Some authentication plugins will not work. A random root password has been set. You will find it in '/root/.mysql_secret'. 2015-08-28 10:57:03 4981 [Note] Binlog end

2015-08-28 10:57:03 4981 [Note] InnoDB: FTS optimize thread exiting. 2015-08-28 10:57:03 4981 [Note] InnoDB: Starting shutdown...

2015-08-28 10:57:04 4981 [Note] InnoDB: Shutdown completed; log sequence number 1625977

2015-08-28 10:57:04 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2015-08-28 10:57:04 0 [Note] /usr/sbin/mysqld (mysqld

5.6.25-enterprise-commercial-advanced) starting as process 5006 ...

2015-08-28 10:57:04 5006 [Note] InnoDB: Using atomics to ref count buffer pool pages 2015-08-28 10:57:04 5006 [Note] InnoDB: The InnoDB memory heap is disabled

2015-08-28 10:57:04 5006 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2015-08-28 10:57:04 5006 [Note] InnoDB: Memory barrier is not used 2015-08-28 10:57:04 5006 [Note] InnoDB: Compressed tables use zlib 1.2.3 2015-08-28 10:57:04 5006 [Note] InnoDB: Using Linux native AIO 2015-08-28 10:57:04 5006 [Note] InnoDB: Using CPU crc32 instructions

2015-08-28 10:57:04 5006 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2015-08-28 10:57:04 5006 [Note] InnoDB: Completed initialization of buffer pool 2015-08-28 10:57:04 5006 [Note] InnoDB: Highest supported file format is Barracuda. 2015-08-28 10:57:04 5006 [Note] InnoDB: 128 rollback segment(s) are active. 2015-08-28 10:57:04 5006 [Note] InnoDB: Waiting for purge to start

2015-08-28 10:57:04 5006 [Note] InnoDB: 5.6.25 started; log sequence number 1625977 2015-08-28 10:57:04 5006 [Note] RSA private key file not found:

/var/lib/mysql//private_key.pem. Some authentication plugins will not work. 2015-08-28 10:57:04 5006 [Note] RSA public key file not found:

/var/lib/mysql//public_key.pem. Some authentication plugins will not work. 2015-08-28 10:57:04 5006 [Note] Binlog end

2015-08-28 10:57:04 5006 [Note] InnoDB: FTS optimize thread exiting. 2015-08-28 10:57:04 5006 [Note] InnoDB: Starting shutdown...

2015-08-28 10:57:06 5006 [Note] InnoDB: Shutdown completed; log sequence number 1625987

A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER ! You will find that password in '/root/.mysql_secret'.

You must change that password on your first connect, no other statement but 'SET PASSWORD' will be accepted.

See the manual for the semantics of the 'password expired' flag.

Also, the account for the anonymous user has been removed.

In addition, you can run:

/usr/bin/mysql_secure_installation

which will also give you the option of removing the test database. This is strongly recommended for production servers.

See the manual for more instructions.

Please report any problems at http://bugs.mysql.com/

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

New default config file was created as /usr/my.cnf and

will be used by default by the server when you start it. You may edit this file to change server settings

[root@mysql01 Desktop]# cat /root/.mysql_secret

# The random password set for the root user at Fri Aug 28 10:57:02 2015 (local time): FY2X3PPff8VzaEn5

3、配置并启动mysql及设置开机自动启动

[root@mysql01 Desktop]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf [root@mysql01 Desktop]# ls -l /etc/my.cnf

-rwxr-xr-x. 1 root root 1126 Aug 28 11:09 /etc/my.cnf [root@mysql01 Desktop]# ps -ef | grepmysql

root 5369 5167 0 11:10 pts/1 00:00:00 grepmysql [root@mysql01 Desktop]# servicemysql start Starting MySQL..[ OK ]

[root@mysql01 Desktop]# servicemysql status

MySQL running (5507) [ OK ]

[root@mysql01 Desktop]# chkconfig --list | grepmysql mysql

备注:如2、3、4为off,即mysql位设置为开机自动启动,可以使用如下方法设置 [root@mysql01 Desktop]# chkconfig --list | grepmysql mysql

0:off

1:off

2:off

3:off

4:off

5:off

6:off

[root@mysql01 Desktop]# chkconfig --level 2345 mysql on [root@mysql01 Desktop]# chkconfig --list | grepmysql mysql

4、登录系统:

[root@mysql01 Desktop]# mysql -uroot -p Enter password: FY2X3PPff8VzaEn5 或者:

[root@mysql01 Desktop]# mysql -u root -p Enter password: FY2X3PPff8VzaEn5 或者:

[root@mysql01 Desktop]# mysql -uroot -pFY2X3PPff8VzaEn5 或者:

[root@mysql01 Desktop]# mysql -u root -pFY2X3PPff8VzaEn5 或者:

[root@mysql01 Desktop]# mysql -uroot -pFY2X3PPff8VzaEn5

Welcome to the MySQL monitor. Commands end with ; or \\g.

0:off

1:off

2:on

3:on

4:on

5:on

6:off

0:off

1:off

2:on

3:on

4:on

5:on

6:off

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库MySQL 5.5.25(rpm)安装及升级到5.6.26 for RedHat Enterprise Li在线全文阅读。

MySQL 5.5.25(rpm)安装及升级到5.6.26 for RedHat Enterprise Li.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/jiaoyu/1124307.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: