开发者社区> 问答> 正文

数据库连接不上

已解决

数据库连接不上  提示如下

run_sql_error
Can not connect to MySQL server
Error: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
Errno:2000


展开
收起
1244501344631689 2019-02-27 15:56:42 657 0
2 条回答
写回答
取消 提交回答
  • 采纳回答
    有可能是高版本mysql数据库导入了低版本数据引起的
    进入mysql
    use mysql;
    set session old_passwords=0;
    select password('root');
    set password for 'root' @'localhost' = password('root'); 
    2019-02-27 16:13:36
    赞同 2 展开评论 打赏
  • 无知人生,记录点滴。 不积跬步,无以至千里;不积小流,无以成江海 订阅号:微wx笑, 个人站点:https://www.ivu4e.cn/,https://www.ivu4e.com/ CSDN博客:https://blog.csdn.net/testcs_dn
    这是你自己安装的Mysql吧,安装完成之后没有设置密码,需要重新设置密码。
    2019-02-27 16:11:30
    赞同 2 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
2022 DTCC-阿里云一站式数据库上云最佳实践 立即下载
云时代的数据库技术趋势 立即下载
超大型金融机构国产数据库全面迁移成功实践 立即下载