Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/postza/public_html/xn--12cf0b8altun9eua9b.com/member/connect/config.php on line 14
Cannot Connect to MySQL
Code (PHP)
<?php
// Database Connection
$host="localhost"; // change
$username = "root"; // change
$password = "0123"; // change
$db="s"; // change
$connect=mysql_connect($host,$username,$password) or die ("Cannot Connect to MySQL");
mysql_select_db($db) or die ("Cannot connect to Database");
$cs1 = "SET character_set_results=utf8";
mysql_query($cs1) or die('Error query: ' . mysql_error());
$cs2 = "SET character_set_client = utf8";
mysql_query($cs2) or die('Error query: ' . mysql_error());
$cs3 = "SET character_set_connection = utf8";
mysql_query($cs3) or die('Error query: ' . mysql_error());
date_default_timezone_set('Asia/Bangkok');