Business Phone Systems

Previous Thread
Next Thread
Print Thread
Rate Thread
#250588 04/29/05 10:04 AM
Joined: Mar 2004
Posts: 188
chemcl Offline OP
Member
OP Offline
Member
Joined: Mar 2004
Posts: 188
Anyone know what the command is to load an external document into mysql? I have the script.sql that I spent quite a while typing up but can't remember how to get that to run.


Cheryl McLean
Communications Done Right
Atcom VoIP Demo
VoIP Demo
#250589 05/01/05 07:42 PM
Joined: Nov 2004
Posts: 25
Member
Offline
Member
Joined: Nov 2004
Posts: 25
What type of computer is the MySQL database running on? Are you using any GUI to administer the database like phpMyAdmin or MySQL CC?

You can do this from a command line fairly simply. Navigate to the bin folder inside the MySQL installation directory and type in:

mysql -h hostname -u username -p password < path_to\my_sql_script.sql

This will feed the SQL script to the mysql client application and run it against the database specified in the script.

#250590 05/03/05 01:13 PM
Joined: Mar 2004
Posts: 188
chemcl Offline OP
Member
OP Offline
Member
Joined: Mar 2004
Posts: 188
Thanks for answering...I am just using the localhost. I can't even open mysql from the dos command prompt. I can open it from the actual sql on the start menu. I am not using a gui to interface right now. Got any ideas?? I have put the path in my computer to the mysql file and bin...c:\mysql\bin...I don't know what else to do. HELP!!


Cheryl McLean
Communications Done Right
#250591 05/04/05 08:02 AM
Joined: Nov 2004
Posts: 25
Member
Offline
Member
Joined: Nov 2004
Posts: 25
Try these instructions verbatim:

* Click Start, Run
* Type in cmd and click ok
* Type the following commands; each new line means press enter

cd \mysql\bin
mysql -h hostname -u username -p password < path_to\my_sql_script.sql

* Replace hostname with localhost and the username and password with the database credentials

The alternative is to download MySQLCC, which is a GUI front end for MySQL.

https://www.mysql.com/products/mysqlcc/

#250592 05/04/05 06:01 PM
Joined: Mar 2004
Posts: 188
chemcl Offline OP
Member
OP Offline
Member
Joined: Mar 2004
Posts: 188
If I type in the path that you gave, it gives me an error of "mysql is not recognized as an internal or external command, operable program, or batch file.

I have no problem using mysql, I just am having a problem being able to load a script and I think that it has to do with not being able to open it from the command line.


Cheryl McLean
Communications Done Right
#250593 05/05/05 12:44 PM
Joined: Nov 2004
Posts: 25
Member
Offline
Member
Joined: Nov 2004
Posts: 25
Unfortunately, 99% of the time, I'm running mysql from the command line via an SSH session, so I rarely run it on Windows. You might want to confirm that the mysql.exe executable exists.

Other than that, try out MySQLCC. It's a nice product.

#250594 05/05/05 05:09 PM
Joined: Mar 2004
Posts: 188
chemcl Offline OP
Member
OP Offline
Member
Joined: Mar 2004
Posts: 188
I am not finding the mysql.exe file. I find one that just has mysql but it opens up the window and beeps and then closes...so...

Also, if the .exe file isn't there then why am I able to open it up??

[This message has been edited by chemcl (edited May 05, 2005).]


Cheryl McLean
Communications Done Right

Moderated by  MooreTel 

Link Copied to Clipboard
Forum Statistics
Forums84
Topics93,883
Posts637,024
Members49,675
Most Online5,661
May 23rd, 2018
Popular Topics(Views)
Today's Birthdays
Adam Randall, Felton 1967, FeltonD, paezacero, Spencer
Newest Members
tech3500, APInc, m1cashman, jonnycom, XJR9000
49,674 Registered Users
Top Posters(30 Days)
Toner 11
jsaad 8
teleco 6
dexman 5
Shahza 4
tim10 3
Who's Online Now
0 members (), 10 guests, and 19 robots.
Key: Admin, Global Mod, Mod
Contact Us | Sponsored by Atcom: Business Phone Systems | Terms of Service

Sundance Communications is not affiliated with any of the above manufacturers.
©Copyright Sundance Communications 1998-2023
Powered by UBB.threads™ PHP Forum Software 7.7.5