mysql5.5提示Deprecated: mysql_query(): The mysql extension is deprecated

解决方法1:在php程序代码里面设置报警级别

<?php error_reporting = E_ALL & ~E_DEPRECATED

方法2:禁止php报错

display_errors = On 改为 display_errors = Off

方法3:使用mysqli或者PDO

建议大家尽快取消mysql,全部都走向mysqli或者PDO等等。mysql确实是太不安全而且太老旧了。

小提示

第二种方法是临时解决办法,不过也是当前比较常用的解决方法了,现在有N多程序都是用mysql_connect连接数据库哦。

时间: 2024-08-28 01:43:27

mysql5.5提示Deprecated: mysql_query(): The mysql extension is deprecated的相关文章

解决MYSQL弃用模块错误Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future

今天使用了mysql 5.5版本,就出现了错误.错误提示如下: Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in 看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代.所以说这个应该说是提示更恰当. 现在知道这个错误是什么原因引起的,那么就很好解

PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法

这篇文章主要介绍了PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法,是在进行PHP数据库程序开发中常会遇到的错误,需要的朋友可以参考下 本文实例讲述了PHP提示 Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法,在PHP程序开发中常会遇到这类问题.分享给大家供大家参考,具体的解决方法如下: 将下面代码改为mysqli

解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:

php5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in,看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代. 解决方法1: 禁止PHP报错 d

小胖学PHP总结5-----PHP操作SQL数据库(Deprecated: mysql_connect(): The mysql extension is deprecated and will)

第一:打开数据库 要操作SQL数据库,首先必须于MySQL服务器建立连接,连接MySQL服务器的语句: mysql_connect('hostname','username','password') 该函数的返回值用于表示这个数据库连接成功,如果连接成功,则会返回一个资源,为以后执行SQL指令做准备. <?php $link = mysql_connect("localhost:3306","root","123456") or die(&

解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in

php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in,看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代. 解决方法1: 禁止php报错

【解决方案】Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in F:\Program Files (x86)\wamp\www\testmysql.php on line 2 <?php $link = mysql_connect('localhost','root',''); if (!$link) { d

解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

因为最近更新的PHP版本,写sql语句,忽然发现不能用了,上网查了一些原因,找到几个方法如下: 1.禁止php报错 display_errors = on 改成 display_errors = off 2.将PHP中的mysql用PDO或者是mysqli代替就不会发生这种情况了 3.php设置报警级别  error_reporting(E_ALL ^ E_DEPRECATED);

MYSQL版本问题:解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future.

[mysql] mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in

From: http://www.ttlsa.com/php/deprecated-mysql-connect/ php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in,看意思就很明了,说my