Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Posts
    2

    Unanswered: Sharing tables between MYSQL databases

    Hi I am pretty new to mysql and was wondering whether anyone here knows away to share tables between 2-6 different MYSQL databases.

    Some suggestions I have been given - but not quite sure how to implement - is to update the table in the different databases using a cron job. - if anyone would like to let me know how to do that that would be good.

    Any suggestiosn would be great.
    Thanks a lot

  2. #2
    Join Date
    Jan 2003
    Location
    Vietnam
    Posts
    188

    Re: Sharing tables between MYSQL databases

    Originally posted by tudorbob
    Hi I am pretty new to mysql and was wondering whether anyone here knows away to share tables between 2-6 different MYSQL databases.

    Some suggestions I have been given - but not quite sure how to implement - is to update the table in the different databases using a cron job. - if anyone would like to let me know how to do that that would be good.

    Any suggestiosn would be great.
    Thanks a lot
    please be more specific on what you really want to do, what application end-users use to access data. This would probably workable but people in this forums may not understand your questions well.

    qha_vn

  3. #3
    Join Date
    May 2003
    Posts
    2

    Re: Sharing tables between MYSQL databases

    Originally posted by qha_vn
    please be more specific on what you really want to do, what application end-users use to access data. This would probably workable but people in this forums may not understand your questions well.

    qha_vn
    I am using a Portal CMS called PostNuke - it is the latest version 0.7.2.3 running on a unix server with php and mysql (latest versions).
    PostNuke allows for a feature called multisites - however in order for you to have several sights running and users logging into all of them only once you have to share a min of 2 tables nuke_modules_vars and nuke_users - the only suggested way they have to do this is to use the same database with different prefixes for the sites. However this makes for one very large MYSQL database - I would prefer to have seperate databases which can share tables between each other.
    I have been told that this requires some root access to hack - but am willing to hear alternatives.
    The other thought i had was to use cronjobs to update each table every few minutes or so. I am aware of some draw backs to this technique so would love to know if there is another way.
    Thanks

  4. #4
    Join Date
    Jan 2003
    Location
    Vietnam
    Posts
    188
    Sorry i have no experience on your environment
    qha_vn

  5. #5
    Join Date
    Feb 2004
    Location
    Amman - Jordan
    Posts
    2

    Exclamation Needs Modification

    I will make a long story short for you, Postnuke (your version) has the ability to run multisite on same server, but will need modification if every website is on a dif. server, How to set it up for a single server is explained in the help file that comes with nuke (you can see it here here ) also , the procedure is made clear step by step.
    To make it work with 2 servers for example you will need to modify postnuke to connect to two database hosts, it is not very hard as you can always "search" with an application such as "source edit" for where the users table is used for example and make that sql statement use the new connection's handler in the mysql_query function call...

    make sure the new connection is initiated before the default (since the last is defaulted) and make sure you give it a unique handler to use whenever you need to access the tables.

    and an even simpler way is described in the file but i have just noticed it, every website keeps its own config file !
    Last edited by yozzy; 02-15-04 at 03:49.

Posting Permissions

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