using (hard?) links for tables

2003-12-11 Thread Moritz von Schweinitz
hi there!

i have two databases on the same server, and one of the tables ('users') 
should be the same in both databases. since this is very specific to 
this one server, and other servers running similar databases don't need 
that functionality, i'm looking for the easiest way to do this, so i was 
wondering whether mysql is smart enough not to couse any mayor mess if i 
simply replace the users.* file in one of the datbase's  directory with 
hardlinks to the other databses files for that table.

anyone know whether this works, and if not, what would be the easiest 
way of keeping two tables in differnt databases synced? a cronjob, maybe 
(it's not THAT time-critiva).

thanks,

M.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: using (hard?) links for tables

2003-12-11 Thread Moritz von Schweinitz
It's not recommended since it might cause file locking issues internally.
how 'maybe' would that be? (that table almost never get written to, but 
when it is written to, the other one should be updated AFAP. both tables 
would almost never be written to at the same time)

Why not just set up a replication between those two servers and replicate
the table?
becasue they are on the same machine, and IMHO replication would be a 
bit of an overkill for that, but i'd be happy to be corrected.

thanks,

M.

otherwise copying should work, but you'd still have some locking issues at
the time of copying.
On Thu, 11 Dec 2003, Moritz von Schweinitz wrote:


hi there!

i have two databases on the same server, and one of the tables ('users')
should be the same in both databases. since this is very specific to
this one server, and other servers running similar databases don't need
that functionality, i'm looking for the easiest way to do this, so i was
wondering whether mysql is smart enough not to couse any mayor mess if i
simply replace the users.* file in one of the datbase's  directory with
hardlinks to the other databses files for that table.
anyone know whether this works, and if not, what would be the easiest
way of keeping two tables in differnt databases synced? a cronjob, maybe
(it's not THAT time-critiva).
thanks,

M.








--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: using (hard?) links for tables

2003-12-11 Thread Dan Greene
What if you were to make a 3rd database, containing shared elements, such as your user 
table (I presume we're not talking the MySQL system user table) and then have 
necessary permissions granted between your other database users to read that table 
jointly, as you can query cross databases...

 -Original Message-
 From: Moritz von Schweinitz [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 11, 2003 9:26 AM
 To: [EMAIL PROTECTED]
 Subject: using (hard?) links for tables
 
 
 hi there!
 
 i have two databases on the same server, and one of the 
 tables ('users') 
 should be the same in both databases. since this is very specific to 
 this one server, and other servers running similar databases 
 don't need 
 that functionality, i'm looking for the easiest way to do 
 this, so i was 
 wondering whether mysql is smart enough not to couse any 
 mayor mess if i 
 simply replace the users.* file in one of the datbase's  
 directory with 
 hardlinks to the other databses files for that table.
 
 anyone know whether this works, and if not, what would be the easiest 
 way of keeping two tables in differnt databases synced? a 
 cronjob, maybe 
 (it's not THAT time-critiva).
 
 thanks,
 
 M.
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: using (hard?) links for tables

2003-12-11 Thread Stephen Brownlow
I agree with Dan.
We looked into this years ago.
We have MANY machines with many tables used this way.

It is easy when you realise that one SQL command can access multiple
databases, using db1.tablea ... db2.tableb syntax.

Stephen
- Original Message -
From: Dan Greene [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, December 12, 2003 4:54 AM
Subject: RE: using (hard?) links for tables


What if you were to make a 3rd database, containing shared elements, such as
your user table (I presume we're not talking the MySQL system user
table) and then have necessary permissions granted between your other
database users to read that table jointly, as you can query cross
databases...

 -Original Message-
 From: Moritz von Schweinitz [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 11, 2003 9:26 AM
 To: [EMAIL PROTECTED]
 Subject: using (hard?) links for tables


 hi there!

 i have two databases on the same server, and one of the
 tables ('users')
 should be the same in both databases. since this is very specific to
 this one server, and other servers running similar databases
 don't need
 that functionality, i'm looking for the easiest way to do
 this, so i was
 wondering whether mysql is smart enough not to couse any
 mayor mess if i
 simply replace the users.* file in one of the datbase's
 directory with
 hardlinks to the other databses files for that table.

 anyone know whether this works, and if not, what would be the easiest
 way of keeping two tables in differnt databases synced? a
 cronjob, maybe
 (it's not THAT time-critiva).

 thanks,

 M.


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]