centos7.5常见的mysql方式

mysql8.x版本

在linux的centos7.5系统上安装mysql_centos7.5安装mysql-CSDN博客

mysql5.7 版本

​​​​​​​​​​​​​​CentOS 7.5系统安装使用Mysql 5.7数据库-阿里云开发者社区,其中需要补充以下两点:

1)如果安装mysql的时候报错Failing package is: mysql-community-client-5.7.40-1.el7.x86_64 GPG Keys are configured as,密钥过期,要按以下方法:

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

2)查询初始密码的时候如下:

复制代码
[root@VM-2-185-centos bin]# grep 'temporary password'  /var/log/mysqld.log
2023-12-05T05:45:29.627475Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: hTTS#V__H3xt

修改系统密码,授权一个账户远程访问。

复制代码
mysql> alter user root@"localhost" identified by 'Fan.88888';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on *.* to 'root'@'%' identified by 'Fan.88888' with grant option;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
相关推荐
莫回首�5 小时前
ubuntu 20.04 多网卡配置,遇到问题总结
linux·网络·ubuntu
网络安全许木5 小时前
自学渗透测试第11天(Linux压缩解压与磁盘管理)
linux·网络安全·渗透测试
0xDevNull7 小时前
MySQL数据冷热分离详解
后端·mysql
一江寒逸7 小时前
零基础从入门到精通MySQL(中篇):进阶篇——吃透多表查询、事务核心与高级特性,搞定复杂业务SQL
数据库·sql·mysql
D4c-lovetrain7 小时前
linux个人心得22 (mysql)
数据库·mysql
lifewange8 小时前
Linux ps 进程查看命令详解
linux·运维·服务器
功德+n8 小时前
Linux下安装与配置Docker完整详细步骤
linux·运维·服务器·开发语言·docker·centos
做个文艺程序员8 小时前
MySQL安全加固十大硬核操作
数据库·mysql·安全
左手厨刀右手茼蒿9 小时前
Linux 内核中的块设备驱动:从原理到实践
linux·嵌入式·系统内核