centos7安装MySQL 5.7.19
来源:互联网 发布:矩阵正则什么意思 编辑:程序博客网 时间:2024/06/14 00:07
[root@localhost user]# yum install mysql-server
已安装:
mysql-community-libs.x86_64 0:5.7.19-1.el7
mysql-community-libs-compat.x86_64 0:5.7.19-1.el7
mysql-community-server.x86_64 0:5.7.19-1.el7
作为依赖被安装:
mysql-community-client.x86_64 0:5.7.19-1.el7
mysql-community-common.x86_64 0:5.7.19-1.el7
替代:
mariadb-libs.x86_64 1:5.5.52-1.el7
完毕!
[root@localhost log]# systemctl start mysqld
[root@localhost log]# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since 二 2017-09-19 12:26:39 ULAST; 3s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 6371 ExecStart=/usr/sbin/mysqld –daemonize –pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 6281 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 6374 (mysqld)
CGroup: /system.slice/mysqld.service
└─6374 /usr/sbin/mysqld –daemonize –pid-file=/var/run/mysqld/mysqld.pid…
9月 19 12:26:28 localhost.localdomain systemd[1]: Starting MySQL Server…
9月 19 12:26:39 localhost.localdomain systemd[1]: Started MySQL Server.
在mysqld.log中找寻临时密码
[root@localhost log]# cat mysqld.log |grep ‘pass’
2017-09-19T03:26:33.792174Z 1 [Note] A temporary password is generated for root@localhost: jtQNa+aXq6f+
[root@localhost log]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.19
Copyright (c) 2000, 2017, 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> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
//将密码策略由MEDIUM改成LOW
mysql> set global validate_password_length=1;
Query OK, 0 rows affected (0.00 sec)
//将密码长度由8字符改成4字符
mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘123456’;
Query OK, 0 rows affected (0.01 sec)
mysql> SHOW VARIABLES LIKE ‘validate_password%’;
+————————————–+——-+
| Variable_name | Value |
+————————————–+——-+
| validate_password_check_user_name | OFF |
| validate_password_dictionary_file | |
| validate_password_length | 4 |
| validate_password_mixed_case_count | 1 |
| validate_password_number_count | 1 |
| validate_password_policy | LOW |
| validate_password_special_char_count | 1 |
+————————————–+——-+
7 rows in set (0.07 sec)
mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| sys |
+——————–+
4 rows in set (0.04 sec)
mysql> exit
Bye
- centos7安装MySQL 5.7.19
- CentOS7 安装mysql 5.7
- Centos7 安装Mysql 5.7
- CentOS7 安装MySQL 5.7
- CentOS7 yum 安装 MySQL 5.7
- Centos7安装mysql-5.7.11
- CentOS7 源码安装mysql 5.7
- centos7 配置安装 mysql 5.7
- Centos7 离线安装mysql 5.7
- Linux(CentOS7)安装MySQL-5.7
- docker centos7 源码安装MySQL-5.7
- CentOS7.2安装MySQL 5.7.10
- docker centos7 源码安装MySQL-5.7
- centos7 64 rpm 安装 mysql 5.7.10
- CentOS7安装mysql-5.7(glibc版)
- CentOS7安装mysql-5.7(glibc版)
- 腾讯云CentOS7安装mysql-5.7.14
- CentOS7安装mysql-5.7(glibc版)
- 9月18日云栖精选夜读:「阿里巴巴编码规范(Java版)」认证考试出炉!你考过了吗?
- 资讯精选 | 什么是“云计算+”的时代
- 如何让两个div处于一行
- 利用词向量计算上下位关系
- 微信支付遇到的坑(时区问题导致二维码不出来)
- centos7安装MySQL 5.7.19
- cobar学习总结
- 使用assign函数批量生成变量并赋值/使用get函数获取变量的值
- 翻译模型用于Query改写
- webpack:从入门到真实项目配置
- 记录CString类型和double等类型的互换
- SpringBoot报错(一)端口被占用
- 830系统更新显示win10 version1703???
- 【学习摘记】马士兵bbs改良版_课时7&课时9_MySQL编码问题——数据库与客户端编码关系