0

I am using 000webhost for creating database.

The error is, Error: Access denied for user '(database username)'@'%' to database 'information_schema'

i am getting error in register.php file,i am attaching my register.php code here

<?php
require 'init.php';
$name=$_POST["name"];
$city=$_POST["city"];
$blood_group=$_POST["blood_group"];
$password=$_POST["password"];
$number=$_POST["number"];


$sql="INSERT INTO uuser_table (name,city,blood_group,password,number) VALUES ('$name','$city','$blood_group','$password','$number')";
$result=mysqli_query($con,$sql);
if($result){
    echo "Success";
}
else{
    echo "Error: ".mysqli_error($con);
}
mysqli_close($con);

?>

here init.php file works fine.while including the register.php file the error occurs. It showed access denied to database 'information_schema'.the information_schema is default and i haven't changed anything.

In the myphpadmin database name,information_schema . Mysql is absent

please help me solving his access issue. Thanks:)

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343

0 Answers0