Solved

Database Link In MySQL

Posted on 2003-10-27
5
436 Views
Last Modified: 2012-06-27
Hi people,

Something that I need to find out about the MySQL database ability.
I'm just wondering whether the MySQL database have any functionality similar to the "database link" in oracle?

Actually I have 2 database here. Let's give it a name of  "A" database and "B" database.......
Inside the "A" database there is an employee table.

The program that I am writing now is actually using the "B" database but I need to cross reference to the employee table
in "A" database to get some information.

In order not to use 2 simultaneous DB connection in my program, I am just wondering is there any capability that MySQL
had that can clone out a table in "B" database but that table is actually referring to the employee table in "A" database.

I'm just wondering whether is there any ways of doing this in MySQL ? Thanks in advance for any help that I could get here.
:D

Cheers,
Simon.
0
Comment
Question by:gilabean
  • 3
5 Comments
 
LVL 17

Expert Comment

by:Squeebee
ID: 9631381
There is no such capability in MySQL currently. You can use two connections in an outside language, or copy a snapshot of the table in question over to server A from server B and then run the query.
0
 
LVL 2

Expert Comment

by:RichardAllsebrook
ID: 9632554
Or...

Link both of the tables into access and use ODBC to access them.

Or...

Use the Easysoft SQL Join Engine (quite expensive though) to hetrogeniosuly join the two tables in a virtual database. The tables can be from entirely different sources too (say mysql and sqlserver)

http://www.easysoft.com/solutions/0001/main.phtml

I am an ex-employee of Easysoft but dont let that put you off - its an excellent product.
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9633619
Hmm, the join engive is a neat looking idea.
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 200 total points
ID: 9646074
you can use the 4 part naming convention in mysql so there's no reason why
 you can process both tables throught the one connection...
whiich version are you using..
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9646204
Hmm, seems the rest of us made an assumption that the databases would be on seperate server machines.

Gilabean: Lowfatspread is right. As long as both databases are on the same physical server, use the mydatabase.mytable.mycolumn syntax.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now