Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 83157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:43:46+00:00 2026-05-10T21:43:46+00:00

This is making me kind of crazy: I did a mysqldump of a partitioned

  • 0

This is making me kind of crazy: I did a mysqldump of a partitioned table on one server, moved the resulting SQL dump to another server, and attempted to run the insert. It fails, but I’m having difficulty figuring out why. Google and the MySQL forums and docs have not been much help.

The failing query looks like this (truncated for brevity and clarity, names changed to protect the innocent):

CREATE TABLE `my_precious_table` (  `id` bigint(20) NOT NULL AUTO_INCREMENT,  `somedata` varchar(20) NOT NULL,  `aTimeStamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',  PRIMARY KEY (`id`,`aTimeStamp`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/opt/data/data2/data_foo/' INDEX DIRECTORY='/opt/data/data2/idx_foo/'  /*!50100 PARTITION BY RANGE (year(aTimeStamp)) SUBPARTITION BY HASH ( TO_DAYS(aTimeStamp))  (PARTITION p0 VALUES LESS THAN (2007) (SUBPARTITION foo0 DATA DIRECTORY = '/opt/data/data2/data_foo' INDEX DIRECTORY = '/opt/data/data2/idx_foo' ENGINE = MyISAM),  PARTITION p1 VALUES LESS THAN (2008) (SUBPARTITION foo1 DATA DIRECTORY = '/opt/data/data2/data_foo' INDEX DIRECTORY = '/opt/data/data2/idx_foo' ENGINE = MyISAM),  PARTITION p2 VALUES LESS THAN (2009) (SUBPARTITION foo2 DATA DIRECTORY = '/opt/data/data2/data_foo' INDEX DIRECTORY = '/opt/data/data2/idx_foo' ENGINE = MyISAM),  PARTITION p3 VALUES LESS THAN MAXVALUE (SUBPARTITION foo3 DATA DIRECTORY = '/opt/data/data2/data_foo' INDEX DIRECTORY = '/opt/data/data2/idx_foo' ENGINE = MyISAM)) */; 

The error is:

ERROR 1 (HY000): Can’t create/write to file ‘/opt/data/data2/idx_foo/my_precious_table#P#p0#SP#foo0.MYI’ (Errcode: 13)

‘Can’t create/write to file’ looked like a permissions issue to me, but permissions on the targeted folders look thus:

drwxrwxrwx 2 mysql mysql 4096 Dec  1 16:24 data_foo drwxrwxrwx 2 mysql mysql 4096 Dec  1 16:25 idx_foo 

For kicks, I’ve tried chowning to root:root and myself. This did not fix the issue.

Source MySQL server is version 5.1.22-rc-log. Destination server is 5.1.29-rc-community. Both are running on recent CentOS installations.

Edit: A little more research shows that Errcode 13 is, in fact, a permissions error. But how can I get that on rwxrwxrwx?

Edit: Bill Karwin’s excellent suggestion didn’t pan out. I’m working as the root user, and have all privilege flags set.

Edit: Creating the table WITHOUT specifying data directories for the individual partitions works – but I need to put these partitions on a larger disk than the one on which this MySQL instance puts tables by default. And I can’t just specify the DATA/INDEX DIRECTORY at the table level – that’s not legit in the version of MySQL I’m using (5.1.29-rc-community).

Edit: Finally came across the answer, thanks to the MySQL mailing list and internal IT staff. See below.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:43:47+00:00Added an answer on May 10, 2026 at 9:43 pm

    It turned out to be an SElinux issue – all my filesystem permissions were fine, but there was a higher-level policy set against MySQL accessing that disk partition.

    Lesson: When you have a permissions issue but ownership and filesystem permissions are obviously correct, look to SElinux.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Er, with an option group, you should use the AfterUpdate()… May 11, 2026 at 10:13 am
  • added an answer Over NFS you face some problems with client side caching… May 11, 2026 at 10:13 am
  • added an answer The output window itself is truncating your data, most likely.… May 11, 2026 at 10:13 am

Related Questions

This is making me kind of crazy: I did a mysqldump of a partitioned
Exception Thrown: System.ComponentModel.ReflectPropertyDescriptor is not marked as Serializable Does this mean I missed marking
This is a bit of a long shot, but if anyone can figure it
This is starting to vex me. I recently decided to clear out my FTP,
This is kinda oddball, but I was poking around with the GNU assembler today
This is a difficult and open-ended question I know, but I thought I'd throw
This is my first post here and I wanted to get some input from
This is a self-explanatory question: Why does this thing bubble into my try catch's
This is an adapted version of a question from someone in my office. She's
This is a follow on question to How do I delete 1 file from

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.