首页 > 数据库技术 > 详细

CentOS 使用yum安装MYSQL

时间:2018-06-14 20:29:56      阅读:157      评论:0      收藏:0      [点我收藏+]

 

来源: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用户的初始密码:
[root@typecodes ~]# 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

原文:https://www.cnblogs.com/xzlive/p/9184519.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!