Today my client was facing problem to setup a remote mysql connection. He wanted to connect a database which belongs to another server and domain. Its fairly simple. But most of the tasks remains on the remote server.
Suppose, your remote domain/server is www.remote.com and your scripts are running in mydomain.com. I assume that you already have a database in the remote.com. We just need to access it from remote server. Also assuming that your database name is remoteco_main. Note, all databases & also usernames (for database connection) in cPanel are prefixed by your username of cPanel and _ (underscore). So remoteco in remoteco_main is the username of cPanel. So you have a complete database, username & password setup which works on remote.com. Continue reading →