Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Posts
    78

    Is it possible to store MySQL db's in each members dir instead of /var/lib/mysql/ ?

    Hi,

    Is it possible to store MySQL db's in each members dir instead of /var/lib/mysql/ on a linux machine with ext3fs filesystem (which doesn't allowe more then 32,576 folders, hence databases in one directory)?

    Thanks.
    A
    Try out Virtual Server Agent free. It could solve all your server downtime worries.

  2. #2
    Join Date
    Nov 2005
    Posts
    352
    Short answer... Probably not.

    Long answer...

    1) The mysql database files must be under one main data directory. The only way to get around that might be to create symlinks from the data directory to each of the user's mysql directories, however you have to worry about managing permissions (database files must be owned by the mysql user) and keeping users from trying to delete files that they should not be deleting. This can get very ugly very quickly (assuming that it would even work at all).

    2) How is it that you are running into filesystem limits? Most normal setups will run out of system resources (i.e., disk space, memory, cpu usage, etc.) well in advance of accumulating 32K databases.

  3. #3
    I've seen a database with over a million tables in it and it was on an ext3 partition.

    Personally I would rather use xfs or jfs for something like that.
    Linux/BSD Systems Administrator

  4. #4
    Join Date
    Nov 2005
    Posts
    352
    I've seen a directory with well over a hundred thousand files in it. However, databases are stored in directories (tables are files in each directory), and there is a difference in how ext3 handles files vs. directories. According to the linux ext2 docs, there can be a max of 32768 subdirectories in a single directory, but there could be millions of files (or more, I haven't found docs on an absolute upper limit yet) in a single directory.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •