Switched servers mysql reconnect problem

This forum is for issues with installing Joomla! 3.x on IIS webservers.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
Scooby22
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Mar 01, 2014 2:08 am

Switched servers mysql reconnect problem

Post by Scooby22 » Thu Jul 24, 2014 1:44 pm

I recently switched servers and transferred my entire joomla folder over via ftp. I have created the new mysql database but I am not sure how to reconnect with the new database without the installation folder. I do feel comfortable ftp-ing to a file and editing a name somewhere if I have to. I am using Joomla 3.

This is the Error I get when trying to view the site:

Error displaying the error page: Application Instantiation Error: Could not connect to MySQL.

itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4025
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: Switched servers mysql reconnect problem

Post by itoctopus » Thu Jul 24, 2014 3:14 pm

You will need to edit the configuration.php file. The host , the db name, the db user, and the db password may not be the same. You will need to change those.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter

Scooby22
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Mar 01, 2014 2:08 am

Re: Switched servers mysql reconnect problem

Post by Scooby22 » Thu Jul 24, 2014 11:05 pm

I did that, and entered in all the new settings. Now I am getting this error.

Error displaying the error page: Application Instantiation Error: No database selected SQL=SELECT `session_id` FROM `aaxcg_session` WHERE `session_id` = 'gs0oeidjvpd9v1dgd7d796jfj6' LIMIT 0, 1

Could this have something to do with the prefix?

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9744
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Switched servers mysql reconnect problem

Post by AMurray » Sat Jul 26, 2014 11:50 pm

The first part of the error "No database selected" seems to mean it doesn't know where to find the table, aaxcg_session, but I'm no MySQL expert. There's definitely an issue with the database connection.

Perhaps as you suggest it is to do with the table prefix, so check this setting below in configuration.php:

public $dbprefix = '.....';

Did you actually import the old databases's tables and data into the new database? Or intend to start from scratch? How did you back up the old database and import it into the new one?

If you are familiar with it, try viewing the database in phpMyAdmin and checking for the table with that prefix mentioned in the error.

If you did a database backup (even if only an export to a *.sql file (you did back up didn't you....?) then try reimporting the database again through phpMyAdmin.

The easiest solution would have been to use Akeeba Backup - to backup the original site, and to transfer/migrate to new server with Akeeba Kickstart. Probably a bit late now if you have already taken down the original site.
Regards - A Murray
General Support Moderator


Locked

Return to “Joomla! 3.x on IIS webserver”