Lunarpages Web Hosting Forum

Author Topic: Wordpress and LPCP not connecting to DB  (Read 7532 times)

Offline bignik

  • Trekkie
  • **
  • Posts: 12
    • The Cryer
Wordpress and LPCP not connecting to DB
« on: February 16, 2010, 09:12:34 AM »
In the past I have done what feels like a gubbazillion manual WordPress installs on Lunarpages servers without incident. I was always using CPanel.

I just attempted my first install with LPCP, and it cannot connect to the database.

I read we don't use Localhost with LPCP... but I've entered everything into my WP_config file as it appears on my MySQL Manager page and it won't connect.

The only things that are different from previous CPanel installs are that the hostname is now an IP address (no longer Localhost) and the username has an '@IPaddress' appended onto it.

Should I be change the hostname to something else? Do I keep @IPaddress on the tail end of my username?

Help?!? (And thanks in advance)

Edited to add:: Scroll to bottom... I did get a solution to this problem!
« Last Edit: February 17, 2010, 02:04:01 PM by bignik »

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6404
Re: Wordpress and LPCP not connecting to DB
« Reply #1 on: February 16, 2010, 09:30:31 AM »
Who is telling you to use an IP address? I don't use LPCP, but my understanding is that the host name should be the full server name (not "localhost"), something like lpsql01.lunariffic.com and the other fields should be the same as with cPanel.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline bignik

  • Trekkie
  • **
  • Posts: 12
    • The Cryer
Re: Wordpress and LPCP not connecting to DB
« Reply #2 on: February 16, 2010, 09:51:26 AM »
The IP address is the defaut in the 'hostname' field. But it didn't work. Neither did localhost. Neither did lpsql01.lunariffic.com.

What am I missing?

Offline Mitch

  • Berserker Poster
  • *****
  • Posts: 12634
    • MitchKeeler.com
Re: Wordpress and LPCP not connecting to DB
« Reply #3 on: February 16, 2010, 10:04:19 AM »
MrPhil is correct, should be lpsql01.lunariffic.com or lpsql02.lunariffic.com
New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!

Offline bignik

  • Trekkie
  • **
  • Posts: 12
    • The Cryer
Re: Wordpress and LPCP not connecting to DB
« Reply #4 on: February 16, 2010, 10:49:36 AM »
Hmmm... well I'm clearly not as skilled as I thought. I cannot get either one of those to work. Is the DB server down? If not... how can we troubleshoot this? I've checked and double checked and tried various combinations to no avail.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6404
Re: Wordpress and LPCP not connecting to DB
« Reply #5 on: February 16, 2010, 11:17:03 AM »
Can you bring up phpMyAdmin and browse your database? Being able to do so would at least prove that the MySQL server is up and running. If MySQL under LPCP works the same way as on cPanel, you need to create a user and password, and associate that user with a specific database. Have you done that? Have you doublechecked the MySQL server name that you're supposed to be using? I think there are at least three of them (00, 01, and 02).
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline bignik

  • Trekkie
  • **
  • Posts: 12
    • The Cryer
Re: Wordpress and LPCP not connecting to DB
« Reply #6 on: February 16, 2010, 11:42:34 AM »
Thanks MrPhil for the suggestions... but no luck.

phpMyAdmin runs and connects to the db with no problem (there is no content in it since WP has been unable to connect to it)
User is created and assigned to the db.
I was assigned 02... and that is not working either.

Does it matter that my WP is not installed on the root? Never has in the past, but then again, I've never had an issue setting up WordPress.

Database name: loginName_databaseName
User name: loginName_DBuserName@lpsql02.lunariffic.com
password: password
Database Host: lpsql02.lunariffic.com
table prefix: wp_

Am I missing dots or slashes or something?

Offline Mitch

  • Berserker Poster
  • *****
  • Posts: 12634
    • MitchKeeler.com
Re: Wordpress and LPCP not connecting to DB
« Reply #7 on: February 16, 2010, 12:09:31 PM »
I would suggest you drop in a help desk ticket, and have them double check to make sure your database is connecting correctly or not. 
New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!

Offline bignik

  • Trekkie
  • **
  • Posts: 12
    • The Cryer
Re: Wordpress and LPCP not connecting to DB
« Reply #8 on: February 16, 2010, 12:18:27 PM »
Thanks Mitch... I did that.

I also have a question now about the following from the critical account info email from LP:

Quote
Database Instructions
MySQL and PostgreSQL
Please note that our MySQL and PostgreSQL databases run on a separate server, so you will need to use the following server name to access those services:

lpsql02.lunariffic.com

This is effective only for the scripts you setup on the server until your domain gets propagated to our ns1.lunariffic.com and ns2.lunariffic.com nameservers.


Can you explain what this means:

Quote
This is effective only for the scripts you setup on the server until your domain gets propagated to our ns1.lunariffic.com and ns2.lunariffic.com nameservers.

Offline Mitch

  • Berserker Poster
  • *****
  • Posts: 12634
    • MitchKeeler.com
Re: Wordpress and LPCP not connecting to DB
« Reply #9 on: February 16, 2010, 12:42:52 PM »
Let me check real quick, sounds like a typo to me - cause databases shouldn't rely on the nameservers.  

edit - could be they mean that the scripts would not run properly, using databases till the domain name propagation is complete.
« Last Edit: February 16, 2010, 12:47:08 PM by Mitch »
New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!

Offline lexhair

  • Galactic Royalty
  • *****
  • Posts: 427
Re: Wordpress and LPCP not connecting to DB
« Reply #10 on: February 16, 2010, 12:56:34 PM »
Thanks MrPhil for the suggestions... but no luck.

phpMyAdmin runs and connects to the db with no problem (there is no content in it since WP has been unable to connect to it)
User is created and assigned to the db.
I was assigned 02... and that is not working either.

Does it matter that my WP is not installed on the root? Never has in the past, but then again, I've never had an issue setting up WordPress.

Database name: loginName_databaseName
User name: loginName_DBuserName@lpsql02.lunariffic.com
password: password
Database Host: lpsql02.lunariffic.com
table prefix: wp_

Am I missing dots or slashes or something?

See here.

Your username is loginName_DBuserName. All the stuff after the '@' will screw your connection up.

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6404
Re: Wordpress and LPCP not connecting to DB
« Reply #11 on: February 16, 2010, 02:42:51 PM »
Can you explain what this means:

Quote
This is effective only for the scripts you setup on the server until your domain gets propagated to our ns1.lunariffic.com and ns2.lunariffic.com nameservers.

This has been discussed at least once before. Too bad LP can't be bothered to fix the wording, as was promised before.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline Mitch

  • Berserker Poster
  • *****
  • Posts: 12634
    • MitchKeeler.com
Re: Wordpress and LPCP not connecting to DB
« Reply #12 on: February 17, 2010, 04:49:49 AM »
Well, the proverbial hamster wheel is turning on that, just mentioned the feedback again yesterday, so hopefully we can get some more user friendly text in there soon.
New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!

Offline bignik

  • Trekkie
  • **
  • Posts: 12
    • The Cryer
Re: Wordpress and LPCP not connecting to DB
« Reply #13 on: February 17, 2010, 01:34:10 PM »
OK, I'm happy to report that with the help of my support ticket I am now connecting to the database. I thought I'd report the solution here, while it isn't difficult it certainly isn't intuitive so maybe I can help save some else's headache...

The issue I was having was all related to my database username.

When you create your database user in LPCP, type in the name and DO NOT CHANGE the IP address under hostname. Even though you are using lpsql01.lunariffic.com, that is NOT where you enter that information.

After you create your user, the name will show on your MySQLmanager as LoginName_DBusername@IPaddressProvided. That is fine.

When you enter your info into the WP-Config.php file, your username becomes LoginName_DBusername. Do not add on the @ or the IP address.

And your host name (formerly localhost) becomes lpsql02.lunariffic.com (or whatever server name you are given on your Critical Account Info data sheet when signing on).

And there you have it.  :thumb:




Offline Mitch

  • Berserker Poster
  • *****
  • Posts: 12634
    • MitchKeeler.com
Re: Wordpress and LPCP not connecting to DB
« Reply #14 on: February 18, 2010, 05:02:07 AM »
Thanks for sharing bignik!

Update -

I have updated this tutorial to help explain the changes and how to set up a MySQL user correctly.

http://wiki.lunarpages.com/Create_and_Delete_MySQL_Users_in_LPCP

Hope it helps out!  :D
« Last Edit: February 18, 2010, 07:41:06 AM by Mitch »
New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!