码迷,mamicode.com
首页 > 数据库 > 详细

CentOS 使用yum安装MYSQL

时间:2018-06-14 20:44:40      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:word   安装mysql   使用   TE   iat   gis   lin   com   cti   

 

来源: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

标签:word   安装mysql   使用   TE   iat   gis   lin   com   cti   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!