One Database

Discussion in 'MySQL' started by DP Most, May 29, 2007.

  1. #1
    I have one Mysql database and I have just upload wordpress for sub domain. Now they need to make tables to db. Is that possible in one DB?. One is am using for directory.
    Please if yes how?
    Thanks!
     
    DP Most, May 29, 2007 IP
  2. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #2
    yes, do you have ssh access?
    if yes, you can use mysql -u username -pPASS database < old_db.sql
     
    gibex, May 29, 2007 IP
  3. Boulder

    Boulder Well-Known Member

    Messages:
    806
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    118
    #3
    Yes it is certainly possible to use the same database for two entirely separate programs. Just make sure the database table prefix is not the same on each program.

    like if you were going to install two wordpress programs on one database, just make sure that on one a different prefix is added to the query before it is run as an install. On most programs this can be done when the installer is ran.. it will ask you to fill in your database credentials and you could use something like wp1_config or even wp_one_config would work. So you could make it wp_one_ as the table prefix.

    On some types of installs this is done manually in the config file right before the script is run to create the tables in the DB...

    Boulder
     
    Boulder, May 29, 2007 IP
  4. DP Most

    DP Most Well-Known Member

    Messages:
    478
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #4
    ok let me check if possible for me. will catch u later
    Thanks!
     
    DP Most, May 30, 2007 IP
  5. Boulder

    Boulder Well-Known Member

    Messages:
    806
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    118
    #5
    Sure, no problem. It looks like you say, already using the database for a directory. Is that a correct assumption on my part?

    Well in that case. If the one database is being used for a directory and the new install is going to be a WordPress application. Than, you may not need to change the wp_ prefix at all.

    Most likely your directory has added its own table prefix to the database tables for the directory. Something like phpld_

    So for WordPress.. you should be fine with the default wp_ prefix.

    Just look at existing database tables to know for sure what is being used.

    Have fun!
    Boulder
     
    Boulder, May 30, 2007 IP
  6. marcur12

    marcur12 Guest

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It's possible. The only downfall is, if you start to get too many tables in one database, it may slow down the results.
     
    marcur12, May 30, 2007 IP
  7. DP Most

    DP Most Well-Known Member

    Messages:
    478
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #7
    What do you mean by "slow down the results"
    are you sure about it. what is the relation with database tables and slow down the results?
     
    DP Most, Jun 1, 2007 IP
  8. chimpymike

    chimpymike Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You can definitely have tables from two different applications in the same database, you just have to make sure that none of the applications use tables with the exact same name.

    You should be fine with the default wordpress table name prefix of wp_ -- as long as you have only one install of wordpress in this database. If you install wordpress a second time for another blog in the same database, you will need to change the table name prefix to something else like wp2_ for the second install.
     
    chimpymike, Jun 2, 2007 IP