Jump to content

Not Connecting To Db


tj0001

Recommended Posts

Hello,

 

My DB is not working - I deleted the old DB and User and created a new DB and User.

 

I've added the User to the DB and.......updated the WP-Config file with the new data/password

 

But........ when I try to run "phpMyAdmin" it hangs and won't enter the application.

 

 

I would appreciate your help very much.

 

Thank you.

 

Tj0001

 



Hello,

 

I seem to have lost my site as it's asking me to load Wordpress software when I type my site's URL.

 

All my sites WP files are there as before. Any idea how I can get my site back please?

 

 

Thank you.

Link to comment
Share on other sites

Since you have a backup: Drop the database, create it again, reassign the user to it, then open the new database in PhpMyAdmin and import the backup.

 

I'm assuming your "full backup" is the one cPanel makes. If you unzip the full backup, the databases are in a folder called mysql. Just import the .sql for the database being restored.

Link to comment
Share on other sites

Thanks for your reply.

 

Yes, I did exactly as you say. I unzipped the FB but the the database is only 1KB - is this not too short?

 

The following is the response I got after I did a restore:

 

Restoring Database

Determined database name from sqlRestoring database “tj0001_wp896”--------------/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */----------------------------/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */----------------------------/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */----------------------------/*!40101 SET NAMES utf8 */----------------------------/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */----------------------------/*!40103 SET TIME_ZONE='+00:00' */----------------------------/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */----------------------------/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */----------------------------/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */----------------------------/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */----------------------------/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */----------------------------/*!40101 SET SQL_MODE=@OLD_SQL_MODE */----------------------------/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */----------------------------/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */----------------------------/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */----------------------------/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */----------------------------/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */----------------------------/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */--------------

Sorry, I don't follow why I have to re-create the database if I've just restored it?

 

And please can you elaborate what exactly you mean by "reassign the user to db" - Do you mean "delete/re-add User To Database" or "re-entering the user password details" in the wp-config?



Edit: After importing the database in phpMYAdmin it's now asking me to install the WP-Software and it's not picking up my existing site.

Link to comment
Share on other sites

We mean adding the user back to the database.

 

As for the backup not restoring, you cannot reuse the same database (or database name). Create a new database with a different name, then open it in phpmyadmin and restore the backup using phpmyadmin's import tab. After that assign the user to the database, and edit WP-Config to use the new database name.

Link to comment
Share on other sites

I've gone through the procedure you mentioned, but it is still asking for a fresh wp-install.

 

As I said in my previous post, this database backup seems empty - please note the message I got after importing the backup:

 

 

-- MySQL dump 10.13 Distrib 5.6.21, for Linux (x86_64)
--
-- Host: localhost Database: tj0001_wp896
-- ------------------------------------------------------
-- Server version 5.6.21

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;# MySQL returned an empty result set (i.e. zero rows).

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;# MySQL returned an empty result set (i.e. zero rows).

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;# MySQL returned an empty result set (i.e. zero rows).

/*!40101 SET NAMES utf8 */;# MySQL returned an empty result set (i.e. zero rows).

/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;# MySQL returned an empty result set (i.e. zero rows).

/*!40103 SET TIME_ZONE='+00:00' */;# MySQL returned an empty result set (i.e. zero rows).

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;# MySQL returned an empty result set (i.e. zero rows).

/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=[...]

Link to comment
Share on other sites

i have the same problem, i dont know why, but the info in my DB was deleted.

 

SQL: mysqldump: Got error: 1146: Table 'efferod_wp530.wp5a_automatic_amazon_links' doesn't exist when using LOCK TABLES
-- MySQL dump 10.13 Distrib 5.6.21, for Linux (x86_64)
--
-- Host: localhost Database: efferod_wp530
-- ------------------------------------------------------
-- Server version 5.6.21

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

 

 

So i check my DB and is empty, can you help me please!

Link to comment
Share on other sites

@tj0001: Those SET messages are normal. They just set some database-wide attributes. Did you edit the wp-config.php to point to the new database?

 

@efferod: Error 1146 is caused by reusing the same database name. Did you follow my procedure posted above? You must use a new database with a different name.

Link to comment
Share on other sites

FYI - a similar thing happened a while back - in that instance one of the support guys recovered the site for me. So I'm just wondering if "helionet" has a proper backup of the DB as it must have had then, to have been able to restore the site then?

 

Thankfully though, this is only a small site so I better start rebuilding it now :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...