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.

#1
Posted 17 January 2016 - 02:13 PM

#2
Posted 19 January 2016 - 12:11 PM

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!
#3
Posted 27 January 2016 - 11:14 AM

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.
#4
Posted 27 January 2016 - 11:34 AM

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.
Similar Topics
Also tagged with one or more of these keywords: mysql
![]() |
php
Development →
Web Development →
Need help trying to convert php project to php Api DocumentationStarted by bob4838 , 05 Nov 2018 ![]() |
|
![]()
|
|
![]() |
Development →
Web Development →
who can help me in detecting error on my php codeStarted by horllasskid , 02 Apr 2018 ![]() |
|
![]()
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
As Featured On:






