PHP general thought about database
Generally we use that database which is added without domain. For example you have domain called
example.com then obtusely you will use that database or Myphpadmin. But is it possible
suppose I have
example.com domain and I want save any data which use fill from other website called
abcd.com show in
How it would
It's quite common that databases have another domain, i.e.
mysql.example.com. This scenario can often be seen at hosting-companies.
Nevertheless it's a security-aspect to allow access only on
localhost, then phpMyAdmin needs to be installed exactly on that server where the site is running, and when it's disabled or just not installed, then no access is possible.
So your scenario is nothing special.
If your database is running without domain (not even
localhost) then the connection is by socket. This is common on servers when nothing else is configured. Technically it's still a bit different, if it's configured
localhostthen a socket-connection is established, if you call the local IP-address 127.0.0.1 then a TCP-connection (like for a website). Nevertheless, both solutions can be seen as secure while the socket-connection requires another configuration for phpmyadmin.