mysql初步安装_MySQL 安装初步

一、软件准备

OS: rhel 6.4 X64

MySQL: 5.6.24

ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.6/

Cmake: 3.2.2

http://www.cmake.org/download/

安装cmake

$ ./bootstrap && make && make install

二、安装MySQL

# Preconfiguration setup

# groupadd mysql

# useradd -r -g mysql mysql

# mkdir -p /opt/mysql/data

# Beginning of source-build specific instructions

# tar zxvf mysql-5.6.24.tar.gz

# cd mysql-5.6.24

# cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql

# make

# make install

# End of source-build specific instructions

# Postinstallation setup

# cd /opt/mysql

# chown -R mysql .

# chgrp -R mysql .

# scripts/mysql_install_db --user=mysql \

--basedir=/opt/mysql \

--datadir=/opt/mysql/data

# chown -R root .

# chown -R mysql data

# cp support-files/mysql.server /etc/init.d/mysqld

# chmod 755 /etc/init.d/mysqld

mysql_install_db creates a default option file named my.cnf

in the base installation directory. This file is created from

a template included in the distribution package named

my-default.cnf. For more information, see Section 5.1.2.2,

"Using a Sample Default Server Configuration File."

A more detailed version of the source-build specific

instructions is shown following.

Note

The procedure shown here does not set up any passwords for

MySQL accounts. After following the procedure, proceed to

Section 2.10, "Postinstallation Setup and Testing," for

postinstallation setup and testing.

启动数据库

# /etc/init.d/mysql start

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值