CentOS 使用yum安装MYSQL
Posted 小刀
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS 使用yum安装MYSQL相关的知识,希望对你有一定的参考价值。
来源:https://typecodes.com/linux/yuminstallmysql5710.html
wget -i http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm yum -y install mysql57-community-release-el7-7.noarch.rpm yum -y install mysql-community-server systemctl start mysqld.service
使用YUM安装并启动MySQL服务后,MySQL进程会自动在进程日志中打印root用户的初始密码:
[[email protected] ~]# mysql -uroot -p Enter password: #######输入默认的root密码后回车 Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 2 Server version: 5.7.10 Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type ‘help;‘ or ‘h‘ for help. Type ‘c‘ to clear the current input statement. mysql> ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘new password‘; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye
以上是关于CentOS 使用yum安装MYSQL的主要内容,如果未能解决你的问题,请参考以下文章
CentOS yum 命令出现 [Errno 14] curl#6 - "Couldn't resolve host ..." 的解决方法(代码片段
Linux CentOS 使用Yum源安装MySQL 5.7