How to run SQL script in MySQL

0 votes

I want to use MySQL to run certain SQL statements from a text file.

I attempted to execute source /Desktop/test.sql but got the following error:

mysql> . \home\sivakumar\Desktop\test.sql ERROR: Failed to open file '\home\sivakumar\Desktop\test.sql', error: 2

Any ideas as to why I'm doing this wrong?

Aug 11, 2022 in Database by Kithuzzz
• 38,000 points
514 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,370 points
2,316 views
0 votes
1 answer

How to schedule a job for SQL query to run daily?

down voteaccepted Expand the SQL Server Agent node ...READ MORE

answered Oct 25, 2018 in Database by Frankie
• 9,830 points
10,186 views
0 votes
1 answer

How to install MySQL in windows?

You can download the all in one ...READ MORE

answered Feb 28, 2019 in Database by Priyaj
• 58,020 points
1,070 views
0 votes
1 answer

How to install MySQL in Ubuntu?

To install MySQL on ubuntu you have ...READ MORE

answered Feb 28, 2019 in Database by Priyaj
• 58,020 points
1,211 views
0 votes
1 answer

How to display the queries executed by a particular user in MySQL?

From the version 5.1.7 onward, MySQL allows ...READ MORE

answered Mar 7, 2019 in Database by Mishti
• 480 points
4,365 views
0 votes
1 answer

How to sort the data in sql ?

Hi Akash,  If you want to sort ...READ MORE

answered May 29, 2019 in Database by sampriti
• 1,120 points
1,120 views
0 votes
0 answers
0 votes
1 answer

Want a command to be executed in Salt only if a directory is empty

You should consider using this inside your ...READ MORE

answered Jun 12, 2018 in DevOps Tools by Damon Salvatore
• 5,980 points
1,834 views
0 votes
1 answer

Creating A New MySQL User In Amazon RDS Environment

AWS RDS security groups documentation (a common ...READ MORE

answered Jul 18, 2018 in AWS by Priyaj
• 58,020 points
2,055 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP