Results 1 to 5 of 5

Thread: Clear my misunderstanding: 1 MySQL database for many programs?

  1. #1
    Registered
    Join Date
    Sep 2003
    Posts
    110

    Question Clear my misunderstanding: 1 MySQL database for many programs?

    Hello there,

    I been using CPanel for more than two years and I need to know something about MySQL.
    I frequently use PHP and MySQL to install softwares for websites. My webhost offered 10 MySQL databases for my use.

    So far, I have used up all 10 databases to install 10 programs (Wordpress, Invision Board, gallery scripts, and etc.).

    I recently found out that I can install two programs using only 1 database! I can use the same database name and password and only alter the table name.



    My question to you: Can I use only 1 MySQL database to install 3 different programs under one domain?
    i.e. websitepublisher.com, websitepublisher.com/forums/ (vBulletin), websitepublisher.com/blog/ (Wordpress), and websitepublisher.com/books/ (some script) with 1 MySQL database


    Thank you in advance.

  2. #2
    Senior Member AndyH's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    553
    Yes - I don't know if you just wanted the answer or more information?
    New website released. ya rly!

  3. #3
    Registered
    Join Date
    Jul 2005
    Posts
    43
    As long as the scripts have different table names

    Let's say you have 2 scripts which use 2 databases with db1,userdb1,passdb1 and db2,userdb2 and passdb2. If you like to make both scripts use db1 then you have to export the tables of db2 (from phpmyadmin) and import them into db1(via sql window of phpmyadmin),after this you would have to find the configuration file of the second script and change the db connection data from db2,userdb2,passdb2 to db1,userdb1,passdb1.
    That's all.

  4. #4
    Working. Masetek's Avatar
    Join Date
    Aug 2005
    Location
    Aust
    Posts
    543
    Yeah u can. Just make sure the table names are different. Which they should be, because most progs have a table prefix. like wp_ for wordpress.

  5. #5
    Registered
    Join Date
    Sep 2003
    Posts
    110
    I appreciate the response guys.
    Very informative and I understand it now.

Similar Threads

  1. More NEW *Niche* 5 Star Affiliate Programs - SEOs wanted
    By 5starAffiliates in forum The Marketplace
    Replies: 0
    Last Post: 01-20-2005, 12:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •