After upgrading XAMPP, I get database connection error (3)

Problems with the Windows version of XAMPP, questions, comments, and anything related.

After upgrading XAMPP, I get database connection error (3)

Postby stefanaalten » 12. May 2015 11:04

Hi,

I have upgraded my local XAMPP installation, from v1.7.3 to v5.6.8. First I renamed the old XAMPP directory (containing v1.7.3) from J:\xampp to J:\xampp.old, and then installed XAMPP v5.6.8 to J:\xampp. The installation completed successfully, and I then ran XAMPP as administrator, started MySQL and PHP, and visited http://localhost and addressed the security warnings (setting a password for the MySQL superuser and setting XAMPP directory protection). Returning to the XAMPP status page, all was fine. The user accounts and passwords are the same as for my old installation.

Next I copied the subfolder containing my local site from the old XAMPP htdocs folder (J:\xampp.old\htdocs) to the new XAMPP folder (J:\xampp\htdocs). This subfolder is called joomla25 and contains a Joomla-based site which works fine (before upgrading XAMPP I double-checked it by visiting http://localhost/joomla25). I then went to http://localhost/joomla25 and received the following error: "Database connection error (3): Could not connect to database".

Can anyone please help me? Many thanks in advance! :D

Stefan
stefanaalten
 
Posts: 8
Joined: 28. September 2014 12:05
Location: Edinburgh, United Kingdom
Operating System: Windows 7 64-bit

Re: After upgrading XAMPP, I get database connection error (

Postby JJ_Tagy » 12. May 2015 11:34

Joomla uses a database for content storage. In your .old folder, you should start up the old xampp (with the new one stopped, of course) and do a database dump. That will be needed to import into your new xampp.

That being said, you should also check if Joomla 2.5 is even able to be run on the new php version...
JJ_Tagy
 
Posts: 678
Joined: 30. January 2012 13:44
Operating System: Windows 10 Pro x64

Re: After upgrading XAMPP, I get database connection error (

Postby mark.mcdonald » 12. May 2015 14:57

JJ_Tagy wrote:Joomla uses a database for content storage. In your .old folder, you should start up the old xampp (with the new one stopped, of course) and do a database dump. That will be needed to import into your new xampp.

I would try installing Joomla 3 and importing the old database content. This will be more maintainable for the long run as Joomla fixes bugs and adds features.
mark.mcdonald
 
Posts: 160
Joined: 13. March 2015 15:48
Location: Edmonton
Operating System: Windows Server 2012 R2

Re: After upgrading XAMPP, I get database connection error (

Postby stefanaalten » 12. May 2015 17:11

Hi, and thanks for the replies JJ and Mar, but I'm struggling with this. I got completely muddled up and have now completely uninstalled XAMPP 5.6.8, and am back with just XAMPP 1.7.3, in J:\xampp, and my local Joomla-based site in J:\xampp\htdocs\joomla25, and I have verified that my site still works, at http://localhost/joomla25.

What I am trying to do is to upgrade my local site from Joomla v2.5.25 to the latest Joomla version (according to my Joomla control panel that is v3.3.4, but according to joomla.org that is v3.4.1). When I try to upgrade (using the "Update Now!" button in the Joomla Control Panel page), I get this message:

We can't install the update to 3.3.4 as your host doesn't support the minimum requirements for Joomla 3.3.4 and there is no alternative available.


When I refer to the minimum requirements (at joomla.org/technical-requirements) I see that PHP 5.3.10+ and MySQL 5.1+ are specified. Checking my local installation, I see that it uses PHP 5.3.1 and MySQL 5.1.41. Checking XAMPP I noticed there is a later version (5.6.8) than the one I currently use (1.7.3) and that this comes with the latest distributions of PHP and MySQL, so I was hoping I could simply "upgrade" XAMPP and be done with it, or alternatively install a new XAMPP alongside the old one and copy my site from J:\xampp\htdocs\joomla25 to htdocs folder in the new XAMPP installation.

What I would really appreciate is if you could offer a step-by-step explanation of how to accomplish the XAMPP upgrade in such a way that my Joomla-based site still works?

Many thanks in advance! :-)
stefanaalten
 
Posts: 8
Joined: 28. September 2014 12:05
Location: Edinburgh, United Kingdom
Operating System: Windows 7 64-bit

Re: After upgrading XAMPP, I get database connection error (

Postby mark.mcdonald » 12. May 2015 18:15

1)Exporting databases
The first step in this process is to export the working database from the source server.
Log in to the phpMyAdmin instance on the source server.
Click the Export tab.
From the database drop-down (left navigation), select the joomla database.
Choose between a Quick or a Custom export. The Quick method should work most of the time, though if you need to get more granular with your export options, click Custom. If you choose Custom, you can configure the following:
Tables: Choose which tables to export.
Output: Choose the template, character set, and compression for the export.
Format: Choose to display comments, enclose the export in a transaction, disable foreign key checks, dump table (structure, data, or both).
Object creation options: Add statements.
Data dump options: Use INSERT DELAYED or INSERT IGNORE statements, select the function to use when dumping data, select the syntax to use when inserting data, maximal length of created query.
Select the format from the Format drop-down (for a wordpress to wordpress export/import, select SQL).
Click the Go button.
Save the file (which, by default, should be named joomla.sql).
You should now have a file on your local disk called joomla.sql

2) Download a new copy of xampp. Stop the old instance and label to "xampp-original or xampp-old" (something to identify it as the old working version).
Extract the new xampp in place where the old one was.
Run xampp and import the downloaded sql file from "Step 1)"
Importing databases
The import process is just as simple. These steps can be used for either a database exported from phpMyAdmin or a database dumped using another tool (such as the mysqldump command).
You need to make sure there isn't already a database on the target server with the same name. With your database on your local drive, here are the steps you should follow to import that file with phpMyAdmin.
Log in to phpMyAdmin.
Create an empty database from the Databases tab.
Click the Import tab.
Click the Browse button.
Locate the file to be imported.
Click Open or OK, depending on your browser.
Select the proper collation from the drop-down.
Select the format of the import file.
Click Go.
After the import process is complete, check the site to make sure everything is good.
Stop xampp

3) Copy the joomla content from the old htdocs to the new htdocs.
Copy and paste.
Run xampp and make sure everything works. Now try upgrading via Joomla's update channel.
mark.mcdonald
 
Posts: 160
Joined: 13. March 2015 15:48
Location: Edmonton
Operating System: Windows Server 2012 R2

Re: After upgrading XAMPP, I get database connection error (

Postby stefanaalten » 14. May 2015 08:46

Mark - many thanks for that information - really appreciate you taking the time and though to put this together for me! :-) I am going to try this today and will let you know how I get on.
stefanaalten
 
Posts: 8
Joined: 28. September 2014 12:05
Location: Edinburgh, United Kingdom
Operating System: Windows 7 64-bit

Re: After upgrading XAMPP, I get database connection error (

Postby stefanaalten » 14. May 2015 10:54

Hi,

Mark, many thanks once again for your help with this! The steps all made sense and really helped me to "stay on track", and I have now managed to successfully transfer my site to the new XAMPP stack. :D

At step 2, I got an error ("The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why. Or alternately go to 'Operations' tab of any database to set it up there.") This was displayed after clicking on "Admin" next to mySQL in the XAMPP control panel for the new installation. Clicking on "Find out why" displays a page with configuration info, and the following settings are listed as "not OK":

$cfg['Servers'][$i]['favorite'] ... not OK
Persistent favorite tables: Disabled
$cfg['Servers'][$i]['central_columns'] ... not OK
Managing Central list of columns: Disabled


I'm not sure what this meant and whether it mattered, so I ignored the error message and continued by importing the joomla.sql file generated in step 1.

Next I hit a size warning:

Warning: POST Content-Length of 37065247 bytes exceeds the limit of 8388608 bytes in Unknown on line 0


My joomla.sql file is 35MB. I then went into php.ini and changed some values: upped upload_max_filesize to 50M, and post_max_size=0 (i.e. disabling the limit), and tried again and this time it worked.

Finally, I copied the site (from the old htdocs to the new htdocs) and - tadaah! - my site is there, running on the new XAMPP stack.

Now I'm off to attempt the Joomla upgrade itself. Fingers crossed.
stefanaalten
 
Posts: 8
Joined: 28. September 2014 12:05
Location: Edinburgh, United Kingdom
Operating System: Windows 7 64-bit

Re: After upgrading XAMPP, I get database connection error (

Postby mark.mcdonald » 14. May 2015 14:59

Did this work?
mark.mcdonald
 
Posts: 160
Joined: 13. March 2015 15:48
Location: Edmonton
Operating System: Windows Server 2012 R2

Re: After upgrading XAMPP, I get database connection error (

Postby stefanaalten » 14. May 2015 15:10

Hi Mark,
Your guide to upgrading XAMPP worked - really helpful.
My Joomla upgrade didn't work though, so I reverted to a backup, upgraded XAMPP again, and am now still on my "old" Joomla site (Joomla version 2.5.25) but at least it's on an up-to-date XAMPP stack (5.6.8)
stefanaalten
 
Posts: 8
Joined: 28. September 2014 12:05
Location: Edinburgh, United Kingdom
Operating System: Windows 7 64-bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 78 guests