连接mysql数据库出错... [英] Error connecting mysql database...

查看:164
本文介绍了连接mysql数据库出错...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我安装了PHP 5.2.5和MySQL 5.0.51版本。我试图通过PHP建立与MySQL的数据库连接,我得到了以下消息的致命错误。我使用Windows XP系统的IIS服务器与Service Pack S2。


致命错误:调用未定义的函数mysql_connect()


这是我的程序,请检查并建议。

Hi All

I installed PHP 5.2.5 and MySQL 5.0.51 versions. I am trying to establish the database connection with MySQL through PHP, I got the fatal error of the below message. I am using the IIS server of Windows XP systems with Service pack S2.

Fatal error: Call to undefined function mysql_connect()

This is my program, please check it and suggest it.

展开 | 选择 | Wrap | 行号

推荐答案

你很可能只是简单地安装了2个应用程序,而你没有安装PHP中的MySQL扩展。请参阅关于此的PHP和MySQL安装指南。


Ronald
You most probably have simply installed the 2 applications apart from each other and you not installed the MySQL extension in PHP. See your PHP and MySQL installation guidelines on this.

Ronald


像Ronald所说,你的PHP安装缺少MySQL扩展。


扩展无法在Windows上加载的常见原因是PATH env变量中缺少PHP安装目录。


尝试添加,重新启动再试一次。
Like Ronald says, your PHP installation is missing the MySQL extension.

A common reason for extensions failing to load on Windows is that the PHP install directory is missing from the PATH env variable.

Try adding that, reboot and try again.


大家好


我安装了PHP和MySQL。我试图通过PHP建立与MySQL的数据库连接,我得到了以下消息的致命错误。我正在使用带有Service Pack S2的Windows XP系统的MySQL服务器。


致命错误:调用未定义的函数mysql_connect()


这是我的程序,请检查并建议。
Hi All

I installed PHP and MySQL . I am trying to establish the database connection with MySQL through PHP, I got the fatal error of the below message. I am using the MySQL server of Windows XP systems with Service pack S2.

Fatal error: Call to undefined function mysql_connect()

This is my program, please check it and suggest it.
展开 | 选择 | Wrap | 行号


这篇关于连接mysql数据库出错...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆