php - i uploaded my site to hostinger but i encountered the following problems -


warning: mysql_connect(): access denied user 'root'@'10.2.1.12' (using password: no) in /home/u749031689/public_html/enrollment/includes/dbcon.php on line 8 access denied user 'root'@'10.2.1.12' (using password: no)not

<?php $server="localhost"; $unamedb ="root"; $passdb  =""; $dbname="u749031689_enrol"; $sqlcon = mysql_connect($server, $unamedb, $passdb) or die (mysql_error(). "not connected"); mysql_select_db($dbname, $sqlcon); ?> 

you have create database hostinger server , need replace '$server', '$unamedb', '$passdb' , '$dbname' values per hostinger database details.

your code follows.

<?php $server="your hostingers database server name"; $unamedb ="your hostingers database user name"; $passdb  ="your hostingers database password"; $dbname="u749031689_enrol"; $sqlcon = mysql_connect($server, $unamedb, $passdb) or die (mysql_error(). "not connected"); mysql_select_db($sqlcon, $dbname); ?> 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -