mysql 报错:MySQL 4.1+ using the
( ! ) Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file in D:\work3\testphp\testsinykk.php on line
解决方法:
SET old_passwords = 0;
UPDATE mysql.user SET Password = PASSWORD('testpass') WHERE User = 'testuser' limit 1;
SELECT LENGTH(Password) FROM mysql.user WHERE User = 'testuser';
FLUSH PRIVILEGES;
如果要永久解决这个问题,修改my.cnf
vi /etc/my.cnf
old_passwords=1 将这个注释掉,重启mysql,再新建用户则无问题
报歉!评论已关闭.
分类目录
- javascript (6)
- jquerymobile (1)
- LINUX常用命令 (15)
- LINUX服务器配置 (26)
- 软件安装错误 (2)
- LINUX杂项知识 (28)
- mac相关知识 (30)
- PHP学习手册 (32)
- 操作系统小知识 (8)
- 软件配置文档 (11)
近期文章
- PHP面试问题以及解答
- vue如何获取自定义元素属性参数值
- Python [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed 解决方法
- H5页面引导用户去关注微信公众号
- apache AH01630: client denied by server configuration错误解决方法
文章归档
功能
最新文章随机精彩热门排行
- PHP面试问题以及解答
- vue如何获取自定义元素属性参数值
- Python [SSL: CERTIFICATE_VERIFY...
- H5页面引导用户去关注微信公众号
- apache AH01630: client denied b...
- PHP 500 -Invalid command Rewrit...
- MAC下用homebrew安装及配置apache...
- MAC 下使用brew重新安装PHP
- composer 报 zlib_decode(): data...
- PHPStorm IDE 快捷键(MAC)
推荐文章
- 精彩内容获取超时,请稍候...
Warning: array_slice() expects parameter 1 to be array, null given in /www/wwwroot/blog.wwllcchf.com/wp-content/themes/wesky/sidebar.php on line 70
站内统计
- 日志总数:154 篇
- 评论总数:18 评
- 标签数量:20 个
- 链接总数:0 条
- 建站日期:2013-1-1
- 运行天数:4535 天
十佳人物