CentOS 7.x安装MySQL 5.5的详细步骤、基本配置及相关说明

21 篇文章 0 订阅
17 篇文章 0 订阅

背景

为什么还用5.5版本?以前笔者使用的是5.6版本,但是服务器内存只有1G,启动后使用了近半的内存。果断换5.5,真的是很节约资源啊。
只是个数据存储工具,在互联网行业,视图、触发器、存储过程这些统统用不到,别问我为什么!

相关环境

操作系统:CentOS 7
内核版本:3.10.0-957.5.1.el7.x86_64
数据库版本:5.5.62(mysql-5.5.62-linux-glibc2.12-x86_64.tar.gz)

详细步骤

解压

tar -xzvf mysql-5.5.62-linux-glibc2.12-x86_64.tar.gz -C /opt

安装

cd /opt/mysql-5.5.62 && scripts/mysql_install_db

启动方式

bin/mysqld_safe &

基础配置(密码、远程登录启用、删除测试库)

bin/mysql_secure_installation

附安装日志

Installing MySQL system tables...
190622 14:34:17 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
190622 14:34:17 [Note] ./bin/mysqld (mysqld 5.5.62) starting as process 25767 ...
OK
Filling help tables...
190622 14:34:17 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
190622 14:34:17 [Note] ./bin/mysqld (mysqld 5.5.62) starting as process 25774 ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h host-name password 'new-password'

Alternatively you can run:
./bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

常见问题

安装失败,无明显日志;此时请注意这个问题:权限!权限!权限!

chown mysql:mysql data -R
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值