Cannot connect to Joomla DB but can access administrator panel

I have a new Joomla (2.5) site that has been developed on a different host/server which is working fine. I am trying to get it moved onto my host.

I have been through the normal process, files uploaded via FTP, database exported and imported using PHPmyadmin (I can provide the version of PHPmyadmin it has been exported from is an earlier version if this makes a difference?) Finally the configuration.php file has been edited to include the correct host, db, user and password information.

When I try to navigate to the website, I get the following error:

500 - JDatabase::getInstance: Could not connect to database
joomla.library: 2 - Could not connect to MySQL.

Though I can navigate to the /administrator page and browser the back end / control panel and pages of the website.

Turning on the debug function, I get the following:

JDatabase::getInstance: Could not connect to database
joomla.library: 2 - Could not connect to MySQL.

Call stack
#   Function    Location
1   JSite->render() JROOT/index.php:48
2   JDocumentHTML->render() JROOT/includes/application.php:261
3   JDocumentHTML->_renderTemplate()    JROOT/libraries/joomla/document     /html/html.php:433
4   JDocumentHTML->getBuffer()  JROOT/libraries/joomla/document/html/html.php:655
5   JDocumentRendererModules->render()  JROOT/libraries/joomla/document    /html/html.php:371
6   JDocumentRendererModule->render()   JROOT/libraries/joomla/document    /html/renderer/modules.php:39
7   JModuleHelper::renderModule()   JROOT/libraries/joomla/document/html/renderer    /module.php:106
8   include()   JROOT/libraries/joomla/application/module/helper.php:175
9   JError::raiseError()    JROOT/modules/mod_wpposts/mod_wpposts.php:31
10  JError::raise() JROOT/libraries/joomla/error/error.php:251

I am not a developer, and do not understand any of the above! I have moved / copied another couple of sites without issue, but these were on the same host/server.

preguntado el 31 de julio de 12 a las 10:07

"Could not connect to MySQL" suggests the db username/password are incorrect. Or, maybe the web server cannot see the database - is the database on a different server to the web server? -

the db user and password are correct, I have also tried setting up a completely new db and repeating the process, same issues. The web server and db server are the same, so 'localhost' is used. thanks -

¿Puede usted ssh to the web server and run the mysql console from there, using the credentials you believe to be correct? Maybe the Joomla admin page is protected by htaccess credentials rather than connecting via a database (I don't know Joomla - just guessing)? -

Apologies, but i'm not sure what you mean by this? "ssh to the web server and run the mysql console from there" -

Secure telnet. It's beyond the scope of this site to teach you it, but it's a way to connect to the console of the (Linux?) web server and type commands in remotely. You connect using an IP, a username and a password - often the same as your FTP credentials. Putty is a great client to use, if you're on Windows locally. -

1 Respuestas

From the error log listed above I would think that your issue is with the module "wpposts".

Try to unpublish that module from the site. You probably forgot to move the Wordpress database and now the module that is supposed to display "latest posts" or similar is failing and bringing down the site.

Respondido 01 ago 12, 10:08

Søren this was exactly this issue, and doing what you suggested worked. Thanks for your advice. - user1565162

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.