AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

Solve: The mysql extension is deprecated and will be removed.


<< Previous Page
PHP tutorial
Next Page >>
PHP tutorial

PHP Tutorial Solve: The mysql extension is deprecated and will be removed.

Since PHP 5.5 has removed support for mysql extension in favor of mysqli. Upgrade to PHP 6.0 or 7.0 highly recommended.

 

How to solve the warnings?

Most MySQL connections in PHP usually use this script to connect to the SQL database:

<?php
$link = mysql_connect('localhost', 'user', 'password');
mysql_select_db($link, 'dbname');
......
?>

 

Related subjects:
PHP string contains What is an array Convert array to string comma Array to comma separated

This page solves:

Tags: The mysql extension is deprecated and will be removed
mysql_connect(): The mysql extension is deprecated and will
What does Deprecated mysql_connect() mean?
use mysqli or PDO instead [help]
Does MySQLi work with MySQL?
How do you fix deprecated Mysql_connect (): The MySQL extension is deprecated and will be removed in the future use MySQLi or PDO instead in?
Should I use MySQLi or MySQL?
How do I change MySQLi to MySQL?

 

script to solve mysql extension is deprecated

To solve this the way with MySQLi would be like this:

<?php
$link = mysqli_connect('localhost', 'user', 'password', 'dbname');
......
?>

 

DataBase queries is simple way

To run database queries is simple way and nearly identical with the old way:

<?php

// Old way
mysql_query('CREATE TEMPORARY TABLE `table`', $link);
// New way solved
mysqli_query($link, 'CREATE TEMPORARY TABLE `table`');
?>

 



The mysql extension is deprecated and will be removed
mysql_connect(): The mysql extension is deprecated and will
What does Deprecated mysql_connect() mean?
use mysqli or PDO instead [help]
Does MySQLi work with MySQL?
How do you fix deprecated Mysql_connect (): The MySQL extension is deprecated and will be removed in the future use MySQLi or PDO instead in?
Should I use MySQLi or MySQL?
How do I change MySQLi to MySQL?

Solve: The mysql extension is deprecated and will be removed. - php tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Home
PHP Introduction
PHP Install
PHP Syntax
PHP Variables
PHP Echo and Print
PHP Data Types
PHP String Function
PHP Constants
PHP Operator Types
PHP If Else and Elseif
PHP Switch
PHP While Loops
PHP Loop For Do Foreach
PHP Array
Convert Array to String
PHP Function
PHP GET and POST
PHP Date/Time Functions
PHP Login
PHP Delete Element
PHP eregi_replace()
PHP mysql_query()
PHP Errors to Display
PHP Loop For Do Foreach

PHP forms
PHP Form Example
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Error: Unable to connect to MySQL. Debugging errno: 1045 Debugging error: Access denied for user 'u142985959_ager'@'localhost' (using password: YES)