centos安装mysql数据库的三种方法

上传人:自*** 文档编号:79655152 上传时间:2019-02-17 格式:DOCX 页数:8 大小:51.46KB
返回 下载 相关 举报
centos安装mysql数据库的三种方法_第1页
第1页 / 共8页
centos安装mysql数据库的三种方法_第2页
第2页 / 共8页
centos安装mysql数据库的三种方法_第3页
第3页 / 共8页
centos安装mysql数据库的三种方法_第4页
第4页 / 共8页
centos安装mysql数据库的三种方法_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《centos安装mysql数据库的三种方法》由会员分享,可在线阅读,更多相关《centos安装mysql数据库的三种方法(8页珍藏版)》请在金锄头文库上搜索。

1、最近在CentOS 5.10上安装最新版的mysql5.6.21时遇到了麻烦。于是将mysql文档中的关于如何在Linux上安装mysql的部分仔细的读了一遍。总结起来在CentOS或者Red Hat上安装mysql可以有三种方式:1)使用rpm -ivh .或者 yum install . (一般推荐使用rpm来安装)2)使用编译好的通用二进制版本的mysql来安装(Generic Binaries mysql) (在方法一失败时,可以使用方法2来安装)3)使用源码来编译安装。1. 在CentOS 5.10上安装最新版的mysql5.6.21时遇到的麻烦2. Installing MySQL

2、 on Unix/Linux Using Generic Binaries(使用通用二进制版本的mysql来安装) 当使用rpm或者yum方法安装失败时,可以使用该方法进行安装。因为通用二进制版本对glibc等lib库的版本要求不是很高。所以使用这种方法,可以很好的解决:在低版本的CentOS上安装高版本的mysql。其安装方法如下。2.1 下载 打开网页:http:/ 在Select Platform: 中选择 Linux - Generic 然后下载最下面的:mysql-5.6.21-linux-glibc2.5-i686.tar.gz (有64位的和32位的,选择自己需要的)2.2 安装

3、 具体安装步骤,mysql文档中有详细说明:To install and user a MySQL binary distribution, the basic command sequence looks like this:shell groupadd mysqlshell useradd -r -g mysql mysqlshell cd /usr/localshell tar zxvf /path/to/mysql-VERSION-OS.tar.gzshell ln -s full-path-to-mysql-VERSION-OSmysqlshell cd mysqlshell cho

4、wn -R mysql .shell chgrp -R mysql .shell scripts/mysql_install_db -user=mysqlshell chown -R root .shell chown -R mysql datashell bin/mysqld_safe -user=mysql &# Next command is optionalshell cp support-files/mysql.server /etc/init.d/mysql.server我自己的安装过程如下:rootlocalhost mysql# groupadd mysqlrootlocalh

5、ost mysql# useradd -r -g mysql mysqlrootlocalhost mysql# cd /usr/localrootlocalhost mysql# tar zxvf /root/mysql-5.6.21-linux-glibc2.5-i686.tar.gz rootlocalhost local# lltotal 76drwxr-xr-x 2 root root 4096 Nov 7 05:43 bindrwxr-xr-x 2 root root 4096 May 11 2011 etcdrwxr-xr-x 2 root root 4096 May 11 20

6、11 gamesdrwxr-xr-x 3 root root 4096 Nov 7 05:43 includedrwxr-xr-x 4 root root 4096 Nov 7 05:43 libdrwxr-xr-x 2 root root 4096 May 11 2011 libexecdrwxr-xr-x 13 root root 4096 Nov 7 20:42 mysql-5.6.21-linux-glibc2.5-i686drwxr-xr-x 2 root root 4096 May 11 2011 sbindrwxr-xr-x 4 root root 4096 Nov 7 01:1

7、5 sharedrwxr-xr-x 2 root root 4096 May 11 2011 srcrootlocalhost local# pwd/usr/localrootlocalhost local# ln -s /usr/local/mysql-5.6.21-linux-glibc2.5-i686 mysqlrootlocalhost local# cd mysqlrootlocalhost mysql# chown -R mysql .rootlocalhost mysql# chgrp -R mysql .rootlocalhost mysql# scripts/mysql_in

8、stall_db -user=mysqlInstalling MySQL system tables.2014-11-07 20:45:37 0 Warning TIMESTAMP with implicit DEFAULT value is deprecated. Please use -explic it_defaults_for_timestamp server option (see documentation for more details).2014-11-07 20:45:37 4083 Note InnoDB: Using mutexes to ref count buffe

9、r pool pages2014-11-07 20:45:37 4083 Note InnoDB: The InnoDB memory heap is disabled2014-11-07 20:45:37 4083 Note InnoDB: Mutexes and rw_locks use InnoDBs own implementation2014-11-07 20:45:37 4083 Note InnoDB: Memory barrier is not used2014-11-07 20:45:37 4083 Note InnoDB: Compressed tables use zli

10、b 1.2.32014-11-07 20:45:37 4083 Note InnoDB: Using Linux native AIO2014-11-07 20:45:37 4083 Note InnoDB: Not using CPU crc32 instructions2014-11-07 20:45:37 4083 Note InnoDB: Initializing buffer pool, size = 128.0M2014-11-07 20:45:37 4083 Note InnoDB: Completed initialization of buffer pool2014-11-0

11、7 20:45:37 4083 Note InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!2014-11-07 20:45:37 4083 Note InnoDB: Setting file ./ibdata1 size to 12 MB2014-11-07 20:45:37 4083 Note InnoDB: Database physically writes the file full: wait.2014-11-07 20:45:37 4083 Not

12、e InnoDB: Setting log file ./ib_logfile101 size to 48 MB2014-11-07 20:45:38 4083 Note InnoDB: Setting log file ./ib_logfile1 size to 48 MB2014-11-07 20:45:38 4083 Note InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile02014-11-07 20:45:38 4083 Warning InnoDB: New log files created, LSN=457812

13、014-11-07 20:45:38 4083 Note InnoDB: Doublewrite buffer not found: creating new2014-11-07 20:45:38 4083 Note InnoDB: Doublewrite buffer created2014-11-07 20:45:38 4083 Note InnoDB: 128 rollback segment(s) are active.2014-11-07 20:45:38 4083 Warning InnoDB: Creating foreign key constraint system tabl

14、es.2014-11-07 20:45:39 4083 Note InnoDB: Foreign key constraint system tables created2014-11-07 20:45:39 4083 Note InnoDB: Creating tablespace and datafile system tables.2014-11-07 20:45:39 4083 Note InnoDB: Tablespace and datafile system tables created.2014-11-07 20:45:39 4083 Note InnoDB: Waiting

15、for purge to start2014-11-07 20:45:39 4083 Note InnoDB: 5.6.21 started; log sequence number 02014-11-07 20:45:39 4083 Note Binlog end2014-11-07 20:45:39 4083 Note InnoDB: FTS optimize thread exiting.2014-11-07 20:45:39 4083 Note InnoDB: Starting shutdown.2014-11-07 20:45:41 4083 Note InnoDB: Shutdown completed; log sequence number 1625977OKFilling help tables.2014-11-07 20:45:41 0 Warning TIMESTAMP with im

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号