atcomsystems.ca/forum
Posted By: chemcl MySQL programming - 04/29/05 10:04 AM
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.
Posted By: bradleyland Re: MySQL programming - 05/01/05 07:42 PM
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.
Posted By: chemcl Re: MySQL programming - 05/03/05 01:13 PM
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!!
Posted By: bradleyland Re: MySQL programming - 05/04/05 08:02 AM
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/
Posted By: chemcl Re: MySQL programming - 05/04/05 06:01 PM
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.
Posted By: bradleyland Re: MySQL programming - 05/05/05 12:44 PM
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.
Posted By: chemcl Re: MySQL programming - 05/05/05 05:09 PM
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).]
© Sundance Business VOIP Telephone Help