Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 28th Jan 2016, 02:29 PM   #1
Warrior Member
 
edwardcarr's Avatar
 
Join Date: 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default
problem with the MYSQL database
Share on: 
fb share twitter share gplus share more share

Hello,
I work with the mysql database for a couple of months now could not open it, because there was an error: “Incorrect key file for table: '...'. Try to repair it”
Who can tell how open the database?
Thanks to all.
edwardcarr is offline  
Unread 29th Jan 2016, 03:37 AM   #2
Active Warrior
 
Join Date: 2014
Posts: 84
Thanks: 5
Thanked 11 Times in 10 Posts
Default
Re: problem with the MYSQL database
Share on: 
fb share twitter share gplus share more share

have you tried : mysqlcheck --repair --databases db_name ?
robomedia is offline  
Unread 29th Jan 2016, 05:59 AM   #3
<code warrior/>
War Room Member
 
dcmalk's Avatar
 
Join Date: 2011
Location: Sunny Florida
Posts: 25
Thanks: 22
Thanked 5 Times in 5 Posts
Default
Re: problem with the MYSQL database
Share on: 
fb share twitter share gplus share more share

When people reply saying "search google", that's rarely helpful... but in cases of specific error messages like this, googling really is the best first step. In this case, I found several posts from stackoverflow talking about this specific issue. Have you tried any of these top recommended solutions ?

Let me know if the problem continues!

Just do it, and do it better.
dcmalk is offline  
The Following User Says Thank You to dcmalk For This Useful Post:
Unread 29th Jan 2016, 12:46 PM   #4
Active Warrior
 
Join Date: 2015
Posts: 67
Thanks: 3
Thanked 14 Times in 14 Posts
Default
Re: problem with the MYSQL database
Share on: 
fb share twitter share gplus share more share

i request you. if you fall in a problem then you search google. you got its answer.
Arshalan008 is offline  
Unread 9th Feb 2016, 09:31 AM   #5
Warrior Member
 
thomasbates's Avatar
 
Join Date: 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: problem with the MYSQL database
Share on: 
fb share twitter share gplus share more share

To fix this do the following please or in case it isn’t enough for your mysql database restoration, then I would advise you to learn helpful threads dedicated to solving MySQL issues

http://community.office365.com/en-us...51/815406.aspx
https://social.msdn.microsoft.com/Fo...=sqldataaccess
https://www.repairtoolbox.com/mysqlrepair.html Repair Toolbox for MySQL – in case you can’t get back mysql database, you may apply this one solution

Force InnoDB Recovery
1. Stop mysqld and back up all files located in the /var/lib/mysql/ directory:
2. # /etc/init.d/mysqld stop
3. # mkdir /root/mysql_backup
4. # cp -r /var/lib/mysql/* /root/mysql_backup/
5. Add the option innodb_force_recovery to the [mysqld] section in /etc/my.cnf. This option will allow you to start mysqld and create a database dump.
6. #/etc/my.cnf
7. [mysqld]
8. innodb_force_recovery = 4
NOTE: You can increase the option to five or six until you receive a proper dump.
9. Start the mysqld service:
10. # /etc/init.d/mysqld start
11. Dump all databases:
12. # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` -A | sed '1i\SET FOREIGN_KEY_CHECKS = 0;' > /root/dumpall.sql
If the dump fails with an error that reads:
Incorrect information in file: './psa/APSApplicationItems.frm' when using LOCK TABLES"`
... then you need to increase innodb_force_recovery and try to dump the databases again. If you are not able to dump the databases, try using method II ("Copy table content") or III ("Restore from the backup") below.
13. Remove all files from /var/lib/mysql/ except the mysql folder:
14. # rm -rf `ls -d /var/lib/mysql/* | grep -v "/var/lib/mysql/mysql"`
15. Remove the innodb_force_recovery option from the /etc/my.cnf file and restart mysqld:
16. # /etc/init.d/mysqld restart
17. Check the /var/log/mysqld.log for any errors.
18. Restore the databases from the dump:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` < /root/dumpall.sql
thomasbates is offline  
Closed Thread


Bookmarks

Tags
database, mysql, problem


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 03:49 PM.