0

How can I create a SQL Script using MySql?

I already created a database and tables. I populated the tables and wrote queries to solve the questions in my homework. But the professor want me to submit the SQL script.

Can anyone help me?

3
Contributors
7
Replies
8
Views
8 Years
Discussion Span
Last Post by peter_budo
0

I tried but it gave me the error:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ...

0

I tried but it gave me the error:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ...

Can you post what you did ?

0
mysqldump -u root -p mypassword assignment2 > /C:/Users/Samara/Desktop/HW1.sql
0

If you let MySQL register its PATH on install you can run dump from any location in your pc, if you did not do so you need to run dump from MySQL installation folder. Point of this is that you do not need to give absolute path to save the SQL file. Your dump command is almost correct beside that slash in front of of C hard drive

mysqldump -u root -p mypassword assignment2 > C:/Users/Samara/Desktop/HW1.sql

but I would prefer it as

mysqldump -u root -p mypassword assignment2 > HW1.sql

this will create HW1.sql in directory from which at that point you calling dump command

0

Strange, try this there is virtually no difference just after executing you need to provide password.

mysqldump -u root assignment2 > HW1.sql -p

If this doesn't work try to install MySQL GUI Tools which unlike phpMyAdmin do not need PHP on your pc. Through Administrator you set up connection and then use Query Browser

Edited by peter_budo: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.