Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Apps from One Database?

Status
Not open for further replies.

lalato

Technical User
Aug 9, 2001
44
US
Howdy folks...
I'm a total newbie when it comes to using mySQL.

I want to know if it's possible to run two completely separate from a single mySQL database... if so, how would I go about doing that?

Thanks for any help you can give me...
--sam
 
MySQL is just a database. It just responds to SQL. It doesn't distinguish the contexts of such requests. As long as the user is authorised to use the database objects then as many systems can be running on the same database as you like.

 
Oops... typo there... Two completely separate apps. For example... I use pmachine as a content managaement system on my personal website. It uses mySQL.

I would also like to run another app that requires mySQL from my personal site, 3eprofiler (It's a character sheet app for roleplaying games). However, my host only allows one mySQL dbase per account.

I was thinking that I could just create new tables on my existing mySQL database and as long as I use a fairly strict naming convention to separate the two apps, I wouldn't run into any problems with running more than one app from the same database.

Thoughts?
 
Just thought I would post what I found out.

It is indeed possible to run multiple apps from the same mySQL database. You just have to be careful with the naming convention that you use for each apps tables.

For example, app1 is called pmachine so all the tables associated with that app are named something like... pm_table1.

App2 is called 3eProfiler so all the tables associated with that app are named something like... 3ep_table1.

Meaning that I will add a prefix to each table name to denote which app it belongs to. Woohoo!!! I don't have to switch hosts. Yay me! :)

--sam
 
That naming convention is just a suggestion. As I said earlier, there is no such thing as an application as far as MySQL is concerned. That's a construct of your imagination. MySQL only recognises SQL and users. What they're up to is a philosophical not technical issue.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top