vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Is it possible to have 'folders' within a mysql database that holds separate tables. I want to be able to have several sites from subdomains to access a single database but each site will need to access tables of the same name. Is the only way to do this to have a different database for each, as that would start to get expensive. Thanks |
| |||
| chris_huh wrote: > Is it possible to have 'folders' within a mysql database that holds > separate tables. I want to be able to have several sites from > subdomains to access a single database but each site will need to > access tables of the same name. > Is the only way to do this to have a different database for each, as > that would start to get expensive. > > Thanks > Chris, No, sorry, MySQL doesn't support different schemas (as some other databases do). You need to have unique tables in your database. How about prefacing each table with some type of info, i.e. a subdomain name, then concatenating the subdomain name to your table name before you make the request? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
| |||
| "chris_huh" <chris.huh@gmail.com> wrote: > Is it possible to have 'folders' within a mysql database that holds > separate tables. I want to be able to have several sites from > subdomains to access a single database but each site will need to > access tables of the same name. MySQL uses the term "database" (nowadays "schema") in an unusual way. But in fact MySQLs databases are exactly what you're looking for. > Is the only way to do this to have a different database for each, as > that would start to get expensive. Why? XL -- Axel Schwenke, Senior Software Developer, MySQL AB Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/ MySQL User Forums: http://forums.mysql.com/ |
| ||||
| On Wed, 15 Nov 2006 21:00:59 +0100, Axel Schwenke wrote: > "chris_huh" <chris.huh@gmail.com> wrote: > >> Is it possible to have 'folders' within a mysql database that holds >> separate tables. I want to be able to have several sites from >> subdomains to access a single database but each site will need to >> access tables of the same name. > > MySQL uses the term "database" (nowadays "schema") in an unusual way. > But in fact MySQLs databases are exactly what you're looking for. > >> Is the only way to do this to have a different database for each, as >> that would start to get expensive. > > Why? Was wondering the same thing... IIRC, some RDBSs can only serve one database instance per running server group, but MySQL isn't one of them. -- People who are willing to rely on the government to keep them safe are pretty much standing on Darwin's mat, pounding on the door, screaming, 'Take me, take me!' -- Carl Jacobs in the Monastery |