当前位置:Gxlcms > 数据库问题 > php使用mysqlnd引发的一些问题处理

php使用mysqlnd引发的一些问题处理

时间:2021-07-01 10:21:17 帮助过:26人阅读


  1. mysql> select user,length(password) from mysql.user;
  2. +----------+------------------+
  3. | user     | length(password) |
  4. +----------+------------------+
  5. | root     |               16 |
  6. | test     |               16 |
  7. +----------+------------------+
  8. 2 rows in set (0.00 sec)

第一、更改数据库的配置文件/etc/my.conf

在[mysqld]下检查是否有

[mysqld]
old_passwords=1

将其更改为

old_passwords=0

如果没有新增之,然后重新启动数据库服务


第二、更改数据库的密码

  1. update mysql.user set password=password(‘123456‘) where user=‘root‘;
  2. update mysql.user set password=password(‘123456‘) where user=‘test‘;
  3. flush privileges;   
  4. mysql> select user,length(password) from mysql.user;
  5. +--------------+------------------+
  6. | user         | length(password) |
  7. +--------------+------------------+
  8. | root         |               41 | 
  9. | test         |               41 | 
  10. +--------------+------------------+  
  11. 这个更改密码看你有使用几个用户了。

再次刷新网页,正常了了。



本文出自 “枫林晚” 博客,请务必保留此出处http://fengwan.blog.51cto.com/508652/1662046

php使用mysqlnd引发的一些问题处理

标签:php mysqlnd

人气教程排行