Mysql Database requirement

kylec

Joined: 2003-02-08
Posts: 16
Posted: Sat, 2003-02-08 00:46

Will G2 take more than 1 mysql? :???:
With my current host i am only allowed 1 database.
I was also considering running phpbb so i guess i will have to choose between G2 and phpbb right?

or get a different host :cry:

thanks
Kylec :grin:

 
zamba
zamba's picture

Joined: 2002-08-19
Posts: 59
Posted: Sat, 2003-02-08 03:04

No, you just have to use a prefix before your tables, eg "gallery_". This enables you to have different programs running using the same database :smile:. Many programs provide this option in set-up, and this gets over the problem of the same name being used for a table in different functions.

Regards,

Tony

 
vampy

Joined: 2002-12-05
Posts: 86
Posted: Sat, 2003-02-08 04:48

Hi! Sorry to butt in like this. But are you saying that say I can use the same database (eg. program) and have different scripts using the same database just by changing the prefix of tables. Say I want to run a php script that requires the use of a database and I also want to run gallery in the same database. So all I have to do is to name the first table for the first php script (eg. first_table) and gallery as (eg. gallery_table). Thank you for your enlightenment.

 
zamba
zamba's picture

Joined: 2002-08-19
Posts: 59
Posted: Sat, 2003-02-08 12:48

Yep, that's exactly it. Of course, there's a consequent increased demand on the number of connections people can make etc., but in practice I've found relatively few problems with this. The situation could be different if you're running several very popular programs, though.

For example, on one of my sites I am using PHP/MySQL with a classified ads program, two InVison boards, and a user management program (AMember). On another, I have Gallery, Invision and e-classifieds. (But doesn't Gallery use its own database? I have no record of it using tables in my MySQL database on site. Can someone clear this up for me?)

Ideally, a separate database for each is a better solution, but being limited to one database is quite a common occurrence on ISPs, which is why so many programs make provision for prefixs.

HTH,

Tony

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sat, 2003-02-08 20:05

Think of it as a filing cabinet. The whole MySQL database is the whole file cabinet. Databases are the drawers. Tables are the folders in the drawers and data is inside the folders. If you wanted to, you could put more than one type of data in a drawer (multiple folders), as long as the folders were appropriately labeled.

Corny, but maybe enlightening :smile:

 
zamba
zamba's picture

Joined: 2002-08-19
Posts: 59
Posted: Sun, 2003-02-09 03:35

Sorry, everyone, I seem to have suffered a brain-dump here, of course Gallery 1 doesn't use MySQL but a flat file system, so strike the query in my last post! My comments on database tables usage only refer to Gallery 2.

Tony

 
vampy

Joined: 2002-12-05
Posts: 86
Posted: Tue, 2003-02-11 06:47

Thank you all for all your replies and enlightenment! :grin: