0

Please check this link for the screenshot: https://i.stack.imgur.com/31asM.jpg][1]

And this is my .php connection string code.

<?php
$mysql_hostname = "103.20.200.153";
$mysql_username = "jhaycorc_android";
$mysql_password = "******";
$mysql_database = "jhaycorc_myandroid";
$conn= mysqli_connect($mysql_hostname,$mysql_username,$mysql_password,$mysql_database) or die ("Couldn't connect to database: " . mysqli_connect_error());
?>

this is a online phpmyadmin mysql database server from Crazy domains but i think it has a permission or something. Any suggestions or tip with this? TIA

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • Does the DB allow remote connections? Maybe use `localhost` or `127....`? – user3783243 Mar 21 '20 at 03:35
  • my website is jhaycor.com and i think this is my hostname. If i'm using localhost it would be not online db server but local db server. – ナンダルケジー Mar 21 '20 at 03:42
  • Your DB and source code are on different servers? Does your host allow that set up? Maybe see https://www.digitalocean.com/community/questions/how-to-allow-remote-mysql-database-connection – user3783243 Mar 21 '20 at 03:46
  • The error message means the password is incorrect – Your Common Sense Mar 21 '20 at 06:40
  • Please read: [Should we ever check for mysqli_connect() errors manually?](https://stackoverflow.com/q/58808332/1839439) – Dharman Mar 21 '20 at 12:07
  • inserting and connecting to localhost using xampp is not a problem. My point is a hostname from crazy domain wont work at all and cant connect. i am using 127.0.0.1 and doesnt had a error but mysql table didnt insert data at all. Meaning to say i need to connect it to my hostname. On my error_logs this is the error. – ナンダルケジー Mar 23 '20 at 01:05
  • PHP Warning: mysqli_connect(): (28000/1045): Access denied for user 'jhaycorc_admin'@'ntig.org.au.ht.dstier2.com' (using password: YES) in /home/jhaycorc/public_html/insert_data.php on line 14 – ナンダルケジー Mar 23 '20 at 01:05

0 Answers0