Multiple php scripts 1 mysql database

5 replies
All,

Should each php script have its own mysql database or all scripts share a database?

I've currently a helpdesk php script + 1 MySQL DB

I'm looking at other php scripts, to provide other facilities and functions for my site. Yet with my host. I've only mysql db.


Thanks
#database #multiple #mysql #php #script #scripts
  • Profile picture of the author m4rx
    If you have a limited number of databases, just use one, and have each table prefixed with a unique name.

    --m4rx
    Signature
    We are what we repeatedly do. Excellence, then, is not an act, but a HABIT. ~Aristotle
    Bored. Learn everything you need to know about Organic Gardening.
    {{ DiscussionBoard.errors[1931411].message }}
  • Profile picture of the author Shounak Gupte
    one db is more than enough.. just use separate table for each functionality
    Signature
    Looking for a quality but affordable graphic designer to partner with. To express your interest PM me with some samples.
    {{ DiscussionBoard.errors[1932289].message }}
  • Profile picture of the author phptechie
    If you have all the scripts in the same website , then prefer to have single database.

    Whereas if you have different scripts running on same server (not same site) , then use individual database for each script.

    Hope this helps.
    {{ DiscussionBoard.errors[1933142].message }}
  • Profile picture of the author aa411853
    I would put one app per db. Much cleaner. Plus if someone hacks your site now, they could have access to all of your data, vs that of just one app.
    {{ DiscussionBoard.errors[1935551].message }}
  • Profile picture of the author andrewwilkie
    Thanks All! Much appreciated. aa411853. That is where I was headed.

    A
    {{ DiscussionBoard.errors[1948539].message }}

Trending Topics