快捷搜索:
来自 网络数据库 2019-11-01 10:41 的文章
当前位置: 67677新澳门手机版 > 网络数据库 > 正文

11安装配置,11安装配置教程

于是设置为0,然后将validate_password.length设置为4,表示最少需要4字符。之所以设置为4是因为这个参数的值不能小于如下公式的计算结果:

四、发现没密码不能登录,于是添加skip-grant-tables到my.cnf,重启进去重置密码

终于改完密码了...去掉参数文件的skip-grant-tables参数,service mysqld restart重启服务。

validate_password.number_count
  validate_password.special_char_count
  (2 * validate_password.mixed_case_count)

我这里是RHEL6.5的系统,因此选择RedHat 6 x86,64bit操作系统---下载第一个RPM Bundle即可--mysql-8.0.11-1.el6.x86_64.rpm-bundle.tar。

mysql> delete from mysql.user where user='root';
Query OK, 1 row affected (0.10 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> create user root@'localhost' identified by 'mysql';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

查看官网发现此值的取值如下:

一、mysql-8.0.11-1.el6.x86_64.rpm-bundle.tar解压后有如下7个文件:

居然不能改。。。于是:

您可能感兴趣的文章:

  • MySQL8.0.11安装总结教程图解
  • mysql-8.0.11-winx64.zip安装教程详解
  • 安装mysql8.0.11及修改root密码、连接navicat for mysql的思路详解
  • mysql8.0.11 winx64安装配置方法图文教程(win10)
  • Windows下MySQL8.0.11社区绿色版安装步骤图解
  • MySQL Community Server 8.0.11安装配置方法图文教程
  • mysql8.0.11 winx64手动安装配置教程
  • Windows下mysql 8.0.11 安装教程
  • win10下mysql 8.0.11压缩版安装详细教程
  • 新京葡娱乐场网址 ,RHEL7.5下mysql 8.0.11安装教程

还是不能改,查看密码复杂度要求:

我这5.7的mysql工具都连不上,这就尴尬了,查看认证相关参数:

-rw-r--r-- 1 root root  28987588 Apr  9 01:06 mysql-community-client-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root    672184 Apr  9 01:06 mysql-community-common-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root   4443296 Apr  9 01:06 mysql-community-devel-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root   2579460 Apr  9 01:06 mysql-community-libs-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root   1902676 Apr  9 01:06 mysql-community-libs-compat-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 395918848 Apr  9 01:07 mysql-community-server-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  49092596 Apr  9 01:07 mysql-community-test-8.0.11-1.el6.x86_64.rpm

还是不能改,查看密码复杂度要求:

[root@python ~]# mysql -V
mysql  Ver 8.0.11 for Linux on x86_64 (MySQL Community Server - GPL)
[root@python ~]# ll /etc/init.d/mysqld 
-rwxr-xr-x 1 root root 7166 Apr  8 16:21 /etc/init.d/mysqld
[root@python ~]# ll /etc/my.cnf --配置文件位置
-rw-r--r-- 1 root root 1188 Apr  8 16:21 /etc/my.cnf
-rw-r--r-- 1 root root 28987588 Apr 9 01:06 mysql-community-client-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  672184 Apr 9 01:06 mysql-community-common-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  4443296 Apr 9 01:06 mysql-community-devel-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  2579460 Apr 9 01:06 mysql-community-libs-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root  1902676 Apr 9 01:06 mysql-community-libs-compat-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 395918848 Apr 9 01:07 mysql-community-server-8.0.11-1.el6.x86_64.rpm
-rw-r--r-- 1 root root 49092596 Apr 9 01:07 mysql-community-test-8.0.11-1.el6.x86_64.rpm
mysql> alter user root@'localhost' identified by 'mysql';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
mysql> exit
Bye
[root@python ~]# mysql -V
mysql Ver 8.0.11 for Linux on x86_64 (MySQL Community Server - GPL)
[root@python ~]# ll /etc/init.d/mysqld
-rwxr-xr-x 1 root root 7166 Apr 8 16:21 /etc/init.d/mysqld
[root@python ~]# ll /etc/my.cnf --配置文件位置
-rw-r--r-- 1 root root 1188 Apr 8 16:21 /etc/my.cnf

二、安装顺序为:(建议装之前先把之前的mysql相关包全部卸载,rpm -e --nodeps <包名>即可)

mysql> create user root@'localhost' identified by 'mysql';
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> create user root@'localhost' identified by 'mysql';
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'

五、终于设置好密码了,建一个测试用户leo,然后尝试远程连接下吧:

终于改完密码了...去掉参数文件的skip-grant-tables参数,service mysqld restart重启服务。

mysql> delete from mysql.user where user='root';
Query OK, 1 row affected (0.10 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> create user root@'localhost' identified by 'mysql';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

于是去逛了一圈stackoverflow,都说这是一个BUG,于是操作如下:

mysql> show variables like '%auth%';
 ------------------------------- ----------------------- 
| Variable_name                 | Value                 |
 ------------------------------- ----------------------- 
| default_authentication_plugin | caching_sha2_password |
 ------------------------------- ----------------------- 
1 row in set (0.02 sec)

首先需要在my.cnf里添加:default_authentication_plugin=mysql_native_password,然后service mysqld restart重启服务:

至此远程连接正常。

新京葡娱乐场网址 1

mysql> create user root@'localhost' identified by 'mysql';
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> create user root@'localhost' identified by 'mysql';
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'

居然不能改。。。于是:

新京葡娱乐场网址 2

于是继续创建用户,MySQL8.0取消了直接grant创建用户的语法,只能先create user再grant,因此创建root如下:

我这5.7的mysql工具都连不上,这就尴尬了,查看认证相关参数:

mysql> alter user root@'localhost' identified by 'mysql';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
mysql> exit
Bye

完了,全TM完了......

官网地址:

四、发现没密码不能登录,于是添加skip-grant-tables到my.cnf,重启进去重置密码:

我这里是RHEL6.5的系统,因此选择RedHat 6 x86,64bit操作系统---下载第一个RPM Bundle即可--mysql-8.0.11-1.el6.x86_64.rpm-bundle.tar。

mysql> drop user leo;
Query OK, 0 rows affected (0.10 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> create user leo identified by 'mysql';
Query OK, 0 rows affected (0.02 sec)
mysql> grant all on *.* to leo;
Query OK, 0 rows affected (0.08 sec)

$mysql -V
mysql  Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using  EditLine wrapper
$ mysql -uleo -pmysql -h192.168.1.193
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 16
Server version: 8.0.11 MySQL Community Server - GPL

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> 
useradd mysql
passwd mysql

一、mysql-8.0.11-1.el6.x86_64.rpm-bundle.tar解压后有如下7个文件:

发现此值有3个,如下所示:

然后创建mysql用户:

三、安装完毕后相关信息如下:

官网还说此值影响create user不显式指定auth plugin时密码的默认加密算法,卧槽...那岂不是说我之前创建的leo用户使用的是默认的caching_sha2_password认证,查看一下:

于是设置为0,然后将validate_password.length设置为4,表示最少需要4字符。之所以设置为4是因为这个参数的值不能小于如下公式的计算结果:

validate_password.number_count
  validate_password.special_char_count
  (2 * validate_password.mixed_case_count)
mysql> drop user root@'localhost';  --是的没错,虽然没有root@'localhost'用户,但你还是要删一遍。
Query OK, 0 rows affected (0.05 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
mysql> create user root@'localhost' identified by 'mysql';
Query OK, 0 rows affected (0.03 sec)
mysql> grant all on *.* to root@'localhost' with grant option;
Query OK, 0 rows affected (0.03 sec)

本文由67677新澳门手机版发布于网络数据库,转载请注明出处:11安装配置,11安装配置教程

关键词: