473,396 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Connect 2 databases with different ports number in 1 sql statements

Hi,
I need to create a sql select statement which join 2 databases, where both the database have to connect with different port numbers,
db1 port: 3306
db2 port: 3311
select something from db1.table1 A left join db2.table2 B on A.id = B.id

when i execute it, the error msg come out:
SELECT command denied to user 'username'@'localhost' for table 'table1'

I need to solve it urgently, all helps will be appreciated

Thanks in advanced.

Yii Ing
Jan 13 '07 #1
5 5086
ronverdonk
4,258 Expert 4TB
Hi,
I need to create a sql select statement which join 2 databases, where both the database have to connect with different port numbers,
db1 port: 3306
db2 port: 3311
select something from db1.table1 A left join db2.table2 B on A.id = B.id

when i execute it, the error msg come out:
SELECT command denied to user 'username'@'localhost' for table 'table1'

I need to solve it urgently, all helps will be appreciated

Thanks in advanced.

Yii Ing
You can SELECT different tables but the tables must exist within ONE logical database, not from two or more logical databases.

Ronald :cool:
Jan 17 '07 #2
fens
3
Why don't you create new table in the same database it much better, than you have two database with different port.
Jan 18 '07 #3
ronverdonk
4,258 Expert 4TB
You could use a temporary table. Then you

- connect to 1st database
- read the table from the 1st database into storage
- connect to the 2nd db and create a temp table
- store the data from the 1st db into the temp table
- perform your query

Ronald :cool:
Jan 18 '07 #4
Thanks to all, i already found the solution, juz to grant access between the two database will solve my problems.

Thanks.

Yii Ing
Apr 30 '07 #5
ezly80
2
one server with two different database
hai...

i have problems to connect the jboss server with two different database which is Oracle and Mysql.

this two db have same db name example Student. if one of the db corrupt the server can connect to another one.example oracle to mysql or mysql to oracle.

can one server connect different database.each database can share same domain example 10.2.2.56...

please help me...i really stuck.

me,
ezly
Dec 27 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Brian | last post by:
I hv a school assignment that is to generate 52 different random number, where all the numbers must >1 and <53. Pls help~ Thanks~
5
by: zxo102 | last post by:
Hi, I am doing a small project using socket server and thread in python. This is first time for me to use socket and thread things. Here is my case. I have 20 socket clients. Each client send a...
1
by: Ben Hanson | last post by:
I've scoured Google searching for an answer that seems like it should be easy but apparently isn't...when I open SSMS to connect to a SQL 2005 database and choose Windows authentication, it greys...
9
by: tabakaka | last post by:
i need to connect 2 different columns from 2 tables. note the these columns are strings (varchar) column on 1st table: description1 column on 2nd table: description2 example: description1:...
2
by: tayl429 | last post by:
I am fairly new to Access and may not ask this question appropriately but here goes..... I am creating a medication database for a physician's office. I have it setup in a form and it works just...
1
by: vaskarbasak | last post by:
Hi All, I have a text file.The file size is very big.I have to read the file from different line number. e.g File test.txt contains 10000000 lines and more.The 1st thread read the file from...
24
by: tokcy | last post by:
Hi everyone, I want to connect two different database server using php/mysql. Suppose i have some dat on www.xyz.com and i want to select that data on www.abc.com How do i integrate two...
4
by: kardon33 | last post by:
My program sends commands to a different computer running a udp server. My problem is that each different node is running on a different udp port and the code needs to take that into account by...
0
by: lucy149 | last post by:
hello , i am trying to implement ftp protoco using javal. but when i read the protocol description ,i didnt get how i should have 2 ports does that mean having 2 server sockets , each one with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.