How to access MySQL Database(presented in one server) from PHP code (local server) using the Username and Password?

Viewed 20

In my case, I have created a new user(admin) with a password(XXXXX) in the Deployed server(Cloud). In my Database root user is also present with all privileges. And my new user also has all privileges. I can only able to access the Databases within the Deployed server with login credentials as a new user(admin). If I try to connect the new user(Admin) from another server(local) I have receiving the following issue.

Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'Admin'@'XXX.XXX.XXX.XXX' (using password: YES) in C:\xampp\htdocs\db_conn\index.php:7 Stack trace: #0 C:\xampp\htdocs\db_conn\index.php(7): mysqli->__construct('xxx.xx.xxx.xx', 'Admin', 'XXXXXXXX') #1 {main} thrown in C:\xampp\htdocs\db_conn\index.php on line 7

  1. Kindly help me to solve this issue
  2. Give some notes hy we need to grant all permission for that user
  3. How to secure MySQL database with multi-level user credentials
0 Answers
Related