1、检查是否已经建立数据库qiu
2、用户名,mysql的密码是否正确,是否与程序里面一致

解决方案 »

  1.   

    我也遇到这个问题。
    我遇到更搞笑的问题是
    我用php5.04的时候居然告诉我找不到mysql_select_db()这个函数。
    后来我只有退回用php4.4。安装好php之后要进行哪些必须的配置?有人说一下吗?还有,我的环境是windows2000,采用直接解压缩的php下有很多文件,但采用windows的installer来安装的就只有很少的文件,到底对不对?连接mysql的时候总是出这种奇怪的错误,觉得真奇怪
      

  2.   

    你上网查一下,好像这种情况只出现在4.1以上的版本,用那个OLD_PASSWORD(好像是这样)的函数将其改过来就行。
    你直接将错误的信息打到网上搜索就可以找到了
      

  3.   

    不是搞笑,php5的确缺省没有这系列函数。需要编译加相应的选项。
    缺省用MySQLi代替了,
    换系统的时候一定要读读手册,看看和以前的有什么不同。
      

  4.   

    嗨,都忘记楼主的问题了,看另外一个帖子http://community.csdn.net/Expert/topic/4203/4203635.xml?temp=.6442377
      

  5.   

    谢谢helloyou0,你的回答让我解决了mysql_connect的连接问题。我测试了一下5.0的php,确实如上面那个大哥说的,连mysql_connect函数都找不到
    我一般都是直接下载安装包来安装,没有什么编译选项是不是需要下载php的源码来编译?
    编译这个源码需要什么编译环境吗?另:查看你所发的那个帖的时发现了phpmyadmin,这是个什么东东?小妹是初学者,希望你说清楚点好吗?
      

  6.   

    php5.0,mysql高于4.1的话,你应该去使用mysqli的系列函数
    你是windows上安装吧,
    手册上见这里,参考一下
    http://ca3.php.net/manual/en/ref.mysql.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. 
      

  7.   

    phpmyadmin是php写的一个mysql管理程序,
    可以网上下一个看看
      

  8.   

    我想问的是如何编译php的源码?
    如何让php5.0+还支持原有的那些函数下面是我看php的文档得到的信息需求
    为了能够顺利的使用该函数库,======你必须在编译 PHP 的时候添加 MySQL 的支持=========。当你选择了 --with-mysql[=DIR] 配置选项的时候,你打开了 PHP 访问 MySQL 数据库的功能。 PHP 4 默认使用了 --with-mysql 选项,因此要禁用 MySQL 必须使用 --without-mysql。在 PHP 4 中,如果你没有在配置选项中指定 MySQL 的路径信息,PHP 会使用绑定的 MySQL 客户端库。在 Windows 下,没有相关的 DLL 文件,该模块已经内建在了 PHP 内核中。用户如果运行其它使用 MySQL 的应用(例如同时使用 Apache 模块化方式运行的 PHP 3 和 PHP 4,或者 auth-mysql 模块)需要指定 MySQL的路径:--with-mysql=/path/to/mysql。这会强迫 PHP 使用 MySQL 安装的客户端库函数来避免任何冲突。 
    在 PHP 5 中,MySQL 不再默认的开启,MySQL 库也不再和 PHP 绑定。我想问的是:如何在编译时增加对mysql的支持
      

  9.   

    用ZEND编译啊`
    你想做什么啊`
    保密么`
    还是加速?
    要收费 的`
      

  10.   

    你的mysql版本高了,mysql4.1就有这个问题这是个老问题,兼容的问题。mysql4.1采用新认证方式,所以很多客户端得升级,php也要升级,升级为最新版。
      

  11.   

    使用
    set password for 'root'@'localhost'=OLD_PASSWORD('3214');
    命令,再连接就可以了
      

  12.   

    回复Hellohuan()我不是要对php代码加密,也不是要加速。我是看到上面 helloyou0(你好!)说可以对源代码自己编译,而且看php的文档,
    是可以下载php源代码来编译生成符合自己要求的php解释器的。我的问题是:我如何才能编译php解释器源代码,而不是我自己写的php页面的代码。
    如果我想编译,如何做,需要什么环境?
      

  13.   

    mysql的原因,换成4.0.22,问题解决!