Quoting Johan De Meersman <vegiv...@tuxera.be>:
On Wed, May 26, 2010 at 10:20 AM, <a.sm...@ukgrid.net> wrote:
If you are trying to restore from backup.sql to a database called soure
then your syntax is wrong. You should be running:
mysql source < backup.sql
You are assuming that the file named "backup.sql" contains a backup of the
database named "backup". There is no grounds in the mail that support that
assumption; I would even say that 'backup.sql' is a rather generic name for
a file containing a backup. Such naming is not uncommon for a one-shot
backup; or it might be used as a placeholder in an explanation.
Actually Im assuming a DB name of "source", which I mentioned in my
first post. Thats actually an bad assumption as, as Ive just read,
source is an alternative way to read in data from a file that Id never
seen before. However the syntax would still seem to be bad, assuming
the command is being run from the command prompt as opposed to the
mysql command prompt. According to the man page the two options from
the command prompt are:
shell> mysql db_name < backup-file.sql
OR
shell> mysql -e "source /path-to-backup/backup-file.sql" db_name
thanks Andy.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org