centos安装rpm包命令 k8s安装部署步骤( 二 )

找到密码之后,我们登录数据库:
[root@centos-muysql-server ~]# mysql -uroot -p"HbeFh*r)3lic"mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor.Commands end with ; or g.Your MySQL connection id is 2Server version: 5.7.32Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.mysql>修改root用户的密码:
mysql> alter user 'root'@'localhost' identified by 'Root@123456';Query OK, 0 rows affected (0.00 sec)mysql>查看MySQL数据库的 版本:
mysql> select version();+-----------+| version() |+-----------+| 5.7.32|+-----------+1 row in set (0.00 sec)以上可以看出MySQL数据库已经安装成功,并且可以正常提供服务 。
总结【centos安装rpm包命令 k8s安装部署步骤】以上就是使用rpm安装包来安装MySQL数据库的具体步骤,如果你的服务器上面不缺少其他包,可能直接使用rpm -ivh xxx.rpm的方式来安装MySQL就OK,因为我的服务器是使用docker容器启动的一个centos,所以它是一个最简单的centos,里面会缺少很多依赖包 。所以我在安装下载好的rpm文件的时候,使用的是yum install xxx.rpm的方式来安装的,因为这样会自动把所有的依赖都安装上 。

推荐阅读