you may find mysqldump useful too... for generating database creation/population scripts... Syntax mysqldump DATABASENAME -u USERNAME -p PASSWORD --add-drop-table --all > THEFILETOGOTO.SQL the --add-drop-tables includes statements to make the tables. Surjit.
-----Original Message----- From: Derek Fountain [SMTP:fountai@hursley.ibm.com] Sent: 13 June 2000 15:33 To: SuSE English Subject: Re: [SLE] MySQL newbie question
That was the line I was after. Or indeed:
mysql -uuser -ppass < script.sql
also does the trick. Never occured to me to try it... :-)
cat file.sql | mysql -uuser -ppass databasenasme
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the postmaster@merhsbc.com. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. ********************************************************************** -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/