Home > Database > Mysql Tutorial > Linux学习之安装mysql_MySQL

Linux学习之安装mysql_MySQL

WBOY
Release: 2016-06-01 13:41:29
Original
1243 people have browsed it

bitsCN.com
Linux学习之安装mysql 本篇中主要学习使用源代码来安装mysql:下载mysql源码包,放置到/usr/local/src,假设我的源码包叫:mysql.5.1.tar.gz 先创建一个用户组和一个用户groupadd mysql //建立mysql用户组useradd -g mysql mysql  //建立mysql帐户下面开始安装:1、解压源码包tar -zxvf mysql.5.1.tar.gz2、进入解压包中然后进行安装软件三部曲:configure,make,make install./configure --prefix=/usr/local/mysql  -with-charset=gbkmake clean ;make(其中make clean 可以不要,最好还是带上)make install     3、cp support-files/my-medium.cnf /etc/my.cnf  //拷贝my-medium.cnf文件到/etc/目录下并重命名为my.cnf4、用编辑器打开my.cnf文件,找到log-bin=mysql-bin这一行,将其注释掉:#log-bin=mysql-bin5、进入安装目录:bin/mysql_install_db --user=mysql6、设置目录权限chown -R root .  //设置目录权限属性chown -R mysql /usr/local/mysql/varchgrp -R mysql .bin/mysqld_safe --user=mysql &  //启动mysql 7、将/usr/local/mysql/bin 加入环境变量中8 、执行mysql -uroot 如果登录成功,则安装成功。  作者 yuanzeyao2008 bitsCN.com

Related labels:
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