Home > Database > Mysql Tutorial > LAMP之安装Mysql

LAMP之安装Mysql

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:03:39
Original
1204 people have browsed it

在linux下安装软件,首先我们要确定,这个软件是否安装过。 $rpm -qa | grep mysql $rpm -e mysql --nodeps删除包,不需要依赖关系 $rpm -e mysql-server $tar -zxvf mysql-stand******.tar.gz $cp -vRp mysql-stand****.tar.gz /usr/local/mysql $cd /usr/l

在linux下安装软件,首先我们要确定,这个软件是否安装过。


$rpm -qa | grep mysql
$rpm -e mysql --nodeps删除包,不需要依赖关系
$rpm -e mysql-server

$tar -zxvf mysql-stand******.tar.gz
$cp -vRp mysql-stand****.tar.gz /usr/local/mysql
$cd /usr/local/mysql

配置mysql
$groupadd mysql
$useradd -g mysql mysql


 

以下所有操作,都是在/usr/local/mysql路径下:
$scripts/mysql_install_db --user=mysql初始化mysql数据库信息
$chown -R root . 把当前目录下所有文件的拥有者改为root
$chown -R mysql data 将data文件夹的拥有者改为mysql
$chgrp -R mysql .把当前目录下所有文件的组改为mysql

$bin/mysqld_safe --user=mysql & 启动mysql服务进程
$bin/mysql -u root 以root身份登录

 

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