Shaoping Xie wrote:
> Hi, Everybody:
> I am new in the field of MySQL. I have a lot of questions. Here are
> some of them:
> 1. How can I get into the editing mode when I am in MySQL (>mysql)?
> The problem I have is that I can not correct my typing mistakes in the
> upper lines.
> 2. Is there any way I can save the MySQL scripts for the later use?
> How do I save and open the files?
> 3. How can I control the destination of the datafile instead of
> using the default settings?
> By the way, I am using window NT4 right now but will move to SunOS
> very soon. Any helpful hints and answers will be greatly appreciated.
> Shaoping Xie, Ph.D.
1. This depends on your OS.
Under NT I had the curious situation, that it works on some machines and doesn't on others
On Linux and Solaris I had never problems with this.
2. Yes there is :)
Just use any text editor you prefer (e.g. vi,emacs,nedit,write).
Write the SQL commands in an ASCII file (e.g. big_select.sql)
Send the ASCII file to mysql commandline (e.g. mysql -u root -p -h remote.host.com test
< big_select.sql )
3. I am not sure what you ask here.
If you want to use mysqld with an different directory for the databases, just use the
--datadir=/where/you/want/to/have/them option on mysqld startup, or give this option in
your global my.cnf configuration file.
PS: Sorry for the late answer, I was really busy.