Home > Database > Mysql Tutorial > MySQL 5.6 Generic Binary安装与配置_MySQL

MySQL 5.6 Generic Binary安装与配置_MySQL

WBOY
Release: 2016-06-01 13:10:37
Original
1239 people have browsed it

安装软件包
# mkdir -p /opt/mysql
# mv mysql-5.6.17-linux-glibc2.5-x86_64.tar.gz /opt/mysql
# cd /opt/mysql
# tar xvfz mysql-5.6.17-linux-glibc2.5-x86_64.tar.gz

# 创建数据库
# cd /opt
# cd /opt/mysql/mysql-5.6.17-linux-glibc2.5-x86_64
# scripts/mysql_install_db --user=mysql

创建实例目录
# mkdir -p /opt/mysql/server0/log
# mkdir -p /opt/mysql/server0/run
# cp -R data /opt/mysql/server0
# cp my.cnf /opt/mysql/server0

配置启动参数
# cd /opt/mysql/server0
# vi my.cnf
 [mysqld_safe]
 basedir=/opt/mysql/mysql-5.6.17-linux-glibc2.5-x86_64
 datadir=/opt/mysql/server0/data
 log-error=/opt/mysql/server0/log/error.log
 socket=/tmp/mysql_server0.sock
# cd /opt
# chmod -R mysql:dba mysql

启动mysql
$ export $MYSQL_BASE=/opt/mysql/mysql-5.6.17-linux-glibc2.5-x86_64
$ $MYSQL_BASE/bin/mysqld_safe --defaults-files=/opt/mysql/server0/my.cnf --ledir=$MYSQL_BASE/bin --user=mysql
        

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