| | |
what to do with this .SQL script?
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Well hmm, Yes I did, LETS say i have a database called test !! and a mysql script that looks like such
because I do, Now I wish to run this script
It works for me
You might try reading the man pages ?
So basicly what you need to do is open up some kinda console
start > run > cmd
in windows
then you need to make certain that mysql is in your path, prolly easyest to change to the mySQL dir, then you type
mysql theDatabaseName < C:\path\to\the\file\photowhatever.sql
and pray it should hopfully work without a hitch.
MySQL Syntax (Toggle Plain Text)
[root@Kat root]# cat pont.sql #DROP TABLE `test` #CREATE TABLE test(nick VARCHAR(30), about VARCHAR(30)); INSERT INTO test () VALUES ("Paul.Esson" , "Trying to be nice" ); INSERT INTO test () VALUES ("kubota" , "Idiot"); SELECT * FROM test
because I do, Now I wish to run this script
MySQL Syntax (Toggle Plain Text)
[root@Kat root]# mysql test < pont.sql nick about Paul.Esson Trying to be nice kubota Idiot Paul.Esson Trying to be nice kubota Idiot Paul.Esson Trying to be nice kubota Idiot [root@Kat root]#
It works for me
You might try reading the man pages ?
MySQL Syntax (Toggle Plain Text)
[root@Kat root]# man mysql | tail -n 20 | head -n 5 EXAMPLE You can also READ a backup dump file back INTO MySQL with: mysql database < backup-file.sql
So basicly what you need to do is open up some kinda console
start > run > cmd
in windows
then you need to make certain that mysql is in your path, prolly easyest to change to the mySQL dir, then you type
mysql theDatabaseName < C:\path\to\the\file\photowhatever.sql
and pray it should hopfully work without a hitch.
![]() |
Similar Threads
- How can I generate sql script with data in sql server 2000? (C#)
- generate sql script (ASP.NET)
- Execute an sql script with routines in jdbc..? (Java)
- Execute an SQL Script in JDBC (Java)
- shell script to genetare a report by running a sql script and email the report (Shell Scripting)
- SQL Script help (Oracle)
- Importing SQL Script File - Urgent !! (Database Design)
Other Threads in the MySQL Forum
- Previous Thread: database driven link layout
- Next Thread: Connection problem
| Thread Tools | Search this Thread |
agplv3 alfresco amazon api artisticlicense aws bizspark breathalyzer camparingtocolumns cmg communityjournalism contentmanagement contractors copyright count court crm database design developer development distinct drupal dui ec2 email enterprise eudora facebook form foss gartner gnu government gpl greenit groklaw hiring hyperic images innerjoins insert ip joebrockmeier join journalism keyword keywords kickfire law legal license licensing linux maintenance managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple music mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource oracle penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization





