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.
Lost mysql database website recovery
-
- Legit Little One
- Posts: 3
- Joined: Sun Jan 10, 2016 2:53 pm
Re: Lost mysql database website recovery
I have no personal knowledge nor experience with this but i found this online
http://serverfault.com/questions/82801/ ... t-aptitude
not sure if that will help or not. Hopefully someone will hop on this morning with more knowledge than I.
http://serverfault.com/questions/82801/ ... t-aptitude
not sure if that will help or not. Hopefully someone will hop on this morning with more knowledge than I.
Remember, I am opinionated and nothing I say or do reflects on anyone or anything else but me
-
- Legit Little One
- Posts: 2
- Joined: Sun Jan 24, 2016 10:06 am
Re: Lost mysql database website recovery
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.com/questions/8791 ... -frm-files
http://www.sqlservercentral.com/Forums/ ... 893-1.aspx
Some "gotchas" other people have encountered.
Thanks.
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.com/questions/8791 ... -frm-files
http://www.sqlservercentral.com/Forums/ ... 893-1.aspx
Some "gotchas" other people have encountered.
Thanks.
-
- Legit Little One
- Posts: 3
- Joined: Sun Jan 10, 2016 2:53 pm
Re: Lost mysql database website recovery
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.
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.
-
- Legit Little One
- Posts: 2
- Joined: Sun Jan 24, 2016 10:06 am
Re: Lost mysql database website recovery
Vaguely i can say that , this is happening because of permissions/credentials for database connectivity ..
Go to shell prompt ..
# issue this command
#mysql -u root -p
Give the password that you have given to mysqlroot ..while installing you should get the msql > like this.
It means you can connect to the database. Later you can check with phpmyadmin also .
If that doesn't help, then I can offer a solution to try to use MySql Recovery Toolbox. I am sure this will increase the chances to recover the data.
http://www.oemailrecovery.com/mysql_recovery.html
Go to shell prompt ..
# issue this command
#mysql -u root -p
Give the password that you have given to mysqlroot ..while installing you should get the msql > like this.
It means you can connect to the database. Later you can check with phpmyadmin also .
If that doesn't help, then I can offer a solution to try to use MySql Recovery Toolbox. I am sure this will increase the chances to recover the data.
http://www.oemailrecovery.com/mysql_recovery.html
-
- Legit Little One
- Posts: 3
- Joined: Sun Jan 10, 2016 2:53 pm
Re: Lost mysql database website recovery
Thank you all for your advice! The issue has been resolved.