Mysqldump Error 1017
Contents |
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you error 1017 (hy000) can't find file (errno 2) might have Meta Discuss the workings and policies of this site
Mysqldump Got Error 1017 Can T Find File When Using Lock Tables
About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting mysql can't find file errno 2 ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who
Mysql Error Can T Find File Errno 2
wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top mysqldump: Got error: 1017: Can't find file: 'drupal_install_test' (errno: 2) when mysql error 1017 errno 2 using LOCK TABLES up vote 2 down vote favorite I'm trying to backup a drupal site database but I'm having some issues. When I ran the following command: mysqldump -uroot -p drupaSite > drupaSite.sql I get the following error: mysqldump: Got error: 1017: Can't find file: 'drupal_install_test' (errno: 2) when using LOCK TABLES if I tried to query the table I get the same error: mysql> select * from drupal_install_test; ERROR 1017 (HY000): Can't find file: 'drupal_install_test' (errno: 2) I check the status of the table in the database: show table status from drupaSite; I get the following output: | drupal_install_test | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Can't find file: 'drupal_install_test' (errno: 2) | I ran the following query: SELECT * FROM information_schema.tables WHERE table_name='drupal_install_test'\G I get the following output: *************************** 1. row *************************** TABLE_CATALOG: NULL TABLE
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: Backup :: mysqldump: error while using LOCK TABLES New Topic Advanced Search
#1017 - Can't Find File (errno 2)
mysqldump: error while using LOCK TABLES Posted by: Malko Bravi ()
Mysqldump Got Error 1017 Can't Find File (errno 2) When Using Lock Tables
Date: March 20, 2009 03:51AM When I try to use mysqldump to backup certain databases I mysqldump got error 1017 when using lock tables get the error: mysqldump: Got error: 1017: Can't find file: '
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://stackoverflow.com/questions/12106727/mysql-copying-tables-files-gives-rise-to-error-1017-hy000-cant-find-file workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions http://dedicatedserverdoc.com/mysqldump-got-error-1017-cant-find-file-errno-24-when-using-lock-tables/ Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. error 1017 Join them; it only takes a minute: Sign up MySQL, copying tables files gives rise to “ERROR 1017 (HY000): Can't find file:” even though its there there up vote 10 down vote favorite 6 I want to copy the database tables from my production server to a local test machine so I can perform test om (copies of) the t find file real data. I stopped mysql and deleted all the frm, MYD and MYI files. Starting mysql here and querying show tables gives an empty result set. I then shut down mysql and copied all the frm, MYD and MYI files from the server. When starting mysql "show tables" shows the tables as expected but trying to query them I get the error message ERROR 1017 (HY000): Can't find file: './WhateverTableIQuery.frm' (errno: 13) But the WhateverTableIQuery.frm file is on the disc and is identical to the one on the server. Any ideas about what might be the problem? mysql share|improve this question edited Apr 12 '14 at 13:46 Benjamin 11.4k1693172 asked Aug 24 '12 at 9:33 user1622094 83115 I didn't dump and import because I wanted to save time. Some of the tables are big and building the indices takes forever. –user1622094 Aug 24 '12 at 12:03 add a comment| 6 Answers 6 active oldest votes up vote 25 down vote accepted I'd suggest giving two things a try: 1. Check Permissions Ma
site from one WHM/CPanel server to another WHM/CPanel server and found that this error was causing some problems. This was particularly interesting as I remember trying to move a CPanel account in the past (using /scripts/pkgacct) and we found that everything was fine except that none of the database tables had been backed up. On that occassion we were able to just recreate the empty tables as there wasn't a whole lot of data but we never did get to the root cause of the problem. This recent move was similar. It was actually a site that hosts around 2100 blogs with the WordPress WPMU version. Given that there were a lot of blogs with a lot of data, failure wasn't an option so I decided to do a manual dump of the database. That's when I saw the error from mysqldump. A quick Google of the error message turned up a similar issue and it wasn't until after I read carefully that I found this person had the solution. It was in a bug report though and not all that descriptive so I thought it was worth blogging. The cause of the problem is the default limit that MySQL has on open files. If you fire up your favourite SSH client and login to your server and issue the command: mysqladmin variables …it's going to tell you this: open_files_limit | 1024 So, we now know that MySQL has a default limit of 1024 open files. That's a lot of files…in most cases… but consider my situation where I have over 2000 blogs and each blog has multiple files. Even with 1 file per blog we'd be over that limit. Note that this issue should only happen with MyISAM databases as they use separate files for each table. Knowing that this open files limit was the issue my next step was to find out exactly how many files were in the database directory. To do that you can issue a command like: ls /var/lib/mysql/my_database/ | wc -l The /var/lib/mysql part is the default directory for MySQL MyISAM files and the my_database part would be the directory that is named the same as the database you are trying to back up. The command line above will list (ls) the files in the directory and the pipe to ‘wc -l' will count how many words are displayed in the resulting ‘ls' listing. In my case the number was: 60061 That's a heck of a lot of files! The fix was to edit /etc/my.cnf and add the following line to the [mysqld] section: open-files-limit=100000 I then restarted the MySQL server and it completed the backup of the database and all of its tables. You must be logged in to post a comment. Categories Dedicated Servers (7) General (11) Hosti