1: .sql files are usually textfiles with sql statements in them delimited by ;

2: do the following

1) start the client - /path/to/mysql -u <user> -p<pass>
2) select your database (if nescessary) - use <db>
3) import the sql file - source /path/to/fill_help_tables.sql



[EMAIL PROTECTED] wrote:
Hello, I'm new to MySQL and SQL have some very basic questions about them. I'm relatively competant in programming, so maybe if someone could answer ...


1. Are SQL files, eg. foo.sql, referred to as scripts or programs or what. (In searching for answers to 2. below and don't know if I'm using the right terms)

2. How do you get MySQL to execute a SQL file? I downloaded "fill_help_tables.sql" from the website, and it's comments tell how to load from the command line:
mysql -u root -p mysql < file_name
but I would like to load a file from the interactive mode, ie. from the mysql> prompt.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to