ssh linux下安装mysql_Linux 下安装mysql

本文档详述了在Linux环境下安装MySQL的过程,包括关闭防火墙、下载与解压MySQL安装包、创建用户组和用户、配置MySQL服务、初始化数据、设置开机启动、授权远程访问权限,以及创建和管理MySQL用户的步骤。在安装过程中,还解决了libaio库文件缺失的问题,并提供了设置root密码的方法。
摘要由CSDN通过智能技术生成

1、首先关闭linux的防火墙,执行命令

chkconfig iptables off

5504cfc52346

image

5504cfc52346

image

5504cfc52346

image

5504cfc52346

image

5504cfc52346

image

3、下载后的mysql文件

mysql-5.6.40-linux-glibc2.12-i686.tar.gz

将下载好的mysql压缩文件放置在linux的/usr/local文件夹下,解压该压缩文件

tar -zxvf mysql-5.6.40-linux-glibc2.12-i686.tar.gz

将解压后的文件重命名为mysql

mv mysql-5.6.40-linux-glibc2.12-i686 mysql

4、创建mysql用户组及用户

groupadd mysql

useradd -r -g mysql mysql

5、进入到mysql目录,执行添加MySQL配置的操作

cp support-files/my-medium.cnf /etc/my.cnf

或:

cp support-files/my-default.cnf /etc/my.cnf

是否覆盖?按y 回车

6、编辑/etc/my.cnf文件;

vi /etc/my.cnf

在my.cnf文件中添加或者修改相关配置,更改完成后保存退出

# For advice on how to change settings please see

# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the

# *** default location during install, and will be replaced if you

# *** upgrade to a newer version of MySQL.

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data

# cache in MySQL. Start at 70% of total RAM for dedicated server, else 1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值