<?php
$con = mysql_connect("123.23.23.22","peter","abc123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }// some codemysql_close($con);
?>
为什么我在本地上运行会报下面错误 版本不统一??  而传到空间上却不报错。。能正常连接 是什么原因 
Warning: 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 C:\wamp\www\wangzhan\cece.php on line 2

解决方案 »

  1.   

    检查你的MYSQL版本。
    select version();应该是版本不一致。 把本机的换成与空间上的一样即可。
      

  2.   

    mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication.
    版本不同?怎么连接MYSQL的?
      

  3.   

    我是•软件版本: 5.5.24-log - MySQL Community Server (GPL)
    这个  我装的是wampserver
      

  4.   

    select version()版本不一致造成的。
    统一版本就可以了。
      

  5.   

    到MYSQL官方下载一下同样的版本就行了。或者更简单一点把服务器上的 mysql/  /bin 上的文件全部复制