Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Lost mysql database website recovery

mysql

  • Please log in to reply

#1
jaime.bentez

jaime.bentez

    New Member

  • Member
  • Pip
  • 2 posts

My web server was lost and I am now attempting to get our company website back up and running using the backups we do have.  What I do have is all of the files that made up the site but what I do not have a backup of is the mysql config for the site.

Looking through some of the php files I can the database name and the user the pages are calling.  What I am unable to find is a database file I could import or any documentation in the source files (that include the original files from the webdevelopers.)

How might I go about finding this information can anyone tell me where to look and secondly how I might go about finding what tables I need to make etc.


  • 0

Advertisements


#2
MattFS

MattFS

    Member

  • Member
  • PipPipPip
  • 168 posts

MySQL databases aren't stored in the public web directory (where all your site files would be), so unless you have a backup of the var directory of the server (assuming it's a Linux webserver), the data is lost.

 

What software were you using on your site? Wordpress (or a similar content management system)? If so, you should have the template files for your website still, so you'd still have the structure/layout/design of your website, but all of the content (text etc.) would be gone (other than media like images, I'm not sure if Wordpress stores media files in the database or in a folder inside the public web directory).

 

Make sure in the future to have regular backups of your databases as well as the file backups!


  • 1

#3
KristofLakatos

KristofLakatos

    New Member

  • Member
  • Pip
  • 2 posts

In your old server ..look for the datadir . which is genrally on ubuntu in mycase  will be in /var/ ... partition .

You will have all the files there of the databases .

Since you are starting up a new server , my.cnf file should not be a problem since you already have backups ....  Just create the databases and redirect from backups .

The my.cnf should be in /etc/mysql/my.cnf path ...

This options file contains all the directives for the  data dir location .

See also http://stackoverflow...d-myi-frm-files

http://www.sqlserver...584-2893-1.aspx

Some "gotchas" other people have encountered.
Thanks.


  • 1

#4
jaime.bentez

jaime.bentez

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts

Thanks for your response.  My old server was IIS and I am unable to get to it all I have are the website files from backup.

My new environment is Ubuntu lamp install.  I have the server issuing the page but I get this error when I open the page:

I cannot connect to the database because: Access denied for user 'x'@'localhost' (using password: YES)

At this point I have been scouring all of the .php files and am finding two databases being called including the names and passwords two accounts.  From what I can gather one set of creds is for the admin page (backdoor) and the other for the site to call mysql.  

I do have the original files from the web developers and would think there would be a sample table I could import or the documentation for what tables to set up but I really don't see anything.


  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP