Home > Database > Mysql Tutorial > 在Centos 5.5 上编译安装mysql 5.5.9_MySQL

在Centos 5.5 上编译安装mysql 5.5.9_MySQL

WBOY
Release: 2016-05-31 08:49:06
Original
982 people have browsed it

CentOS

创建mysql用户 [root@xuhost opt]# useradd -g mysql mysql3307 -s /bin/nologin -d /usr/local/mysql3307
创建数据目录 [root@xuhost opt]# mkdir /mysqldata/dirdata/mysql3307 [root@xuhost opt]# chown mysql.mysql -R /mysqldata/dirdata/mysql3307

安装 cmake

[root@xuhost opt]# wget http: //www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz[root@xuhost opt]# tar zxvf cmake- 2.8.4.tar.gz[root@xuhost opt]# ./configure[root@xuhost opt]# cd cmake- 2.8.4[root@xuhost cmake- 2.8.4 ]# make install
Copy after login

安装mysql 5.5.9

[root@xuhost opt]# tar zxvf mysql- 5.5.9.tar.gz[root@xuhostopt]# cd mysql- 5.5.9[root@xuhost mysql- 5.5.9 ]# cmake . /-DCMAKE_INSTALL_PREFIX=/mysqldata/mysql3307/ /-DMYSQL_DATADIR=/mysqldata/dirdata/mysql3307 /-DWITH_INNOBASE_STORAGE_ENGINE=  /-DENABLED_LOCAL_INFILE=  /-DMYSQL_TCP_PORT=  /-DEXTRA_CHARSETS=all / -DDEFAULT_CHARSET=utf8 / -DDEFAULT_COLLATION=utf8-general_ci /-DMYSQL_UNIX_ADDR=/mysqldata/dirdata/mysql3307 /mysql.sock /-DMYSQL_USER=mysql3307 /-DWITH_DEBUG=[root@xuhost mysql- 5.5.9]# make[root@xuhost mysql- 5.5.9]# make install
Copy after login

复制配置文件

[root@xuhost mysql- 5.5.9]# cp support-files/my-medium.cnf /etc/my.cnf
Copy after login

复制启动脚本

[root@xuhost mysql- 5.5.9]# cp support-files/mysql.server /etc/init.d/mysqld[root@xuhost mysql- 5.5.9 ]# chmod  /etc/init.d/mysqld
Copy after login

初始化数据库 (进到安装目录)

[root@xuhost mysql5. 5.9 ]# ./scripts/mysql_install_db
    
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template