Hello, I edited the script on my localhost and uploaded it to cPanel, but no matter what I did, I keep getting the error message "Access denied for user 'root'@'localhost' (using password: YES), and the site isn't opening. I did some research and found out that I need to switch to PDO. I changed the PHP version to 5.4 but the error persists. Is there any other way to avoid getting this error?
```php
session_start();
ob_start();
error_reporting(0);
$host = "localhost";
$user = "root";
$pass = "";
$db = "kurumsal";
$baglan = mysql_connect($host, $user, $pass) or die (mysql_Error());
mysql_select_db($db, $baglan) or die (mysql_Error());
mysql_query("SET CHARACTER SET 'utf8'");
mysql_query("SET NAMES 'utf8'");
```
In the error log file:
```
[20-Jan-2018 18:31:09 UTC] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/root/public_html/panel/ayar.php on line 10
[20-Jan-2018 18:31:09 UTC] PHP Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in /home/sebomiguzellik/public_html/panel/ayar.php on line 10
```
```php
session_start();
ob_start();
error_reporting(0);
$host = "localhost";
$user = "root";
$pass = "";
$db = "kurumsal";
$baglan = mysql_connect($host, $user, $pass) or die (mysql_Error());
mysql_select_db($db, $baglan) or die (mysql_Error());
mysql_query("SET CHARACTER SET 'utf8'");
mysql_query("SET NAMES 'utf8'");
```
In the error log file:
```
[20-Jan-2018 18:31:09 UTC] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/root/public_html/panel/ayar.php on line 10
[20-Jan-2018 18:31:09 UTC] PHP Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in /home/sebomiguzellik/public_html/panel/ayar.php on line 10
```