Certain versions of MySQL are vulnerable to a buffer overflow when a user-defined function is created. This would allow an authenticated attacker to gain control of the MySQL daemon. Note that successful exploitation of this issue is dependent upon the attacker possessing insert privileges on the MySQL function table; this mitigates the risk considerably.
So that is the reason why MySQL is disabled on Shared Servers.
Solution: For Example: Instead of using mysql_connect () , you need to use mysqli_connect () in order to make your website connect with the database.
Below is the code for mysqli_connect ():
<?php
$con = mysqli_connect("localhost","my_user","my_password","my_db");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?>
For more reference, Click Here.
1. Purchasea Linux Reseller Hosting. 2. Login to WHM. You can login to WHM via following URLs.... Read More
For cPanel 1. Login into cPanel. 2. Click on File Manager. 3. Go to root directory of... Read More
Taking backup of database Login to your control panel and click Backups. Under... Read More
Overview This interface allows you to create and manage subdomains for your cPanel account. A... Read More
Overview This interface displays information about current connections to your FTP server and it... Read More