homepage Welcome to WebmasterWorld Guest from 50.19.199.154
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
Microsoft Telnet Problem - MySQL
madcat




msg:971105
 1:45 pm on Aug 15, 2002 (gmt 0)

Can someone confirm that the correct format to connect to a hosts database is:

open >
mysql -h hostname -u username -p

Every combination I try gives me:

Connecting To MySQL...could not open a connection to host. Connection failed.

 

brotherhood of LAN




msg:971106
 1:48 pm on Aug 15, 2002 (gmt 0)

it looks OK

sometimes using the password on its own without the username sometimes works for me

madcat




msg:971107
 2:10 pm on Aug 15, 2002 (gmt 0)

Thanks- that's what I was afraid of. Perhaps the server hasn't had a chance to propagate.

madcat




msg:971108
 2:41 am on Aug 21, 2002 (gmt 0)

Ok. Now that I'm logged into telnet...

I want to grab a database from my local Win2k machine and paste it into my hosts mysql database.

After logging into telnet w/ username and password- is this the prompt where I need to enter:

mysqldump --host=host1 --opt mydatabase mysql --host=host2 -C newdatabase
-------------------------------------------

This gives a lovely little 1064 error. Am I in the correct place here (in telnet)?

ppg




msg:971109
 8:14 am on Aug 24, 2002 (gmt 0)

did you get anywhere with this madcat?

I'm really guessing here, but since you havn't had a reply I thought I'd try -

I'm not sure you need to specify both hosts. I would have thought that the way to do this would be to run the command on the command line of the first host machine (the one you're copying hte database from) and then just specify the host for the second one (the one you're copying to).

I'm basing this on the following line from the MySQL docs:

mysqldump --opt database mysql --host=remote-host -C database

also, is the new databse already created beforehand on the destination host?

madcat




msg:971110
 3:12 pm on Aug 24, 2002 (gmt 0)

Hey ppg-

Yes, the new database is already created. I just got phpMyAdmin and was working with it a bit. I believe the export function exists to create a mysqldump- which I did use and it created the dump file- but never asked for the destination database. So that's the part I'm trying to figure out. I haven't had success with it manually either.

The thing that gets me is it seems that this is probably one of the easiest things to accomplish in php/sql. Probably is but until ya see it.

ppg




msg:971111
 11:48 am on Aug 26, 2002 (gmt 0)

well, I'm no closer to sorting out your original problem, but if you've got your dump file ok then you can upload it to your destination host and import it easily with:

mysql database < backup-file.sql
from the telnet prompt

This will create your tables and their structures automatically, you just need the database created.

you probably already know this though :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved