centos 7 mini版 rpm 安装mysql5.7过程

2022年6月8日11:18:57
1.mysql 下载
http://dev.mysql.com/downloads/mysql/
centos 7 mini版 rpm 安装mysql5.7过程
二、mysql安装
2.1解压mysql-5.7.16-1.el7.x86_64.rpm-bundle.tar 文件
shell> tar -xvf mysql-5.7.16-1.el7.x86_64.rpm-bundle.tar
删除server的minimal版本
shell> rm -rf mysql-community-server-minimal-5.7.16-1.el7.x86_64.rpm
2.2安装命令
 shell> rpm -ivh mysql-community-{server,client,common,libs}-* --nosignature
centos 7 mini版 rpm 安装mysql5.7过程
通过错误日志发现,需要安装Perl模块,以及卸载mariadb
2.3用CPAN安装Perl模块
shell> yum install -y perl-CPAN
出现问题
centos 7 mini版 rpm 安装mysql5.7过程
2.3.1安装gcc
shell> yum -y install gcc
2.3.2perl模块安装
shell> perl -MCPAN -e shell
cpan> install DBI
2.4卸载 mariadb
rpm -qa | grep mariadb
rpm -e mariadb-libs-5.5.44-2.el7.centos.x86_64 --nodeps
2.5再次进行安装
 shell> rpm -ivh mysql-community-{server,client,common,libs}-* --nosignature
三、启动mysql并配置
3.1启动mysql
shell> sudo service mysqld start
3.2查看是否启动成功
shell> netstat -ntlp
如果有对3306端口的监听则是正常启动
3.3查找密码
shell> sudo grep 'temporary password' /var/log/mysqld.log
返回用户密码日志
2016-12-08T19:16:58.870061Z 1 [Note] A temporary password is generated for root@localhost: a<tyNh6)ZBrM
3.4进入mysql
shell> mysql -uroot -p
密码使用显示的密码
3.5修改秘密
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'Hadoop@2016';
说明:设置的密码必须是包含至少一个大写字母,一个小写字母,一个数字和一个特殊字符,长度至少8个字节。
四、参考文档:
4.1mysql 5.7 官方说明文档
http://dev.mysql.com/doc/refman/5.7/en/linux-installation-rpm.html
4.2perl模块安装说明地址1
http://learn.perl.org/modules/
4.3perl模块安装说明地址2
http://dev.mysql.com/doc/refman/5.7/en/perl-installation.html
4.4CentOS7安装MySQL冲突和问题解决小结
http://blog.csdn.net/typa01_kk/article/details/49059729

  • 作者:勇攀高峰的Tony
  • 原文链接:https://blog.csdn.net/mesufy/article/details/53523221
    更新时间:2022年6月8日11:18:57 ,共 1366 字。