Connecting to Databases in LPCP
From Lunarpages Web Hosting Wiki
When using your MySQL or PostgreSQL databases with an LPCP powered web hosting account, you will no longer connect using localhost as the default host for the databases in question. All LPCP hosting account servers use a separate database server, to increase reliability and performance with your web hosting plan of choice.
What is My Database Server?
The details on how to connect to your databases are in your welcome e-mail, which was sent to you when your web hosting account was created. They can be found in the category labeled, "Database Instructions".
At this time the database server you might need to use could be:
- lpsql01.lunariffic.com 184.108.40.206
- lpsql02.lunariffic.com 220.127.116.11
- lpsql03.lunariffic.com 18.104.22.168
- lpsql04.lunariffic.com 22.214.171.124
As new servers are rolled out into production, your database server might be different. You can confirm your database server for your LPCP powered web hosting account in your welcome e-mail or by logging into your LPCP and checking on the right side under System Information.
Database Details for Third Party Scripts and Services
When setting up a third-party script or service, you must often plug in details about your database relationship so that the script can use the database in question. In most cases, you should plugin the details like this:
- hostname: Your Host Name (as mentioned above)
- user: serverprefix_username
- database name: serverprefix_databasename
- password: the database user's password
Example Setup Details
Also, be sure that you have also assigned a database user to the database you wish to use. So, for an example, you settings might look something like this:
- hostname: lpsql01.lunariffic.com (or 126.96.36.199)
- username: serverna_mydatabaseuser
- database: serverna_mydatabase
- password: pinkbunny