Please help me and i give 10 usd who want to help me.

Discussion in 'PHP' started by botakilmu, Aug 9, 2011.

  1. #1
    Hi all, i just have one problem here, how to manage multiple website using one database, i mean using same database. Please tell me from starting because i'm blind in database. Please pm me.
     
    botakilmu, Aug 9, 2011 IP
    Youmax likes this.
  2. Youmax

    Youmax Active Member

    Messages:
    122
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Google that..or acquire some experts to do the job!
     
    Youmax, Aug 9, 2011 IP
  3. botakilmu

    botakilmu Member

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #3
    I was google it, but im pointless. That's why i want someone to help me.
     
    botakilmu, Aug 9, 2011 IP
  4. rubeina

    rubeina Invisible Staff Affiliate Manager

    Messages:
    2,274
    Likes Received:
    428
    Best Answers:
    0
    Trophy Points:
    295
    #4
    Same way you attached your database with your first website, just create new users for the database and use with the other sites.
    I usually do that for demo Joomla installations. Hope that helps.
     
    rubeina, Aug 9, 2011 IP
  5. HungryMinds

    HungryMinds Active Member

    Messages:
    216
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    63
    #5
    Hi,
    It's only possible from "Remote Database Connection"
    You can find it on you control panel "Remote MySql"
    In every of yours website, you will have to use Remote Database Address using Main Database Hosting IP.
    If you have your personal hosting server then you can manage it easily, If not. Then it will difficult.
    Because most of the hosting services not allow Remote Database Connection.
    If all your websites hosted in same hosting server, Then it's possible.
    For more help, google: "Remote MySQL Database Connection" or "Remote Database Connection"
    :)

    Check these links:
    http://www.ferdychristant.com/blog//archive/DOMM-6GRGQ7
    http://developer.mindtouch.com/en/kb/Enabling_remote_access_to_MySQL_database
    http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
    http://dev.mysql.com/doc/refman/5.0/en/adding-users.html
     
    Last edited: Aug 9, 2011
    HungryMinds, Aug 9, 2011 IP
  6. botakilmu

    botakilmu Member

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #6
    I was doing like you said, but all of my website going like my 1st website. All templates, username follow the 1st website. I dont want like this, I just want to share database, not template and username.
     
    botakilmu, Aug 9, 2011 IP
  7. botakilmu

    botakilmu Member

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #7
    I was add domain to host,, but nothing happen. If i not mistake, remote sql for external web servers right? My website located at same host.
     
    botakilmu, Aug 9, 2011 IP
  8. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #8
    use same db infor for each website in config.php

    Regards

    Alex
     
    kmap, Aug 9, 2011 IP
  9. botakilmu

    botakilmu Member

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #9
    I was doing what like you said, but all my website follow the 1st site. All templates, username and etc come from 1st site. I just want content like post, thumbnail from 1st site.
     
    botakilmu, Aug 9, 2011 IP
  10. botakilmu

    botakilmu Member

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #10
    I want to share just one table from my database. Example, mysite have a 20 database tables, so i want all of my sites to share only table_1 database for all website. It is possible?
     
    botakilmu, Aug 9, 2011 IP
  11. elixiusx

    elixiusx Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #11
    Use table prefix... in systems like wordpress, joomla, drupal you can define a prefix for your tables so you can have something like:

    tables:
    site1_news
    site1_users
    site2_news
    site2_users
    site3_news
    site3_users
    sharedtable
     
    elixiusx, Aug 10, 2011 IP
  12. elixiusx

    elixiusx Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #12
    You can do the same if you have customs sites, also if you have many databases (one per site) and the sharedtable into another database. You can do something like

    SELECT * FROM databasename.sharedtable

    So you can use something like this in your querys...

    Excuse my english i hope you understand...
     
    elixiusx, Aug 10, 2011 IP
  13. TsubasaOzora

    TsubasaOzora Well-Known Member

    Messages:
    95
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    113
    #13
    i vote for this solution..

    i believe your site is using wordpress ? if yes.. this is the solution..
    and when u install the table to database.. please make sure the table prefix ..
    default for wordpres is wp_
     
    TsubasaOzora, Aug 10, 2011 IP
  14. botakilmu

    botakilmu Member

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #14
    My site using custom code base on wordpress file.
     
    botakilmu, Aug 10, 2011 IP
  15. ausrixy

    ausrixy Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #15
    just connect to the database like you did in your first site with all of them, use the same lines of coding.
     
    ausrixy, Aug 10, 2011 IP
  16. elixiusx

    elixiusx Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #16
    Done ... he sent me even more money than promised, I am so happy :)...
     
    elixiusx, Aug 12, 2011 IP