解决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来替代。所以说这个应该说是提示更恰当。
现在知道这个错误是什么原因引起的,那么就很好解决了。
解决方法1:在php程序代码里面设置报警级别
<?php
error_reporting = E_ALL & ~E_DEPRECATED
方法2:禁止php报错
display_errors = On 改为 display_errors = Off
方法3:使用mysqli或者PDO
建议大家尽快取消mysql,全部都走向mysqli或者PDO等等。mysql确实是太不安全而且太老旧了。
解决MYSQL弃用模块错误Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future的更多相关文章
- mysql5.5提示Deprecated: mysql_query(): The mysql extension is deprecated
解决方法1:在php程序代码里面设置报警级别 <?php error_reporting = E_ALL & ~E_DEPRECATED 方法2:禁止php报错 display_erro ...
- 解决 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 ext ...
- 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extens ...
- 解决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 extens ...
- 错误Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
今天写PHP代码,遇到了这个非常不友好的报错(Deprecated: mysql_connect(): The mysql extension is deprecated and will be re ...
- PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法
这篇文章主要介绍了PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法,是在进行PHP数据库程序开发中常会遇 ...
- 浅析Mysql 数据回滚错误的解决方法
介绍一下关于Mysql数据回滚错误的解决方法.需要的朋友可以过来参考下 MYSQL的事务处理主要有两种方法.1.用begin,rollback,commit来实现begin 开始一个事务rollbac ...
- 浅析Mysql数据回滚错误的解决方法
介绍一下关于Mysql数据回滚错误的解决方法.需要的朋友可以过来参考下 MYSQL的事务处理主要有两种方法. 1.用begin,rollback,commit来实现 begin 开始一个事 ...
- 解决Lost connection to MySQL server during query错误方法
昨天使用Navicat for MySQL导入MySQL数据库的时候,出现了一个严重的错误,Lost connection to MySQL server during query,字面意思就是在查询 ...
随机推荐
- ECSHOP商城全站自定义TITLE标题设置
对于SEO来说,能让标题自定义的将会大大增加SEO效果,提高独立商城的流量,今天小编就收集从网上弄来ecshop全站自定义代码,很全哦! 1.Ecshop商品分类页如何实现自定义Title 最近发现很 ...
- ubuntu 下搭建一个python3的虚拟环境(用于django配合postgresql数据库开发)
#安装python pip (在物理环境中安装) sudo apt-get install python-pip sudo apt-get install python3-pipsud ...
- 用UseMiddleware扩展方法注册中间件类
用UseMiddleware扩展方法注册中间件类 .NET Core中间件的注册和管道的构建(2)---- 用UseMiddleware扩展方法注册中间件类 0x00 为什么要引入扩展方法 有的中间件 ...
- HDU 4010 Query on The Trees(动态树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4010 题意:一棵树,四种操作: (1)若x和y不在一棵树上,将x和y连边: (2)若x和y在一棵树上, ...
- Non-unique Elements
Non-unique Elements You are given a non-empty list of integers (X). For this task, you should return ...
- paip.Adblock屏蔽onlinedown华军软件园的4秒下载广告总结..
paip.Adblock屏蔽onlinedown华军软件园的4秒下载广告总结.. 作者Attilax , EMAIL:1466519819@qq.com 来源:attilax的专栏 地址 ...
- 开发人员应该知道的SEO
搜索引擎是如何工作的 > 如果你有时间,可以读一下谷歌的框架: http://infolab.stanford.edu/~backrub/google.html > 这是一个老的,有些过时 ...
- Linux usb子系统(一):子系统架构
一.USB协议基础知识 前序:USB概念概述 USB1.0版本速度1.5Mbps(低速USB) USB1.1版本速度12Mbps(全速USB) USB2.0版本速度480Mbps(高速USB). ...
- vmware虚拟机迁移系统到其它磁盘(xjl456852原创)
有时我们将vmware安装的系统放在了磁盘空间比较小的盘里,后来磁盘空间不够用了,我们需要将文件移动到其它磁盘.腾出这个磁盘的空间. 我安装的系统有10个,总占空间大小170多GB.需要从D盘迁移到G ...
- C#中通过位运算实现多个状态的判断
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...