rmp mysql 包_CentOS 6.5 使用rmp包 安装 MySQL 5.6.29

linux系统版本:CentOS release 6.5 (Final)

MySQL版本:5.6.29

下载地址360云盘:https://yunpan.cn/cY8pH5gAdUjut (提取码:c83e)

MySQL下载地址:

http://dev.mysql.com/downloads/mysql/5.6.html#downloads

选择如下:

a9da490e35d73ba10ffa5f790ff416fe.png

e22c3f1176cd21dfed8bf7d93cac2884.png

下载完成后将文件传到服务器上:

MySQL-client-5.6.29-1.linux_glibc2.5.x86_64.rpm

MySQL-devel-5.6.29-1.linux_glibc2.5.x86_64.rpm

MySQL-server-5.6.29-1.linux_glibc2.5.x86_64.rpm

f926b7c2815c4ee85991167241fb3dd3.png

提升用户权限到root,

[root@xiangmucache soft]# rpm -ivh MySQL-server-5.6.29-1.linux_glibc2.5.x86_64.rpm

warning: MySQL-server-5.6.29-1.linux_glibc2.5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

error: Failed dependencies:

libaio.so.1()(64bit) is needed by MySQL-server-5.6.29-1.linux_glibc2.5.x86_64

libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.6.29-1.linux_glibc2.5.x86_64

libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.6.29-1.linux_glibc2.5.x86_64

[root@xiangmucache soft]# yum install -y libaio

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* base: mirrors.yun-idc.com

* extras: mirror.neu.edu.cn

* updates: mirrors.neusoft.edu.cn

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package libaio.x86_64 0:0.3.107-10.el6 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================

Package Arch Version Repository Size

===================================================================================================================================================================

Installing:

libaio x86_64 0.3.107-10.el6 base 21 k

Transaction Summary

===================================================================================================================================================================

Install 1 Package(s)

Total download size: 21 k

Installed size: 34 k

Downloading Packages:

libaio-0.3.107-10.el6.x86_64.rpm | 21 kB 00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : libaio-0.3.107-10.el6.x86_64 1/1

Verifying : libaio-0.3.107-10.el6.x86_64 1/1

Installed:

libaio.x86_64 0:0.3.107-10.el6

Complete!

[root@xiangmucache soft]# rpm -ivh MySQL-server-5.6.29-1.linux_glibc2.5.x86_64.rpm

warning: MySQL-server-5.6.29-1.linux_glibc2.5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ########################################### [100%]

1:MySQL-server ########################################### [100%]

warning: user mysql does not exist - using root

warning: group mysql does not exist - using root

2016-03-16 16:37:05 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2016-03-16 16:37:05 0 [Note] /usr/sbin/mysqld (mysqld 5.6.29) starting as process 27303 ...

2016-03-16 16:37:05 27303 [Note] InnoDB: Using atomics to ref count buffer pool pages

2016-03-16 16:37:05 27303 [Note] InnoDB: The InnoDB memory heap is disabled

2016-03-16 16:37:05 27303 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2016-03-16 16:37:05 27303 [Note] InnoDB: Memory barrier is not used

2016-03-16 16:37:05 27303 [Note] InnoDB: Compressed tables use zlib 1.2.3

2016-03-16 16:37:05 27303 [Note] InnoDB: Using Linux native AIO

2016-03-16 16:37:05 27303 [Note] InnoDB: Using CPU crc32 instructions

2016-03-16 16:37:05 27303 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2016-03-16 16:37:05 27303 [Note] InnoDB: Completed initialization of buffer pool

2016-03-16 16:37:05 27303 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

2016-03-16 16:37:05 27303 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB

2016-03-16 16:37:05 27303 [Note] InnoDB: Database physically writes the file full: wait...

2016-03-16 16:37:05 27303 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB

2016-03-16 16:37:05 27303 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB

2016-03-16 16:37:05 27303 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

2016-03-16 16:37:05 27303 [Warning] InnoDB: New log files created, LSN=45781

2016-03-16 16:37:05 27303 [Note] InnoDB: Doublewrite buffer not found: creating new

2016-03-16 16:37:06 27303 [Note] InnoDB: Doublewrite buffer created

2016-03-16 16:37:06 27303 [Note] InnoDB: 128 rollback segment(s) are active.

2016-03-16 16:37:06 27303 [Warning] InnoDB: Creating foreign key constraint system tables.

2016-03-16 16:37:06 27303 [Note] InnoDB: Foreign key constraint system tables created

2016-03-16 16:37:06 27303 [Note] InnoDB: Creating tablespace and datafile system tables.

2016-03-16 16:37:06 27303 [Note] InnoDB: Tablespace and datafile system tables created.

2016-03-16 16:37:06 27303 [Note] InnoDB: Waiting for purge to start

2016-03-16 16:37:06 27303 [Note] InnoDB: 5.6.29 started; log sequence number 0

A random root password has been set. You will find it in '/root/.mysql_secret'.

2016-03-16 16:37:06 27303 [Note] Binlog end

2016-03-16 16:37:06 27303 [Note] InnoDB: FTS optimize thread exiting.

2016-03-16 16:37:06 27303 [Note] InnoDB: Starting shutdown...

2016-03-16 16:37:08 27303 [Note] InnoDB: Shutdown completed; log sequence number 1625977

2016-03-16 16:37:08 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2016-03-16 16:37:08 0 [Note] /usr/sbin/mysqld (mysqld 5.6.29) starting as process 27325 ...

2016-03-16 16:37:08 27325 [Note] InnoDB: Using atomics to ref count buffer pool pages

2016-03-16 16:37:08 27325 [Note] InnoDB: The InnoDB memory heap is disabled

2016-03-16 16:37:08 27325 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2016-03-16 16:37:08 27325 [Note] InnoDB: Memory barrier is not used

2016-03-16 16:37:08 27325 [Note] InnoDB: Compressed tables use zlib 1.2.3

2016-03-16 16:37:08 27325 [Note] InnoDB: Using Linux native AIO

2016-03-16 16:37:08 27325 [Note] InnoDB: Using CPU crc32 instructions

2016-03-16 16:37:08 27325 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2016-03-16 16:37:08 27325 [Note] InnoDB: Completed initialization of buffer pool

2016-03-16 16:37:08 27325 [Note] InnoDB: Highest supported file format is Barracuda.

2016-03-16 16:37:08 27325 [Note] InnoDB: 128 rollback segment(s) are active.

2016-03-16 16:37:08 27325 [Note] InnoDB: Waiting for purge to start

2016-03-16 16:37:08 27325 [Note] InnoDB: 5.6.29 started; log sequence number 1625977

2016-03-16 16:37:08 27325 [Note] Binlog end

2016-03-16 16:37:08 27325 [Note] InnoDB: FTS optimize thread exiting.

2016-03-16 16:37:08 27325 [Note] InnoDB: Starting shutdown...

2016-03-16 16:37:10 27325 [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@xiangmucache soft]# rpm -ivh MySQL-client-5.6.29-1.linux_glibc2.5.x86_64.rpm

warning: MySQL-client-5.6.29-1.linux_glibc2.5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ########################################### [100%]

1:MySQL-client ########################################### [100%]

[root@xiangmucache soft]#rpm -ivh MySQL-devel-5.6.29-1.linux_glibc2.5.x86_64.rpm

warning: MySQL-devel-5.6.29-1.linux_glibc2.5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing... ########################################### [100%]

1:MySQL-devel ########################################### [100%]

复制mysql配置文件:

[root@xiangmucache soft]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf

初始化mysql:

[root@xiangmucache soft]# /usr/bin/mysql_install_db

Installing MySQL system tables...2016-03-16 16:43:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2016-03-16 16:43:33 0 [Note] /usr/sbin/mysqld (mysqld 5.6.29) starting as process 27476 ...

2016-03-16 16:43:33 27476 [Note] InnoDB: Using atomics to ref count buffer pool pages

2016-03-16 16:43:33 27476 [Note] InnoDB: The InnoDB memory heap is disabled

2016-03-16 16:43:33 27476 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2016-03-16 16:43:33 27476 [Note] InnoDB: Memory barrier is not used

2016-03-16 16:43:33 27476 [Note] InnoDB: Compressed tables use zlib 1.2.3

2016-03-16 16:43:33 27476 [Note] InnoDB: Using Linux native AIO

2016-03-16 16:43:33 27476 [Note] InnoDB: Using CPU crc32 instructions

2016-03-16 16:43:33 27476 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2016-03-16 16:43:33 27476 [Note] InnoDB: Completed initialization of buffer pool

2016-03-16 16:43:33 27476 [Note] InnoDB: Highest supported file format is Barracuda.

2016-03-16 16:43:33 27476 [Note] InnoDB: 128 rollback segment(s) are active.

2016-03-16 16:43:33 27476 [Note] InnoDB: Waiting for purge to start

2016-03-16 16:43:33 27476 [Note] InnoDB: 5.6.29 started; log sequence number 1626027

2016-03-16 16:43:33 27476 [Note] Binlog end

2016-03-16 16:43:33 27476 [Note] InnoDB: FTS optimize thread exiting.

2016-03-16 16:43:33 27476 [Note] InnoDB: Starting shutdown...

2016-03-16 16:43:35 27476 [Note] InnoDB: Shutdown completed; log sequence number 1626037

OK

Filling help tables...2016-03-16 16:43:35 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2016-03-16 16:43:35 0 [Note] /usr/sbin/mysqld (mysqld 5.6.29) starting as process 27499 ...

2016-03-16 16:43:35 27499 [Note] InnoDB: Using atomics to ref count buffer pool pages

2016-03-16 16:43:35 27499 [Note] InnoDB: The InnoDB memory heap is disabled

2016-03-16 16:43:35 27499 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2016-03-16 16:43:35 27499 [Note] InnoDB: Memory barrier is not used

2016-03-16 16:43:35 27499 [Note] InnoDB: Compressed tables use zlib 1.2.3

2016-03-16 16:43:35 27499 [Note] InnoDB: Using Linux native AIO

2016-03-16 16:43:35 27499 [Note] InnoDB: Using CPU crc32 instructions

2016-03-16 16:43:35 27499 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2016-03-16 16:43:35 27499 [Note] InnoDB: Completed initialization of buffer pool

2016-03-16 16:43:35 27499 [Note] InnoDB: Highest supported file format is Barracuda.

2016-03-16 16:43:35 27499 [Note] InnoDB: 128 rollback segment(s) are active.

2016-03-16 16:43:35 27499 [Note] InnoDB: Waiting for purge to start

2016-03-16 16:43:35 27499 [Note] InnoDB: 5.6.29 started; log sequence number 1626037

2016-03-16 16:43:36 27499 [Note] Binlog end

2016-03-16 16:43:36 27499 [Note] InnoDB: FTS optimize thread exiting.

2016-03-16 16:43:36 27499 [Note] InnoDB: Starting shutdown...

2016-03-16 16:43:37 27499 [Note] InnoDB: Shutdown completed; log sequence number 1626047

OK

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'

/usr/bin/mysqladmin -u root -h xiangmucache password 'new-password'

Alternatively you can run:

/usr/bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default. This is

strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

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

WARNING: Found existing config file /usr/my.cnf on the system.

Because this file might be in use, it was not replaced,

but was used in bootstrap (unless you used --defaults-file)

and when you later start the server.

The new default config file was created as /usr/my-new.cnf,

please compare it with your file and take the changes you need.

WARNING: Default config file /etc/my.cnf exists on the system

This file will be read by default by the MySQL server

If you do not want to use this, either remove it, or use the

--defaults-file argument to mysqld_safe when starting the server

[root@xiangmucache soft]# mysql

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

[root@xiangmucache mysql]# chown -R mysql:mysql /var/lib/mysql

[root@xiangmucache mysql]#/etc/init.d/mysql start

Starting MySQL.. SUCCESS!

[root@xiangmucache mysql]# ps -ef|grep mysql

root 27537 1 0 16:45 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/xiangmucache.pid

mysql 27652 27537 6 16:45 pts/0 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/xiangmucache.err --pid-file=/var/lib/mysql/xiangmucache.pid

root 27678 27190 0 16:46 pts/0 00:00:00 grep mysql

[root@xiangmucache mysql]# mysql

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

[root@xiangmucache mysql]# more /root/.mysql_secret

# The random password set for the root user at Wed Mar 16 16:37:06 2016 (local time):zgo16gUiGfZsCJU1

[root@xiangmucache mysql]#mysql -uroot -pzgo16gUiGfZsCJU1

Warning: Using a password on the command line interface can be insecure.

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

Your MySQL connection id is 2

Server version: 5.6.29

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> set password = password('xmb123');

Query OK, 0 rows affected (0.00 sec)

mysql> exit

Bye

[root@xiangmucache mysql]# mysql -uroot -pxmb123;

Warning: Using a password on the command line interface can be insecure.

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

Your MySQL connection id is 3

Server version: 5.6.29 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

分享到:

18e900b8666ce6f233d25ec02f95ee59.png

72dd548719f0ace4d5f9bca64e1d7715.png

2016-03-16 16:43

浏览 303

评论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值