Database connection error 2 could not connect to mysql joomla

In this article, we'll cover the more common Joomla 2.5 database errors and steps you can take to resolve them.

Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here.

Joomla 2.5 utilizes a database to store a majority of a site’s content. For example, if you write a new article in Joomla, the article is written to the database. As the database is vital for Joomla to run, if Joomla cannot connect to your database and access information, you will see database related error messages on your site. In this article, we’ll show you a few common errors and how you can resolve them.

Common Joomla 2.5 Database Connection Error Messages:

  • Database connection error (2): Could not connect to MySQL
  • Database connection error (3): Could not connect to database
  • MySQL server has gone away
database-connection-error-2-could-not-connect-to-mysql

Problem:
This error message generally means that your Joomla’s configuration.php file has either the wrong database name or database username. In our testing environment, we changed both the database username and password, and in each separate occasion the same error message occurred.

Solution:
You should review your configuration.php file and ensure you are using the correct MySQL username and password. These settings will appear in the file as:

public $user = 'userna5_dbuser';
public $password = 'dbpass';

If you are sure the settings are correct, it is recommend to reset your database user’s password and update your configuration.php file with the new password. This will help ensure that you have the correct database password set.

Database connection error (3): Could not connect to database

database connection error could not connnect to database

Problem:
This error message usually means that you are connecting to the wrong database server. For most Joomla installations, the Joomla files themselves and the database it connects to are on the same server. When this is the case, “localhost” should be used the database server. We recreated this error message by setting the database host to “localhosttt” (localhost spelled wrong).

Solution:
If your Joomla site is setup like most, check your configuration.php file and ensure your database host is set to “localhost”. This is setting looks like the following in your config file:

public $host = 'localhost';

MySQL server has gone away

mysql server has gone away

Problem:
The “MySQL server has gone away” error generally means that there is a problem with MySQL on the server, therefor it is unavailable for use. In our testing environment, we shut down MySQL and received such a warning.

Solution:
If you are not an InMotion Hosting customer, you should contact your current web hosting provider with the necessary details for more help with this. At InMotion Hosting, we monitor our servers 24 hours a day. If MySQL is not functioning on a server, we are aware usually seconds after the issue occurs. You can rest assured we are on top of the problem and that it should be corrected shortly. As always, you can contact our Support Team if you desire to report such a problem.

Most often, if Joomla has been working fine and suddenly stops working due to a database error, there is a problem with the database on your server. You’ll want to contact your hosting provider for further assistance. If you have recently made a change to Joomla and then you begin to see database errors, instead of contacting your host you should first check your database settings in your configuration.php file.

Moderator: General Support Moderators

Hairs

Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Tue Mar 08, 2011 7:57 am
Location: Australia
Contact:

Database connection error (2): Solved

«Database connection error (2): Could not connect to MySQL»

Hi,
Version joomla 2.5.9
I have read through all the post relating to this problem, tried all solutions and can’t find answer to my problem with the error «Database connection error (2): Could not connect to MySQL»
I have uninstalled the site from the public directory and I had the Host default the account.
All fields match perfectly to my database details.
I have used different browsers, even different computers to install all to no avail.

I’ve spend a few days going over and over the details to make sure that all fields are entered correctly.
If anyone needs information about what settings I’ve used, please ask.
What have I done differently to other installs?
Any help would be greatly appreciated.
Cheers
Jon

Last edited by Hairs on Tue Mar 19, 2013 10:05 am, edited 2 times in total.

Never get too busy making a living

That you forget to make a life


User avatar

ranwilli

Joomla! Master
Joomla! Master
Posts: 19196
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: Database connection error (2): Could not connect to MySQ

Post

by ranwilli » Sat Mar 16, 2013 12:36 am

Jon:

There are 4 settings which must be absolutely corrrect:
1.hostname
2.dbname
3.dbusername
4.password

I HAVE run into one case in well over 1,000 manual installations of Joomla! (various versions) where having all 4 correct did NOT connect with the database.

That was when I used a password generated by the cpanel (on Rochen hosting) which befuddled Joomla somehow (if I remember correctly, the password had characters like «(» and «)» used somewhere within the string.)

The only other thing that is a small possibility is that some file or file(s) necessary for db connection have become corrupt on upload.

So if you are pursuaded that all 4 settings are absolutely correct, then change the password to something else, and try again with the revised settings.

If it still does not connect, reinstall the files from start to finish.

Good Luck, and may your patience be rewarded.

Last edited by ranwilli on Sat Mar 16, 2013 12:39 am, edited 1 time in total.

Don’t HACK the Joomla! core, Instead «Extend» and/or «Override.»
Stay ON the update path.
https://harpervance.com


User avatar

johans

I’ve been banned!
Posts: 1293
Joined: Tue Oct 26, 2010 3:54 am
Contact:

Re: Database connection error (2): Could not connect to MySQ

Post

by johans » Sat Mar 16, 2013 12:37 am

Is you host upgrade a mysql version?
What is the permission set on your files?


User avatar

Webdongle

Joomla! Master
Joomla! Master
Posts: 42388
Joined: Sat Apr 05, 2008 9:58 pm

Re: Database connection error (2): Could not connect to MySQ

Post

by Webdongle » Sat Mar 16, 2013 12:40 am

Hairs wrote:
I have uninstalled the site from the public directory and I had the Host default the account.

Don’t understand why uninstall it ? … what do you mean by ‘public directory’ ? … what do you mean by ‘I had the Host default the account. ?

Hairs wrote:

All fields match perfectly to my database details.
I have used different browsers, even different computers to install all to no avail.

I’ve spend a few days going over and over the details to make sure that all fields are entered correctly.

Including the database host field ?

Could be copy/paste error because you copied a hidden(EOL char) to the fields
Could be your database user does not have sufficient permissions (N.B. this is different to folder/file Permissions which has nothing to do with database connection)
Could be an error on the server
Could be it’s a new Domain name and the site has not propagated correctly

Are you using the official Joomla package or an install script provided by the Host ?

http://forum.joomla.org/viewtopic.php?f=621&t=582860 please


Hairs

Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Tue Mar 08, 2011 7:57 am
Location: Australia
Contact:

Re: Database connection error (2): Could not connect to MySQ

Post

by Hairs » Sat Mar 16, 2013 1:19 am

Hi ranwilli,
All field are correct, I’ve double checked.
I didn’t use the password generator, so the password doesn’t have any thing but numbers and letters.

Johans, My mysql version, 5.00.15 —

Hi Webdongle,
Uninstalled thinking that a file was corrupt, Package was downloaded from Joomla site, even tried earlier versions, same result with the error.
Directory, public_html/(joomla files here)
I have tried with the install public_html/joomla same result.
I asked the host to default the account, again just in case I had corrupted a file or messed something up.
I will let you know when I have installed The Joomla Forum Post Assistant.
Thank you for your time guys.
Cheers

Edit,
Is this where I upload the file too,
http://www.mydomainname.com/fpa-en.php
Because I can’t get it to work from there.

Last edited by Hairs on Sat Mar 16, 2013 1:32 am, edited 2 times in total.

Never get too busy making a living

That you forget to make a life


User avatar

Webdongle

Joomla! Master
Joomla! Master
Posts: 42388
Joined: Sat Apr 05, 2008 9:58 pm

Re: Database connection error (2): Could not connect to MySQ

Post

by Webdongle » Sat Mar 16, 2013 1:32 am

Oh you mean you asked the Host to set the Hosting back to it’s default setting.

This leaves the possible causes
Could be copy/paste error because you copied a hidden(EOL char) to the fields
Could be your database user does not have sufficient permissions (N.B. this is different to folder/file Permissions which has nothing to do with database connection)
Could be an error on the server
Could be it’s a new Domain name and the site has not propagated correctly

Search Google for
mysql connection test tools
And use one to test your database details


Hairs

Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Tue Mar 08, 2011 7:57 am
Location: Australia
Contact:

Re: Database connection error (2): Could not connect to MySQ

Post

by Hairs » Sat Mar 16, 2013 2:03 am

Hi Webdongle,
I ran a MySQL tool and this is the error.

Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111

Never get too busy making a living

That you forget to make a life


User avatar

Webdongle

Joomla! Master
Joomla! Master
Posts: 42388
Joined: Sat Apr 05, 2008 9:58 pm

Re: Database connection error (2): Could not connect to MySQ

Post

by Webdongle » Sat Mar 16, 2013 2:19 am

Googling that error found


Your host is wrong, your port is wrong, a firewall blocked the connection, or the SQL server is not running. 111 is «connection refused».

http://stackoverflow.com/questions/8495 … -error-111

Which is much the same as stated before with the addition of a firewall on the server being a possible cause.

Suggest you consult with your Hosts and double check you are entering the correct details(especially the database host). Then ask them why the connection is refused to the details they gave you.


Hairs

Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Tue Mar 08, 2011 7:57 am
Location: Australia
Contact:

Re: Database connection error (2): Could not connect to MySQ

Post

by Hairs » Sat Mar 16, 2013 2:23 am

Thanks Webdongle,
I’ll contact them.
Cheers

Never get too busy making a living

That you forget to make a life


Hairs

Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Tue Mar 08, 2011 7:57 am
Location: Australia
Contact:

Re: Database connection error (2): Could not connect to MySQ

Post

by Hairs » Sun Mar 17, 2013 1:59 am

Hi Guys,
Thank you for all your suggestions and ideas.
I contacted my Host and finally got someone that was willing to dig a little deeper and listen to me.
Within an hour of speaking with them the site I manage is running well, without any sql errors at this stage :D
Thank you Webdongle for you help also Image

Never get too busy making a living

That you forget to make a life


aosfyc

Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Thu Feb 14, 2008 3:42 pm

Re: Database connection error (2): Solved

Post

by aosfyc » Fri Aug 23, 2013 12:45 pm

What would cause the «Database connection error (2): Could not connect to MySQL» to intermittently occur? I am having this issue with my site and the hosting support’s brilliant solution to this is that I clear my laptop’s cache since they were not able to duplicate the error.


Hairs

Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Tue Mar 08, 2011 7:57 am
Location: Australia
Contact:

Re: Database connection error (2): Solved

Post

by Hairs » Sat Aug 24, 2013 10:04 am

I have no idea why this occurs, but in my above posted, I mentioned I finally got an operator that listened, haven’t had the error since.
Not of much help to you, but I would insist that your host provider dig a little deeper.

Never get too busy making a living

That you forget to make a life


User avatar

techlabpro

Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Sat Aug 24, 2013 10:17 am
Location: Dhaka, Bangladesh
Contact:

Re: Database connection error (2): Solved

Post

by techlabpro » Sat Aug 24, 2013 11:00 am

Please check the following things
1) Database Name
2) Database User Name
3) Database Pass
4) Host Name (if godaddy then host name will get in phpmyadmin)

*** Also make sure Database user have proper permission ***

Last edited by pe7er on Sat Aug 24, 2013 12:41 pm, edited 1 time in total.

Reason: Manual signature has been removed.



Return to “Installation Joomla! 2.5”


Jump to

  • Joomla! Announcements
  • ↳   Announcements
  • ↳   Announcements Discussions
  • Joomla! 4.x — Ask Support Questions Here
  • ↳   General Questions/New to Joomla! 4.x
  • ↳   Installation Joomla! 4.x
  • ↳   Administration Joomla! 4.x
  • ↳   Migrating and Upgrading to Joomla! 4.x
  • ↳   Extensions for Joomla! 4.x
  • ↳   Security in Joomla! 4.x
  • ↳   Templates for Joomla! 4.x
  • ↳   Search Engine Optimization (Joomla! SEO) in Joomla! 4.x
  • ↳   Language — Joomla! 4.x
  • ↳   Performance — Joomla! 4.x
  • ↳   Joomla! 4.x Coding
  • Joomla! 3.x — Ask Support Questions Here
  • ↳   General Questions/New to Joomla! 3.x
  • ↳   Installation Joomla! 3.x
  • ↳   Joomla! 3.x on IIS webserver
  • ↳   Administration Joomla! 3.x
  • ↳   Access Control List (ACL) in Joomla! 3.x
  • ↳   Migrating and Upgrading to Joomla! 3.x
  • ↳   Security in Joomla! 3.x
  • ↳   Extensions for Joomla! 3.x
  • ↳   Templates for Joomla! 3.x
  • ↳   Search Engine Optimization (Joomla! SEO) in Joomla! 3.x
  • ↳   Language — Joomla! 3.x
  • ↳   Performance — Joomla! 3.x
  • ↳   Joomla! 3.x Coding
  • Joomla! Versions which are End of Life
  • ↳   Joomla! 2.5 — End of Life 31 Dec 2014
  • ↳   General Questions/New to Joomla! 2.5
  • ↳   Installation Joomla! 2.5
  • ↳   Joomla! 2.5 on IIS webserver
  • ↳   Administration Joomla! 2.5
  • ↳   Access Control List (ACL) in Joomla! 2.5
  • ↳   Migrating and Upgrading to Joomla! 2.5
  • ↳   Security in Joomla! 2.5
  • ↳   Extensions for Joomla! 2.5
  • ↳   Templates for Joomla! 2.5
  • ↳   Search Engine Optimization (Joomla! SEO) in Joomla! 2.5
  • ↳   Language — Joomla! 2.5
  • ↳   Performance — Joomla! 2.5
  • ↳   Joomla! 1.5 — End of Life Sep 2012
  • ↳   General Questions/New to Joomla! 1.5
  • ↳   Installation 1.5
  • ↳   Joomla! 1.5 on IIS webserver
  • ↳   Administration 1.5
  • ↳   Migrating and Upgrading to Joomla! 1.5
  • ↳   Security in Joomla! 1.5
  • ↳   Extensions for Joomla! 1.5
  • ↳   Templates for Joomla! 1.5
  • ↳   Search Engine Optimization (Joomla! SEO) in Joomla! 1.5
  • ↳   Language — Joomla! 1.5
  • ↳   Performance — Joomla! 1.5
  • ↳   Joomla! 1.0 — End of Life 22 July 2009
  • ↳   Installation — 1.0.x
  • ↳   Upgrading — 1.0.x
  • ↳   Security — 1.0.x
  • ↳   3rd Party/Non Joomla! Security Issues
  • ↳   Administration — 1.0.x
  • ↳   Extensions — 1.0.x
  • ↳   Components
  • ↳   Modules
  • ↳   Plugins/Mambots
  • ↳   WYSIWYG Editors — 1.0.x
  • ↳   Integration & Bridges — 1.0.x
  • ↳   phpbb — Joomla! Integration
  • ↳   Templates & CSS — 1.0.x
  • ↳   Language — 1.0.x
  • ↳   Joom!Fish and Multilingual Sites
  • ↳   Performance — 1.0.x
  • ↳   General Questions — 1.0.x
  • Joomla! International Language Support
  • ↳   International Zone
  • ↳   Arabic Forum
  • ↳   تنبيهات هامة
  • ↳   الدروس
  • ↳   4.x جوملا!
  • ↳   جوملا! 1.6/1.7
  • ↳   الأسئلة الشائعة
  • ↳   التثبيت و الترقية
  • ↳   الحماية — و تحسين السرعة والأداء
  • ↳   لوحة التحكم
  • ↳   الإضافات البرمجية
  • ↳   تعريب جوملا! و الإضافات البرمجية
  • ↳   القوالب و التصميم
  • ↳   صداقة محركات البحث
  • ↳   القسم العام
  • ↳   1.5 !جوملا
  • ↳   الأسئلة الشائعة
  • ↳   التثبيت و الترقية
  • ↳   الحماية — و تحسين السرعة والأداء
  • ↳   لوحة التحكم
  • ↳   الإضافات البرمجية
  • ↳   تعريب جوملا! و الإضافات البرمجية
  • ↳   القوالب و التصميم
  • ↳   صداقة محركات البحث
  • ↳   القسم العام
  • ↳   جوملا! 1.0
  • ↳   الأسئلة الشائـعة
  • ↳   التثبيت
  • ↳   لوحة التحكم
  • ↳   الإضافات البرمجية
  • ↳   الإضافات المعرّبة
  • ↳   القوالب و التصميم
  • ↳   الحماية — تحسين السرعة والأداء — صداقة محركات البحث
  • ↳   القسم العام
  • ↳   القسم العام
  • ↳   !عرض موقعك بجوملا
  • ↳   الأرشيف
  • ↳   Bengali Forum
  • ↳   Bosnian Forum
  • ↳   Joomla! 1.5
  • ↳   Instalacija i prvi koraci
  • ↳   Ekstenzije
  • ↳   Templejti
  • ↳   Moduli
  • ↳   Prevodi i dokumentacija
  • ↳   Joomla! 1.7 / Joomla! 1.6
  • ↳   Catalan Forum
  • ↳   Notícies
  • ↳   Temes sobre l’administració
  • ↳   Temes sobre la traducció
  • ↳   Components, mòduls i joombots
  • ↳   Temes de disseny
  • ↳   Webs realitzades amb Joomla!
  • ↳   Offtopics
  • ↳   Chinese Forum
  • ↳   Croatian Forum
  • ↳   Danish Forum
  • ↳   Meddelelser
  • ↳   Joomla! 4.x
  • ↳   Joomla! 3.x (Anbefalet til nye installationer. Nyeste funktionalitet)
  • ↳   Installation, backup, opdatering og flytning — Godt igang
  • ↳   Administration — Generel brug
  • ↳   Komponenter, Moduler og Plugins
  • ↳   Template, CSS og Design
  • ↳   Nethandel, betaling m.m.
  • ↳   Ældre versioner (disse vedligeholdes ikke længere fra officiel side)
  • ↳   Joomla! 2.5 (Supporteres indtil 31. dec. 2014)
  • ↳   Installation, backup, opdatering og flytning — Godt igang
  • ↳   Administration — Generel brug
  • ↳   Komponenter, Moduler og Plugins
  • ↳   Template, CSS og Design
  • ↳   Nethandel, betaling m.m.
  • ↳   Joomla 1.5 (Tidligere langtidssupporteret version indtil sep. 2012)
  • ↳   Installation, backup, opdatering og flytning — Godt igang
  • ↳   Administration — Generel brug
  • ↳   Komponenter, Moduler og Plugins
  • ↳   Template, CSS og Design
  • ↳   Nethandel, betaling m.m.
  • ↳   Joomla 1.0 (Udgået version, der blev afløst af 1.5 i 2008)
  • ↳   Installation, backup, opdatering og flytning — Godt igang
  • ↳   Administration — Generel brug
  • ↳   Komponenter, Moduler og Mambots
  • ↳   Template, CSS og Design
  • ↳   Nethandel, betaling m.m.
  • ↳   Oversættelser (lokalisering)
  • ↳   Joomla brugergrupper i Danmark
  • ↳   JUG Kolding
  • ↳   JUG København
  • ↳   JUG Odense
  • ↳   JUG Århus
  • ↳   JUG Sorø
  • ↳   Kommerciel (betalt) hjælp ønskes
  • ↳   SEO
  • ↳   FAQ — Dokumentation og vejledninger
  • ↳   Vis dit websted
  • ↳   Afviste ‘Vis dit websted’ indlæg
  • ↳   Diverse (Off topic)
  • ↳   Dutch Forum
  • ↳   Aankondigingen
  • ↳   Algemene vragen
  • ↳   Joomla! 4.x
  • ↳   Joomla! 3.x
  • ↳   Installatie 3.x
  • ↳   Extensies 3.x
  • ↳   Templates 3.x
  • ↳   Joomla! 2.5
  • ↳   Installatie 2.5
  • ↳   Componenten 2.5
  • ↳   Modules 2.5
  • ↳   Plugins 2.5
  • ↳   Templates 2.5
  • ↳   Joomla! 1.5
  • ↳   Installatie
  • ↳   Componenten
  • ↳   Modules
  • ↳   Plugins
  • ↳   Templates
  • ↳   Joomla! 1.0
  • ↳   Installatie 1.0.x
  • ↳   Componenten 1.0.x
  • ↳   Modules 1.0.x
  • ↳   Mambots 1.0.x
  • ↳   Templates 1.0.x
  • ↳   Vertalingen
  • ↳   Offtopic
  • ↳   Show jouw website
  • ↳   Filipino Forum
  • ↳   International Support Center
  • ↳   Pinoy General Discussion & Archives
  • ↳   Site Showcase
  • ↳   Events
  • ↳   Design Tips and Tricks
  • ↳   Tsismis Zone
  • ↳   Pinoy Translation Zone
  • ↳   Pinoy Forum Archives
  • ↳   Joomla! Philippines Local Forum www.joomla.org.ph
  • ↳   Finnish Forum
  • ↳   French Forum
  • ↳   Les annonces!
  • ↳   Le bistrot!
  • ↳   L’expo!
  • ↳   J! 4.x — L’atelier!
  • ↳   J! 3.x — L’atelier!
  • ↳   3.x — Questions générales, nouvel utilisateur
  • ↳   3.x — Installation, migration et mise à jour
  • ↳   3.x — Sécurité et performances
  • ↳   3.x — Extensions tierce partie
  • ↳   3.x — Templates et design
  • ↳   3.x — Développement
  • ↳   3.x — Ressources
  • ↳   J! 2.5.x — L’atelier!
  • ↳   2.5 — Questions générales
  • ↳   2.5 — Installation, migration et mise à jour
  • ↳   2.5 — Sécurité et performances
  • ↳   2.5 — Extensions tierce partie
  • ↳   2.5 — Templates et design
  • ↳   2.5 — Développement
  • ↳   2.5 — Ressources
  • ↳   J! 1.5.x — L’atelier!
  • ↳   1.5 — Questions générales
  • ↳   1.5 — Installation, migration et mise à jour
  • ↳   1.5 — Sécurité et performances
  • ↳   1.5 — Extensions tierce partie
  • ↳   1.5 — Templates et design
  • ↳   1.5 — Développement
  • ↳   1.5 — Ressources
  • ↳   J! 1.0.x — L’atelier!
  • ↳   1.0 — Questions générales
  • ↳   1.0 — Installation et mise à jour
  • ↳   1.0 — Sécurité
  • ↳   1.0 — Extensions tierce partie
  • ↳   1.0 — Templates et design
  • ↳   1.0 — Développement
  • ↳   1.0 — Ressources
  • ↳   Besoin d’un professionel ?
  • ↳   Extensions Open Source pour Joomla!
  • ↳   German Forum
  • ↳   Ankündigungen
  • ↳   Joomla! 4.x
  • ↳   Joomla! 3.x
  • ↳   Allgemeine Fragen
  • ↳   Installation und erste Schritte
  • ↳   Komponenten, Module, Plugins
  • ↳   Template, CSS und Designfragen
  • ↳   Entwicklerforum
  • ↳   Zeige Deine Webseite
  • ↳   Joomla! 2.5
  • ↳   Allgemeine Fragen
  • ↳   Installation und erste Schritte
  • ↳   Komponenten, Module, Plugins
  • ↳   Template, CSS und Designfragen
  • ↳   Entwicklerforum
  • ↳   Zeige Deine Webseite
  • ↳   Joomla! 1.5
  • ↳   Allgemeine Fragen
  • ↳   Installation und erste Schritte
  • ↳   Komponenten, Module, Plugins
  • ↳   Template, CSS und Designfragen
  • ↳   Entwicklerforum
  • ↳   Zeige Deine Webseite
  • ↳   Professioneller Service
  • ↳   Sonstiges (Offtopic)
  • ↳   Archiv
  • ↳   Joomla! 1.0
  • ↳   Allgemeine Fragen 1.0.x
  • ↳   Installation und erste Schritte 1.0.x
  • ↳   Komponenten, Module, Mambots 1.0.x
  • ↳   Template, CSS und Designfragen 1.0.x
  • ↳   Entwicklerforum 1.0.x
  • ↳   Zeige Deine Webseite 1.0.x
  • ↳   Greek Forum
  • ↳   Joomla! 4.x
  • ↳   Joomla! 3.x
  • ↳   Joomla! 2.5.x
  • ↳   Joomla! 1.5.x
  • ↳   Joomla! 1.0.x
  • ↳   Hebrew Forum
  • ↳   Indic Languages Forum
  • ↳   Indonesian Forum
  • ↳   FAQ
  • ↳   Bantuan
  • ↳   Komponen
  • ↳   Modul
  • ↳   Template
  • ↳   Diskusi
  • ↳   Italian Forum
  • ↳   Guide
  • ↳   Traduzioni
  • ↳   Componenti — Moduli — Plugins
  • ↳   Template — Grafica
  • ↳   Notizie
  • ↳   Prodotti Open Source per Joomla!
  • ↳   Richieste professionali
  • ↳   Joomla! 4.x
  • ↳   Joomla! 3.x
  • ↳   Joomla! 2.5.x
  • ↳   Joomla! 1.x
  • ↳   Latvian Forum
  • ↳   Lithuanian Forum
  • ↳   Joomla! 4.x
  • ↳   Joomla! 1.5
  • ↳   Joomla! 1.7 / Joomla! 1.6
  • ↳   Joomla! 1.0
  • ↳   Vertimai ir Kalba
  • ↳   Malaysian Forum
  • ↳   Solved
  • ↳   Norwegian Forum
  • ↳   Informasjon
  • ↳   Arkiverte annonseringer
  • ↳   FAQ — Ofte spurte spørsmål
  • ↳   Arkiv
  • ↳   Joomla! 4.x
  • ↳   Joomla! 3.x
  • ↳   Administrasjon/installasjon
  • ↳   Migrering/Oppdatering
  • ↳   Template, CSS og design
  • ↳   Komponenter/moduler/programutvidelser
  • ↳   Sikkerhet
  • ↳   Generelt
  • ↳   Netthandel, betaling m.m.
  • ↳   VirtueMart
  • ↳   Andre nettbutikkløsninger
  • ↳   Generelt
  • ↳   Oversettelser
  • ↳   Fremvisning av sider (Show off)
  • ↳   Avviste fremvisninger
  • ↳   Diverse (off topic)
  • ↳   Kommersiell hjelp ønskes
  • ↳   Eldre versjoner av Joomla!
  • ↳   Joomla! 1.0
  • ↳   Administrasjon/installasjon
  • ↳   Template, CSS og design
  • ↳   Komponenter/moduler/mambots
  • ↳   Sikkerhet
  • ↳   Generelt
  • ↳   Joomla! 1.5
  • ↳   Administrasjon/installasjon
  • ↳   Migrering/Oppdatering
  • ↳   Template, CSS og design
  • ↳   Komponenter/moduler/programutvidelser
  • ↳   Sikkerhet
  • ↳   Generelt
  • ↳   Joomla! 2.5
  • ↳   Administrasjon/installasjon
  • ↳   Migrering/Oppdatering
  • ↳   Template, CSS og design
  • ↳   Komponenter/moduler/programutvidelser
  • ↳   Sikkerhet
  • ↳   Generelt
  • ↳   Persian Forum
  • ↳   قالب ها
  • ↳   مدیریت
  • ↳   سوالهای عمومی
  • ↳   نصب
  • ↳   مامبوت ها
  • ↳   ماژولها
  • ↳   کامپوننت ها
  • ↳   Polish Forum
  • ↳   Instalacja i aktualizacja
  • ↳   Administracja
  • ↳   Komponenty, moduły, wtyczki
  • ↳   Szablony
  • ↳   Paczta i Podziwiajta
  • ↳   Modyfikacje i własne rozwiązania
  • ↳   Tłumaczenia
  • ↳   FAQ
  • ↳   Tips&Tricks
  • ↳   Dokumentacja
  • ↳   Profesjonalne usługi
  • ↳   Portuguese Forum
  • ↳   Componentes, módulos e mambots
  • ↳   Programação e desenvolvimento
  • ↳   Segurança
  • ↳   Sites dos usuários
  • ↳   Off-topic
  • ↳   Tradução
  • ↳   Templates
  • ↳   Romanian Forum
  • ↳   Traduceri
  • ↳   Russian Forum
  • ↳   Объявления по Joomla!
  • ↳   Безопасность Joomla!
  • ↳   Joomla 4.x — Задайте здесь свой вопрос по поддержке
  • ↳   Joomla 3.x — Задайте здесь свой вопрос по поддержке
  • ↳   Общие вопросы/Новичок в Joomla! 3.x
  • ↳   Установка Joomla! 3.x
  • ↳   Миграция и переход на Joomla! 3.x
  • ↳   Расширения для Joomla! 3.x
  • ↳   Многоязычные веб-сайты на Joomla 3.x
  • ↳   Joomla 2.5 — Задайте здесь свой вопрос по поддержке
  • ↳   Общие вопросы/Новичок в Joomla! 2.5
  • ↳   Установка Joomla! 2.5
  • ↳   Расширения для Joomla! 2.5
  • ↳   Русский язык Joomla! 2.5
  • ↳   Serbian/Montenegrin Forum
  • ↳   Tehnička pitanja
  • ↳   Instalacija i početnička pitanja
  • ↳   Šabloni
  • ↳   Prevod i dokumentacija
  • ↳   Ćaskanje
  • ↳   Bezbednost
  • ↳   Joomla! dodaci
  • ↳   Pravna pitanja
  • ↳   Arhiva
  • ↳   Joomla! Događaji i Zajednica
  • ↳   Izlog (spisak) sajtova radjenih u Joomla! CMS-u
  • ↳   Profesionalne usluge
  • ↳   Slovak Forum
  • ↳   Spanish Forum
  • ↳   Joomla! 4.x
  • ↳   Joomla! 3.x
  • ↳   Migración y actualización a Joomla 3.x
  • ↳   Versiones de Joomla! obsoletas
  • ↳   Joomla! 2.5
  • ↳   Joomla! 1.5
  • ↳   Extensiones
  • ↳   Plantillas (templates) y diseño
  • ↳   Idioma y traducciones
  • ↳   SEO para Joomla!
  • ↳   Seguridad y rendimiento
  • ↳   Productos de Código Abierto para Joomla!
  • ↳   Servicios profesionales
  • ↳   Salón de la comunidad Ñ
  • ↳   Swedish Forum
  • ↳   Meddelanden
  • ↳   Forum Joomla! 4.x
  • ↳   Forum Joomla! 3.x
  • ↳   Allmänna frågor
  • ↳   Användning och administration
  • ↳   Installation, backup och säkerhet
  • ↳   Komponenter, moduler och plugin
  • ↳   Mallar (templates) och design
  • ↳   Äldre versioner
  • ↳   Forum Joomla! 1.0
  • ↳   Allmänna frågor
  • ↳   Användning och administration
  • ↳   Installation, backup och säkerhet
  • ↳   Komponenter, moduler och Mambots
  • ↳   Mallar (templates) och design
  • ↳   Forum Joomla! 1.7 / Joomla! 1.6
  • ↳   Allmänna frågor
  • ↳   Användning och administration
  • ↳   Installation, backup och säkerhet
  • ↳   Komponenter, moduler och plugin
  • ↳   Mallar (templates) och design
  • ↳   Forum Joomla! 1.5
  • ↳   Allmänna frågor
  • ↳   Användning och administration
  • ↳   Installation, backup och säkerhet
  • ↳   Komponenter, moduler och plugin
  • ↳   Mallar (templates) och design
  • ↳   Forum Joomla! 2.5
  • ↳   Allmänna frågor
  • ↳   Användning och administration
  • ↳   Installation, backup och säkerhet
  • ↳   Komponenter, moduler och plugin
  • ↳   Mallar (templates) och design
  • ↳   Översättning
  • ↳   Webbplatser gjorda i Joomla
  • ↳   Webbplatser J! 3.x
  • ↳   Webbplatser J! 2.5
  • ↳   Webbplatser Joomla! 1.7 / Joomla! 1.6
  • ↳   Webbplatser J! 1.5
  • ↳   Webbplatser J! 1.0
  • ↳   Kommersiell hjälp önskas
  • ↳   Diverse (off topic)
  • ↳   Tamil Forum
  • ↳   Thai Forum
  • ↳   โชว์เว็บไซต์ของคุณที่สร้างด้วยจูมล่า
  • ↳   เคล็ดลับการใช้งานส่วนต่างๆ เกี่ยวกับจ&#
  • ↳   คอมโพเน้นท์ โมดูล ปลักอิน ต่างๆ ที่ติดตั
  • ↳   อับเดดข่าวสารเกี่ยวกับจูมล่าลายไทย
  • ↳   Turkish Forum
  • ↳   Duyurular
  • ↳   Dersler
  • ↳   Genel Sorular
  • ↳   Bileşen, Modül, Bot
  • ↳   Eklenti Haberleri
  • ↳   Temalar
  • ↳   Vietnamese Forum
  • ↳   Gặp gỡ và giao lưu
  • ↳   Joomla Tiếng Việt
  • ↳   Cài đặt — Cấu hình
  • ↳   Thành phần mở rộng cho Joomla!
  • ↳   Hỏi đáp Joomla! 3.x
  • ↳   Hỏi đáp Joomla! 2.5
  • ↳   Hỗ trợ kỹ thuật
  • ↳   Bài viết cũ
  • ↳   Thiết kế Template
  • ↳   Joomla! 1.5
  • ↳   Hỏi đáp Joomla! 4.x
  • ↳   Welsh Forum
  • Other Forums
  • ↳   Open Source Products for Joomla!
  • ↳   The Lounge
  • ↳   Forum Post Assistant (FPA)
  • Joomla! Development Forums
  • Joomla! Official Sites & Infrastructure
  • ↳   docs.joomla.org — Feedback/Information
  • ↳   extensions.joomla.org — Feedback/Information
  • ↳   joomla.com — Feedback/Information
  • ↳   Sites & Infrastructure — Feedback/Information
  • ↳   Archived Boards — All boards closed
  • ↳   Design and Accessibility — Archived
  • ↳   Quality and Testing — Locked and Archived
  • ↳   Joomla! 1.0.x_Q&T
  • ↳   Q&T 1.0.x Resolved
  • ↳   Known Issues
  • ↳   Superseded Issues
  • ↳   Archive
  • ↳   Q&T 1.0.x Resolved — Archived
  • ↳   Known Issues — Archive
  • ↳   Superseded Issues — Archive
  • ↳   Joomla! 3.x Bug Reporting
  • ↳   Third Party Testing for Joomla! 1.5
  • ↳   Q&T 1.5.x Resolved
  • ↳   Joomla! 1.5 BETA
  • ↳   Joomla! 1.5 BETA 2
  • ↳   Reaction to the ‘Letter to the community’
  • ↳   Reaction to New Project Name
  • ↳   Logo Competition
  • ↳   Humor, Fun and Games
  • ↳   Libraries
  • ↳   patTemplate
  • ↳   com_connector — Multi Joomla Bridge
  • ↳   CiviCRM Support
  • ↳   CiviCRM Installation Issues
  • ↳   FAQ Archive
  • ↳   FAQ Discussion Board
  • ↳   3rd Party Extensions FAQ
  • ↳   FAQs not moved
  • ↳   3rd Party/Non Joomla! Security FAQ
  • ↳   Joomla! Coding 101
  • ↳   Joombie Tools of the Trade
  • ↳   Joombie Coding Q/A
  • ↳   Joombie Think Tank
  • ↳   Joombie Developer Lab
  • ↳   Joomla Forge — Archived
  • ↳   Non-Profit Organizations and Joomla!
  • ↳   Schools and Universities
  • ↳   Bangsamoro Forum
  • ↳   Joomla! 1.5 Template Contest
  • ↳   SMF — Simplemachines.org Forum
  • ↳   GPL Discussion
  • ↳   Security Announcements — Old
  • ↳   Tips & Tricks — Moving
  • ↳   Submit Your Suggested Tips & Tricks to Docs.joomla.org now please.
  • ↳   Google Summer of Code and GHOP
  • ↳   Google Summer of Code 2008
  • ↳   Proposed projects
  • ↳   Student area
  • ↳   Past Google Summer of Code Editions
  • ↳   Google’s Highly Open Participation Contest
  • ↳   Documentation
  • ↳   Suggestions, Modifications, and Corrections
  • ↳   Archive
  • ↳   1.5 Archive
  • ↳   Suggestions, Modifications & Corrections
  • ↳   Submit
  • ↳   Feedback and Suggestions
  • ↳   Applications for participation in the Development Workgroup
  • ↳   Development
  • ↳   1.5 Site Showcase — Archived
  • ↳   1.0 x Site Showcase — Archived.
  • ↳   Feature Requests — White Papers — Archived
  • ↳   Under Review — Archived
  • ↳   Accepted — Archived
  • ↳   Not Accepted — Archived
  • ↳   Wishlists and Feature Requests — Archive
  • ↳   Wishlist Archives — Archived
  • ↳   Spanish Forum — Archive
  • ↳   Papelera
  • ↳   Tutoriales
  • ↳   General
  • ↳   Salón de la Joomlaesfera hispanohablante
  • ↳   Danish Forum — Archive
  • ↳   Diskussion af Meddelelser + Sikkerhedsmeddelelser + FAQ
  • ↳   Shop.Joomla.org
  • ↳   Joomla! 1.6 RC Support [closed]
  • ↳   Joomla! 1.0 Coding
  • ↳   Core Hacks and Patches
  • ↳   Joomla! 2.5 Beta Support
  • ↳   People.joomla.org — Feedback/Information
  • ↳   Joomla! 1.5 Bug Reporting
  • ↳   Joomla! 1.5 Coding
  • ↳   Joomla! 3 Beta Support
  • ↳   Trending Topics
  • ↳   Help wanted in the community
  • ↳   templates.joomla.org — Feedback/Information
  • ↳   Certification
  • ↳   Albanian Forum
  • ↳   Azeri Forum
  • ↳   Urdu Forum
  • ↳   Basque Forum
  • ↳   Itzulpenaren inguruan
  • ↳   Laguntza teknikoa
  • ↳   Belarusian Forum
  • ↳   Maltese Forum
  • ↳   Hungarian Forum
  • ↳   Slovenian Forum
  • ↳   Japanese Forum
  • ↳   Khmer Forum
  • ↳   ពិពណ៌​ស្ថាន​បណ្ដាញ​ជុំឡា
  • ↳   ជុំឡា​ខ្មែរ​មូលដ្ឋានីយកម្ម
  • ↳   Community Blog Discussions
  • ↳   JoomlaCode.org
  • ↳   Joomla! Marketing and PR Team
  • ↳   resources.joomla.org — Feedback/Information
  • ↳   Training.Joomla.org
  • ↳   OpenSourceMatters.org
  • ↳   magazine.joomla.org — Feedback/Information
  • ↳   Site Showcase
  • ↳   Joomla! 4 Related
  • ↳   Joomla! Events
  • ↳   Joomla! Ideas Forum
  • ↳   Registered Joomla! User Groups
  • ↳   Joomla! 2.5 Coding
  • ↳   Joomla! 2.5 Bug Reporting
  • ↳   User eXperience (UX)
  • ↳   Joomla! Working Groups
  • ↳   Translations

0 Пользователей и 1 Гость просматривают эту тему.

  • 9 Ответов
  • 4576 Просмотров

В процессе работы с настройками сайта была допущена опечатка в настройках сайта. Теперь при заходе на сайт выдается ошибка «Database connection error (2): Could not connect to MySQL.»
Всё бы ничего, но работал исключительно на панели управления к которой доступ тоже закрыт ошибкой. на сайте лежит резервная копия, как восстановить сайт?
п.с. увы я не силён в терминологии как и в целом в программировании был бы крайне признателен за пошаговую инструкцию.

файл configuration.php  в корне сайта замени тем что в бекапе

Записан

Разработка расширений: Joomla 1.5+, Bitrix 12+, Мобильные приложения для сайтов под Android (PhoneGap).
Для бонусов: Z136221252622, R242724126443, U423945028202. +79211696184(Мегафон), или плюсик в репу!

Вся сложность что доступа ни к конфигу ни к бэкапу не имею на данный момент.

на сайте лежит резервная копия

а это что?

Записан

Разработка расширений: Joomla 1.5+, Bitrix 12+, Мобильные приложения для сайтов под Android (PhoneGap).
Для бонусов: Z136221252622, R242724126443, U423945028202. +79211696184(Мегафон), или плюсик в репу!

а это что?

akeeba backup использовал для создания точки восстановления, использовать ее умею только из панели управления собственно.

тогда бери доступы к базе данных и вписывай в конфиг! configuration.php — в корне сайта

public $dbtype = ‘mysqli’;
public $host = ‘localhost’;
public $user
public $password
public $db
public $dbprefix

Записан

Разработка расширений: Joomla 1.5+, Bitrix 12+, Мобильные приложения для сайтов под Android (PhoneGap).
Для бонусов: Z136221252622, R242724126443, U423945028202. +79211696184(Мегафон), или плюсик в репу!

тогда бери доступы к базе данных и вписывай в конфиг! configuration.php — в корне сайта

public $dbtype = ‘mysqli’;
public $host = ‘localhost’;
public $user
public $password
public $db
public $dbprefix

т.е. без доступа к хостингу сайт не восстановить выходит

т.е. без доступа к хостингу сайт не восстановить выходит

как вы вообще установили Joomla если у вас нет доступа к хостингу?! в частности к базе данных*?

Записан

Разработка расширений: Joomla 1.5+, Bitrix 12+, Мобильные приложения для сайтов под Android (PhoneGap).
Для бонусов: Z136221252622, R242724126443, U423945028202. +79211696184(Мегафон), или плюсик в репу!

как вы вообще установили Joomla если у вас нет доступа к хостингу?! в частности к базе данных*?

делал это человек которому за это даже заплатили. Он сделал это так роскошно что хостинг имеет один адрес, домен другой, а все папки имеют третий корень.
меня попросили подправить я подправил дизайн пока не столкнулся с проблемой ошибки добавления и установки компонентов.
У меня нету доступа потому что веб мастер имел счастье утратить это информацию, так что пока восстанавливают владельцы ресурса.

Восстановил сайт. Спасибо за помощь

« Последнее редактирование: 05.02.2013, 00:22:29 от Mr.Vudu »

Записан

03 ноября 2015. Категория: FAQ Joomla

Ошибка «Database connection error 2 could not connect to mysql» гласит о том, что происходит ошибка подключения Вашего сайта к базе данных. В этом случае есть следующее решение:

  1. Находим в корне файлов сайта конфигурационный файл configuration.php и открываем его
  2. Очень внимательно перепроверяем ниже представленные данные.

Данные базы данных сайта

public $user = '???'; //имя пользователя базы данных
public $password = '???'; //пароль пользователя базы данных
public $db = '???'; //название базы данных

Пути к log и временным файлам

public $log_path = '.../logs'; //путь к лог-файлам
public $tmp_path = '.../tmp'; //путь к временным файлам

Чтобы вместо троеточия прописать корректные пути к лог и временным файлам (у всех хостингов они разные), делаем следующее:

  1. Скачиваем файл correct.php и закидываем его в корень файлов Вашего сайта
  2. Запускаем файл через браузер: Адрес Вашего сайта/correct.php
  3. Получаем нужный путь, например: Correct path: /home/cp021982/public_html/

В результате получается:

public $log_path = '/home/cp021982/public_html/log'; //путь к лог-файлам
public $tmp_path = '/home/cp021982/public_html/tmp'; //путь к временным файлам

Скачать файл correct.php

Если у вас на сайте возникла ошибка вида — Database connection error (2): Could not connect to MySQL, то эта статья для вас…

Ошибка Database connection error (2): Could not connect to MySQL — означает, что нет(отсутствует) соединение с базой данных(БД). Это может быть не только на Джумле, но и на других движках(как минимум webasyst).

Обычно на Joomla такая ошибка не возникает из-за неправильных логинов и паролей.

Обычно — это банально — проблемы с хостером или у хостера! Даже, если у вас качественный хостинг, то даже и у него раз в году могут быть такие проблемы. То есть банально попробуйте даже войти в свою панель управления хостингом — может быть даже не сможете. То есть может какая-то хакерская атака на хостинг или еще что-то! Но у хорошего хостинга, такие проблемы исчезают уже через 10 минут(ссылка на него в правой колонке сайта — пишу, потому что только что была такая ошибка, но такое как раз таки у них бывает пару раз в год или около того).

При ошибке Database connection error (2): Could not connect to MySQL — вы, конечно, можете написать хостерам, что мол там такое, и да, скорее всего они ответят, либо что-то они там «двигали», либо какая-то проблема была и ее устранили или сейчас устраним!

Добавить комментарий

Fix: Database Connection Error (2): Could not Connect to MySql

When you render a Joomla hosted website, you might see the following message indicating either you reached the maximum SQL connections or your SQL Database has crashed or become unavailable.

Database connection error (2): Could not connect to MySQL.

Here are some things that COULD have happened to cause this error:

  • A table in your database memory leaked, choked your database, and crashed it.
  • At the point in time you rendered your web page, you went over the maximum allowed connections to your SQL database.
  • The database was somehow mapped incorrectly in configuration.php (Doubtful, if your website is older)
  • Your database was hacked by repeated attacks to it
  • SQL Server has crashed entirely

What you can do to PREVENT or FIX this error:

  • Ensure your CMS (Joomla or WordPress) is connecting to your database via localhost host name and NOT 127.0.0.1. Connecting with an IP creates unnecessary duplicate connections to your database that can cause it to crash.

  • Increase MySQL database connections in the backend in my.cnf MySQL configuration file.

  • Increase MySQL Timeout wait_timeoute in my.cnf MySQL configuration file.

  • Stay on the latest MySQL server version

  • Repair your MySQL database using the built-in repair function tool

* Please use the comment form below. Comments are moderated.*

Три частые ошибки базы данных Joomla, причины их возникновения и способы их исправления

  • Database connection error: Could not connect to MySQL
  • Database connection error: Could not connect to database
  • MySQL server has gone away

База данных является жизненно важной для работы сайта. При возникновении ошибки базы данных сайт становится недоступен. Практически все ошибки базы данных являются критическими (fatal error), то есть приводят к недоступности сайта, а вместо сайта вы видите белый экран с сообщением об ошибке.

Есть три ошибки базы данных, которые без сомнения можно назвать самые распространенные. Допускают их не только начинающие пользователи Joomla, ведь причина их возникновения не только не знания, но и не внимательность. Но давайте рассмотрим три частые ошибки базы данных Joomla

Database connection error: Could not connect to MySQL

Ошибка Database connection error: Could not connect to MySQL это сообщение об ошибке обычно означает, что в файле configuration.php вашей Joomla неправильно указано имя базы данных или имя пользователя базы данных.

Исправление ошибки

Откройте файл configuration.php в текстовом редакторе. Найдите строки указанные ниже и впишите в них правильные имя базы данных или/и имя пользователя базы данных или/и пароль доступа к базе данных.

public $user = 'Пользователь_Базы данных';
public $password = 'Пароль_Базы данных';
public $db = 'Имя_Базы данных';

Если эти действия не привели к результату, то войдите в административную панель на хостинге, войдите в MySQL, и здесь сбросьте старый пароль и задайте (сгенерируйте) пароль заново. Потом обновите файл configuration.php с новым паролем.

Database connection error: Could not connect to database

Ошибка Database connection error: Could not connection database. Это сообщение об ошибке обычно означает, что вы подключаетесь к серверу баз данных неправильно. То есть в файле configuration.php неправильно указан адрес хостинга, на котором расположен сервер MySQL.

Примечание. Обычно виртуальные сервера, на которых расположены ваши хостинги настраивают так, что сервер MySQL«лежит» на localhostвашего сервера. И если вы управляете хостингом через CPanel, PleskPanel, или ISP manager то вероятнее всего MySQL «лежит» на localhost. Но это не всегда так. Например, несколько сайтов у меня на PPA панели и адрес сервера базы данных имеет вполне конкретный IP. Так что, не думайте, что localhost это единственно правильный адрес базы данных. Возникают сомнения, обращайтесь в supportвашего хостинг провайдера.

Исправление ошибки

Откройте файл configuration.php в текстовом редакторе. Найдите строку указанные ниже и впишите в нее правильный адрес сервера базы данных MySQL.

public $host = 'Сервер_базы данных';

MySQL server has gone away или сервер «вышел погулять»

Это ошибка «Сервер MySQL ушел» обычно означает, что есть проблема с MySQL на сервере, поэтому она недоступна для использования.

Исправление ошибки

Ошибка не имеет к вашим действиям на сайте никакого отношения. Это проблемы на стороне хостинга. При получении такой ошибки сразу напишите в supportхостинга, изложите суть проблемы и прикрепите файл со скриншотом полученной ошибки.

Вот такие три частые ошибки базы данных Joomla.

©Joomla-abc.ru

Другие ошибки Joomla

Ошибки Joomla

  1. Offline

    Space

    Недавно здесь

    Регистрация:
    13.07.2012
    Сообщения:
    2
    Симпатии:
    0
    Пол:
    Мужской

    Добрый день, подскажите пожалуйста, в общих настройках joomla, случайно поменял в настройках базы данных имя Хоста, в результате чего сайт и админка упали выдавая данную ошибку. Возможно изменить это имя обратно (за прошедшую неделю добавил очень много материала на сайт, но при этом не успел сделать его бекап).
    Пробовал менять в файле configuration.php параметр public $host — не помогает, мб гдето еще он прописал новое название?
    Буду очень благодаренн за помощь.

  2. volod3000

    Offline

    volod3000

    Недавно здесь

    Регистрация:
    03.06.2009
    Сообщения:
    74
    Симпатии:
    8
    Пол:
    Мужской

    Вот настройки, может поможет (проверте) :

  3. Offline

    Space

    Недавно здесь

    Регистрация:
    13.07.2012
    Сообщения:
    2
    Симпатии:
    0
    Пол:
    Мужской

    Спасибо. Проблема решилась почти сразу — я связался с хостером, после чего все заработало.

Поделиться этой страницей


Форумы Joomla! CMS

I am getting this error on my Joomla site.

Please note:

  • I have checked configuration file and there is no error in it.
  • I get this error few times a day. Without making any change it gets connected and some time this error appears.

Can someone please help in this.

Thanks
Dani

asked Jun 4, 2015 at 16:02

user2153717's user avatar

4

This happens when the MySQL server is overloaded, and so it stops responding. If you are on a shared hosting, then you should ask to be moved to a less crowded server. If you are on a VPS (with a fair use policy) or on a dedicated server, then you should enable and check the slow query log for the slow queries causing your MySQL server to crash.

answered Jun 4, 2015 at 18:23

itoctopus's user avatar

itoctopusitoctopus

4,1134 gold badges31 silver badges44 bronze badges

Many times, errors can pop up when setting up a database on the Joomla website.

One such error is,

"Database Error: Unable to connect to the database:Could not connect to MySQL".

This can happen due to incorrect database settings or because of the wrong database username or password.

At Bobcares, we often get requests from our customers to fix Joomla cannot connect to MySQL errors as part of our Server Management Services.

Today, we’ll see the top reasons and how our Support Engineers fix Joomla MySQL connection errors.

How we fixed MySQL errors in Joomla

By default, Joomla uses a database to store all the contents. And, for the website to work properly, the database connection should be proper. Basically, Joomla has a configuration file that holds the database details of the website.

For example, the following variables decide on the database in use.

public $user = ‘Database User‘;
public $password = ‘Password‘;
public $db = ‘Database Name‘;

From our experience in managing servers, we’ve seen customers facing problems while handing the Joomla database. Usually, the error page appears as:

Now let’s see how our Support Engineers fixed the top errors.

1. Incorrect username and password

Recently, one of our customers contacted us with a MySQL problem after the site migration. He was getting an error message like:

Database Error: Unable to connect to the database:Could not connect to MySQL.

Then, our Support Engineers found that the problem was due to incorrect username and password used for the database.

So, we created a new additional username with a different password, assigned it to the database, then changed the configuration.php with the new username and password details.

That’s worked successfully and the website started showing the correct page.

Similarly, a password reset of the existing database user also helps to solve such errors.

2. Wrong file permissions

Often customers have to face errors such as Joomla cannot connect to MySQL while managing databases. Also, it can happen after a server migration or when adding a new database to an existing website.

Similarly, another customer had a MySQL problem when adding new databases to a website. He got an error like,

Database connection error (2): Could not connect to MySQL.

On checking our Support Engineers found that the permission of configuration.php file was set up incorrectly.

Therefore, we corrected the file permission to 644. By default, the file permission should be set to 644.

3. Wrong database server

Similarly, the error"Database connection error (3): Could not connect to database" can happen while trying to connect to the wrong database server.

If the Joomla and the database on the same server it uses localhost as the database server. If it is set up incorrectly in the configuration.php, Mysql errors can occur on the website.

In such cases, our Support Engineers solve the problem by checking the configuration.php file and ensure that the database host is set to “localhost”.

[Having trouble while managing a database on the Joomla server? We’ll fix it for you.] 

Conclusion

In short, the error Joomla cannot connect to MySQL can often due to incorrect database settings or because of the wrong database username or password. Today, we saw how our Support Engineers fixed Joomla Mysql errors.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Database connection error 1 the mysql adapter mysql is not available
  • Database connect error fahrenheit
  • Data width error
  • Data verification error
  • Data transfer to the printer timed out or a transfer error has occurred

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии