WebFaction
Community site: login faq

I want to execute a script from the mysql shell:

mysql> source file_name

But where should I place the files? And how do I refer to them?

asked 11 Jul '12, 04:37

ttt
134
accept rate: 0%


You can execute SQL files with MySQL using any of the following ways:

# without specifying a
mysql < /path/to/file.sql

# specifying a DB
mysql db_name < /path/to/file.sql

But where should I place the files? And how do I refer to them?

Following the instructions above, you can place them anywhere you like :)

permanent link

answered 11 Jul '12, 05:21

David L ♦♦
1.4k13
accept rate: 45%

edited 11 Jul '12, 08:26

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×168
×25

question asked: 11 Jul '12, 04:37

question was seen: 2,695 times

last updated: 11 Jul '12, 08:26

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM