Databases :: MySql :: put database in new file \ linux |
|||
| By: toTo |
Date: 13/06/2003 00:00:00 |
Points: 300 | Status: Answered Quality : Excellent |
|
how can i know in wich actual file mysql stores the databases, and choose to put them in separated files to prevent a user to hog all the space. thanks |
|||
| By: monange | Date: 13/06/2003 23:47:00 | Type : Comment |
|
| every database corresponds to a folder in the mysql data folder. By default, that folder is in %mysqlhome%/data: for example /usr/local/mysql/data the database name corresponds to the subfolder of the above folder, and all the files in there should be considered to be part of the database. CHeers |
|||
| By: VGR | Date: 14/06/2003 00:12:00 | Type : Comment |
|
| to complement : your data is in %datadir/databasename/tablename.extension where extension is {FRM, MYI, MYD} |
|||
| By: toTo | Date: 14/06/2003 00:41:00 | Type : Comment |
|
| Thank you, and if i have a special user that want too much room, how can i choose where to put his data while i leave the rest in the default directory ? |
|||
| By: VGR | Date: 14/06/2003 00:47:00 | Type : Comment |
|
| huh, tough (albeit good) question |
|||
| By: VGR | Date: 14/06/2003 00:50:00 | Type : Comment |
|
| I'm afraid there is only one datadir... |
|||
| By: VGR | Date: 14/06/2003 00:51:00 | Type : Answer |
|
| only possibility : run a second instance of mysqld server and use the --datadir=path option to safe_mysqld. |
|||
| By: toTo | Date: 14/06/2003 01:03:00 | Type : Comment |
|
| but i have to tell the user to use another port. |
|||
| By: VGR | Date: 14/06/2003 01:25:00 | Type : Comment |
|
| hummmm yes |
|||
| By: psadac | Date: 14/06/2003 01:26:00 | Type : Comment |
|
| as monange told you every database corresponds to a folder in the mysql data folder. so you have two options : - buy another disk and mount it on /datadir/database directory. database size will be limited to disk size. - use quotas to limit disk usage. i think running another instance of mysql is not a good solution. i will use more memory and you will have 2 configuration files, backup jobs, accounts .... to manage these options apply only to linux/unix os. if you run mysql on window$, ... switch to linux ;-) |
|||
| By: VGR | Date: 14/06/2003 01:43:00 | Type : Comment |
|
| the problem with the solution which "is not a good solution" is that it's the only one answering the question (two different datadirs on same machine) :D |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








