Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: nadeem34 on November 03, 2018, 01:56:35 PM

Title: SMF was unable to connect to the database
Post by: nadeem34 on November 03, 2018, 01:56:35 PM
Hello everyone and admin please help me.

I backed up my website and after that i uninstall my smf script from cpanel due to some mods problem. Now I imported my old backup through phpmyadmin and then install the smf script again. I also changed the database name and user from settings.php but still website shows the error
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

Please help me how can i connect with old database.
Title: Re: SMF was unable to connect to the database
Post by: Kindred on November 03, 2018, 02:10:48 PM
Well, from the error message, it would appear that you did not put in the correct connection information to point to your database....


Also, Please do not start multiple topics of the exact same message....
Title: Re: SMF was unable to connect to the database
Post by: Sir Osis of Liver on November 03, 2018, 05:30:51 PM
Did you import the backup into the same database?
Title: Re: SMF was unable to connect to the database
Post by: nadeem34 on November 04, 2018, 12:29:06 AM
Quote from: Sir Osis of Liver on November 03, 2018, 05:30:51 PM
Did you import the backup into the same database?

First i created the database from MySQL® Databases ===> Create new database and then imported my database file into that database. One thing another why it is showing 0mb size(Please see attached image) in database section although I uploaded the database.

Please tell me how can i put correct database information
Title: Re: SMF was unable to connect to the database
Post by: Sir Osis of Liver on November 04, 2018, 10:01:34 PM
If server is reporting empty database, import failed.  How large is the database?  Did you import it with phpmyadmin?
Title: Re: SMF was unable to connect to the database
Post by: nadeem34 on November 05, 2018, 04:20:28 AM
Quote from: Sir Osis of Liver on November 04, 2018, 10:01:34 PM
If server is reporting empty database, import failed.  How large is the database?  Did you import it with phpmyadmin?

The backup size is 73MB and i think it is not large that much. Yes i imported with phpmyadmin and i received the message your backup has been successfully imported.
Title: Re: SMF was unable to connect to the database
Post by: Sir Osis of Liver on November 05, 2018, 11:53:08 AM
Reading your other topic, looks like import was not completed successfully.  Phpmyadmin will have problems importing a 73 mb database on some hosts, most often chokes on _messages table, never gets to _settings.  Does your host control panel have a restore utility?