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

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -