无法仅在cPanel上连接到数据库

I am unable to connect my script to database on my server (cPanel/WHM) But the script is working on my localhost WAMP The database is attached correctly other script is working but only this script is not woorkign Screen SHot

  • If the database host and host of your application are different: add the ip of your application host to the whitelist (Remote MySQL icon in cPanel)
  • Check your credentials
  • Check the privileges of the user