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

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

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


mysql> select user,length(password) from mysql.user;
+----------+------------------+
| user     | length(password) |
+----------+------------------+
| root     |               16 |
| test     |               16 |
+----------+------------------+
2 rows in set (0.00 sec)

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

在[mysqld]下检查是否有

[mysqld]
old_passwords=1

将其更改为

old_passwords=0

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


第二、更改数据库的密码

update mysql.user set password=password(‘123456‘) where user=‘root‘;
update mysql.user set password=password(‘123456‘) where user=‘test‘;
flush privileges;   


mysql> select user,length(password) from mysql.user;
+--------------+------------------+
| user         | length(password) |
+--------------+------------------+
| root         |               41 | 
| test         |               41 | 
+--------------+------------------+  

这个更改密码看你有使用几个用户了。

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



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

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

标签:php mysqlnd

人气教程排行