Jump to content


what does "source" do?

  • Please log in to reply
2 replies to this topic

#1 mysty

  • Members
  • PipPipPip
  • Advanced Member
  • 83 posts

Posted 01 August 2006 - 11:28 PM

I am reading a book to learn PHP and mysql using Dreamweaver.  There is a step in the introduction to databases where you take a database, mydatabase.SQL and then load mysql and then type " source c:/mysql/data/mydatabase.sql".  After it processes several files, there is a mysql database set up in the data directory.  There are several tables etc.  The book does not describe what is happening with the mysql command "source".

#2 AndyB

  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 August 2006 - 12:12 AM

SOURCE runs a file (rather than typing a whole bunch of stuff).

Legend has it that reading the manual never killed anyone.
My site

#3 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 August 2006 - 02:47 PM

Not to mention that source is a linux command executed at a command prompt.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users