2014年1月6日 星期一

[研究] MySQL Community 5.6.15 版安裝(yum) (CentOS 6.5 x64)

[研究] MySQL Community 5.6.15 版安裝(yum) (CentOS 6.5 x64)

2014-01-06

MySQL 提供 yum 安裝的版本為 5.1.71 版

下載 (免費註冊,登入後才可下載)
http://dev.mysql.com/downloads/repo/

選 Red Hat Enterprise Linux 6 / Oracle Linux 6 (Architecture Independent), RPM Package

安裝

[root@localhost ~]# wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

[root@localhost ~]# rpm -ivh mysql-community-release-el6-5.noarch.rpm

[root@localhost ~]# yum list | grep mysql
mysql-community-release.noarch            el6-5                          installed
mysql-libs.x86_64                         5.1.71-1.el6                   @anaconda-CentOS-201311272149.x86_64/6.5
apr-util-mysql.x86_64                     1.3.9-3.el6_0.1                base
bacula-director-mysql.x86_64              5.0.0-12.el6                   base
bacula-storage-mysql.x86_64               5.0.0-12.el6                   base
dovecot-mysql.x86_64                      1:2.0.9-7.el6                  base
freeradius-mysql.x86_64                   2.1.12-4.el6_3                 base
libdbi-dbd-mysql.x86_64                   0.8.3-5.1.el6                  base
mod_auth_mysql.x86_64                     1:3.0.0-11.el6_0.1             base
mysql.x86_64                              5.1.71-1.el6                   base
mysql-bench.x86_64                        5.1.71-1.el6                   base
mysql-community-client.x86_64             5.6.15-1.el6                   mysql56-community
mysql-community-common.i686               5.6.15-1.el6                   mysql56-community
mysql-community-common.x86_64             5.6.15-1.el6                   mysql56-community
mysql-community-devel.i686                5.6.15-1.el6                   mysql56-community
mysql-community-devel.x86_64              5.6.15-1.el6                   mysql56-community
mysql-community-embedded.i686             5.6.15-1.el6                   mysql56-community
mysql-community-embedded.x86_64           5.6.15-1.el6                   mysql56-community
mysql-community-embedded-devel.i686       5.6.15-1.el6                   mysql56-community
mysql-community-embedded-devel.x86_64     5.6.15-1.el6                   mysql56-community
mysql-community-libs.i686                 5.6.15-1.el6                   mysql56-community
mysql-community-libs.x86_64               5.6.15-1.el6                   mysql56-community
mysql-community-libs-compat.i686          5.6.15-1.el6                   mysql56-community
mysql-community-libs-compat.x86_64        5.6.15-1.el6                   mysql56-community
mysql-community-server.x86_64             5.6.15-1.el6                   mysql56-community
mysql-community-test.x86_64               5.6.15-1.el6                   mysql56-community
mysql-connector-java.noarch               1:5.1.17-6.el6                 base
mysql-connector-odbc.x86_64               5.2.6-1.el6                    mysql-connectors-community
mysql-connector-python.noarch             1.1.4-1.el6                    mysql-connectors-community
mysql-devel.i686                          5.1.71-1.el6                   base
mysql-devel.x86_64                        5.1.71-1.el6                   base
mysql-embedded.i686                       5.1.71-1.el6                   base
mysql-embedded.x86_64                     5.1.71-1.el6                   base
mysql-embedded-devel.i686                 5.1.71-1.el6                   base
mysql-embedded-devel.x86_64               5.1.71-1.el6                   base
mysql-libs.i686                           5.1.71-1.el6                   base
mysql-server.x86_64                       5.1.71-1.el6                   base
mysql-test.x86_64                         5.1.71-1.el6                   base
mysql-workbench-community.x86_64          6.0.8-1.el6                    mysql-tools-community
php-mysql.x86_64                          5.3.3-27.el6_5                 updates
qt-mysql.i686                             1:4.6.2-26.el6_4               base
qt-mysql.x86_64                           1:4.6.2-26.el6_4               base
rsyslog-mysql.x86_64                      5.8.10-8.el6                   base
[root@localhost ~]#

安裝

[root@localhost ~]# yum -y install mysql-community-server

啟動 (第一次會做資料庫初始化,所以有一堆訊息)

[root@localhost ~]# service mysqld start
Initializing MySQL database:  2014-01-06 23:16:41 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-01-06 23:16:41 3161 [Note] InnoDB: The InnoDB memory heap is disabled
2014-01-06 23:16:41 3161 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-01-06 23:16:41 3161 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-01-06 23:16:41 3161 [Note] InnoDB: Using Linux native AIO
2014-01-06 23:16:41 3161 [Note] InnoDB: Using CPU crc32 instructions
2014-01-06 23:16:41 3161 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-01-06 23:16:41 3161 [Note] InnoDB: Completed initialization of buffer pool
2014-01-06 23:16:41 3161 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2014-01-06 23:16:41 3161 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2014-01-06 23:16:41 3161 [Note] InnoDB: Database physically writes the file full: wait...
2014-01-06 23:16:41 3161 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2014-01-06 23:16:41 3161 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2014-01-06 23:16:42 3161 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2014-01-06 23:16:42 3161 [Warning] InnoDB: New log files created, LSN=45781
2014-01-06 23:16:42 3161 [Note] InnoDB: Doublewrite buffer not found: creating new
2014-01-06 23:16:42 3161 [Note] InnoDB: Doublewrite buffer created
2014-01-06 23:16:42 3161 [Note] InnoDB: 128 rollback segment(s) are active.
2014-01-06 23:16:42 3161 [Warning] InnoDB: Creating foreign key constraint system tables.
2014-01-06 23:16:42 3161 [Note] InnoDB: Foreign key constraint system tables created
2014-01-06 23:16:42 3161 [Note] InnoDB: Creating tablespace and datafile system tables.
2014-01-06 23:16:42 3161 [Note] InnoDB: Tablespace and datafile system tables created.
2014-01-06 23:16:42 3161 [Note] InnoDB: Waiting for purge to start
2014-01-06 23:16:42 3161 [Note] InnoDB: 5.6.15 started; log sequence number 0
2014-01-06 23:16:43 3161 [Note] Binlog end
2014-01-06 23:16:43 3161 [Note] InnoDB: FTS optimize thread exiting.
2014-01-06 23:16:43 3161 [Note] InnoDB: Starting shutdown...
2014-01-06 23:16:44 3161 [Note] InnoDB: Shutdown completed; log sequence number 1625977


2014-01-06 23:16:44 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-01-06 23:16:44 3184 [Note] InnoDB: The InnoDB memory heap is disabled
2014-01-06 23:16:44 3184 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-01-06 23:16:44 3184 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-01-06 23:16:44 3184 [Note] InnoDB: Using Linux native AIO
2014-01-06 23:16:44 3184 [Note] InnoDB: Using CPU crc32 instructions
2014-01-06 23:16:44 3184 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-01-06 23:16:44 3184 [Note] InnoDB: Completed initialization of buffer pool
2014-01-06 23:16:44 3184 [Note] InnoDB: Highest supported file format is Barracuda.
2014-01-06 23:16:44 3184 [Note] InnoDB: 128 rollback segment(s) are active.
2014-01-06 23:16:44 3184 [Note] InnoDB: Waiting for purge to start
2014-01-06 23:16:44 3184 [Note] InnoDB: 5.6.15 started; log sequence number 1625977
2014-01-06 23:16:44 3184 [Note] Binlog end
2014-01-06 23:16:44 3184 [Note] InnoDB: FTS optimize thread exiting.
2014-01-06 23:16:44 3184 [Note] InnoDB: Starting shutdown...
2014-01-06 23:16:46 3184 [Note] InnoDB: Shutdown completed; log sequence number 1625987




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 localhost.localdomain 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.

The latest information about MySQL is available on the web at

  http://www.mysql.com

Please visit

  http://bugs.mysql.com/

to report bugs. This database is public and can be browsed
and searched by anyone. If you log in to the system
you can enter new reports.

Note: new default config file not created.
Please make sure your config file is current

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

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

顯示狀態

[root@localhost ~]# service mysqld status
mysqld (pid  3418) is running...

顯示 MySQL 相關程序

[root@localhost ~]# ps aux | grep mysql
root      3211  0.0  0.1 108168  1608 pts/1    S    23:16   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql     3418  3.0 44.4 1075888 449748 pts/1  Sl   23:16   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
root      3483  0.0  0.0 103244   864 pts/1    S+   23:17   0:00 grep mysql

顯示版本

[root@localhost ~]# mysql --version
mysql  Ver 14.14 Distrib 5.6.15, for Linux (x86_64) using  EditLine wrapper

停止 MySQL

[root@localhost ~]# service mysqld stop
Stopping mysqld:                                           [  OK  ]

啟動 MySQL (第二次開始,不會一堆訊息了)

[root@localhost ~]# service mysqld start
Starting mysqld:                                           [  OK  ]

(完)

[研究] MySQL Community 5.6.15 版安裝(yum) (CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/01/mysql-community-5615-tgz-centos-65-x64.html

[研究] 2主機 MySQL Cluster 7.2.10-1 架設
http://shaurong.blogspot.com/2013/02/2-mysql-cluster-7210-1.html

[研究] MariaDB 5.5 安裝(yum)(CentOS 6.3 x64)
http://shaurong.blogspot.com/2013/02/mariadb-55-yum-centos-63-x64.html

[研究] 4主機 MySQL Cluster 7.2.10-1 架設
http://shaurong.blogspot.com/2013/02/4-mysql-cluster-7210-1.html

[研究] CentOS 5.4 x86 上 MySQL 資料庫同步(Replication)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17824

[研究] mariadb-5.1.42 (tar.gz)(瑪利亞資料庫, MySQL) 安裝 (CentOS 5.4)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17988

[研究] mariadb-5.2.4-Linux-i686.tar.gz 安裝 (CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19434

[研究] mysql-5.5.14.tar.gz 安裝(失敗)(CentOS 6.0 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20252

[研究] mysql-5.5.8.tar.gz 安裝(CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19214

[研究] mysql-5.5.8.tar.gz 安裝(Fedora 14 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19215

[研究] 每天自動備份 MySQL 方法
http://forum.icst.org.tw/phpbb/viewtopic.php?t=14972

[研究] 雙主機 MySQL Cluster 7.0.9 架設
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17904

沒有留言:

張貼留言