Linux学习笔记4月9日任务

11.1 LAMP架构介绍

Linux学习笔记4月9日任务Linux学习笔记4月9日任务

Linux学习笔记4月9日任务Linux学习笔记4月9日任务

11.2 MySQL、MariaDB介绍

Linux学习笔记4月9日任务Linux学习笔记4月9日任务

11.3/11.4/11.5 MySQL安装

Linux学习笔记4月9日任务Linux学习笔记4月9日任务

./scripts/mysql_install_db --user=mysql --datadir=/data/mysql运行后提示,需要安装其他包,如下图:

Linux学习笔记4月9日任务Linux学习笔记4月9日任务

再次运行./scripts/mysql_install_db --user=mysql --datadir=/data/mysql,

复制# cp support-files/my-default.cnf /etc/my.cnf

cp:是否覆盖"/etc/my.cnf"? n

修改/etc/my.cnf,如下图,

Linux学习笔记4月9日任务Linux学习笔记4月9日任务

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

# vi /etc/init.d/mysqld,如下图

Linux学习笔记4月9日任务Linux学习笔记4月9日任务

设置开机启动#chkconfig --add mysqld

查看开机启动项# chkconfig --list

启动mysql,#service mysqld start或#/etc/init.d/mysqld start


扩展

mysql5.5源码编译安装 http://www.aminglinux.com/bbs/thread-1059-1-1.html

mysql5.7二进制包安装(变化较大) http://www.apelearn.com/bbs/thread-10105-1-1.html