INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Hi everyone, My LAN is consisted o

Hi everyone, My LAN is consisted o

(OP)
Hi everyone,
My LAN is consisted of 2 separate MySQL platforms.
In on of those 2 stations I have a database: "MyDB" that hosts a table: "MyTABLE".
At the second station I created a database with the name: "MyDB" and I'd like to import the table "MyTABLE" into that database.
In order to do so I thought I might write the following query:

CODE

CREATE TABLE MyTABLE SELECT * FROM ip.db. MyTABLE; 
I typed:

CODE

CREATE TABLE MyTABLE SELECT * FROM 10.0.0.30.MyDB.MyTABLE; 
and recieved an error that says: "error 1049 unknown database 10.0.0.30".
Can anyone help my put the right code to read (and whereby import) a table fro a remote station?
Thanks

RE: Hi everyone, My LAN is consisted o

You have to connect to the remote database server before you can run queries against it.

CODE

mysql -h remotehost -u username -p 

-p with no parameters will prompt for the password.

once connected

CODE

use databasename; 

Then run your query.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

RE: Hi everyone, My LAN is consisted o

(OP)
Thank you very much !

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close