php解压缩以后,应该是会有php_mysql.dll文件的.
没有,再去下载个新的包.copy php_mysql.dll和lib_mysql.dll到apache的执行文件所在目录或者system32下.
去掉php.ini里面extension=php_mysql.dll语句前面的;号,如果没有,自己加上就可以了.重启apache.

解决方案 »

  1.   

    肯定是你的PHP5有问题,最好重新下载过,哪有PHP5没有MYSQL数据库扩展的,到官方网站去下,不要在其他网站,下了就肯定有你那个文件和那个语句。设置方法你说的是正确的,记得要把lib_mysql.php和php_mysql.dll(像一楼说的)复制到system32里面
      

  2.   

    你的是配置mysql的问题,这个都说了无数次了http://cn.php.net/manual/en/mysql.installation.php
    PHP 4The PHP MySQL extension is compiled into PHP.
    PHP 5+MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "How do I add my PHP directory to the PATH on Windows" for information on how to do this. Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system's PATH), it's not recommended.As with enabling any PHP extension (such as php_mysql.dll), the PHP directive extension_dir should be set to the directory where the PHP extensions are located. See also the Manual Windows Installation Instructions. An example extension_dir value for PHP 5 is c:\php\ext    Note: If when starting the web server an error similar to the following occurs: "Unable to load dynamic library './php_mysql.dll'", this is because php_mysql.dll and/or libmysql.dll cannot be found by the system. 
      

  3.   

    phpinfo();
    查看php.ini的位置,看是否修改的正确的php.ini
    然后再查看有没有mysql支持.
      

  4.   

    extension=php_mysql.dll这个语句,肯定不能运行MySQL扩展了,这是肯定的,没有命令PHP加载它,然后因找不到mysql的函数而出现运行时错误,$link=mysql_connect('localhost','root','123456'); 就已经停止了,后边什么输出那些就更不要说了
      

  5.   

    哎 我搞定了  不知道那个教程叫我去下自动安装包 而网上的教程说的都是解压包
    mysql php apache都被我卸了 重装了遍 搞定