Hi Carl, Thanks for your reply.
I have created a shell script but I get stuck on the part where it asks to input password. How do I get the script to input the password that I put in? So far my script looks like this: ./mysql -u 'root' -p echo "abc" The script executes, but it just waits for the password after it executes the line: ./mysql -u 'root' -p Can anyone help with this? Thanks. Peter On Mon, 5 Aug 2002, Carl McNamee wrote: > I'm assuming that you are using some form of unix in this. From the system > prompt type "mysql -u root -ppassword < import_test1". If this works just > put it into a script (bash, perl, whatever) and run it either from the > command line or via cron if you want it automated. > > Carl McNamee > Systems Administrator > Billing Concepts > (210) 949-7282 > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Saturday, August 03, 2002 11:58 PM > To: [EMAIL PROTECTED] > Subject: automating import process > > > Hi, > > I want to try to automate a phonebook list import process into MySQL > database. The phonebook was originally created with MS Access and > exported into a text file. I upload that text file onto my server and I > proceed with the following import process. > > Using Telnet I type: > # ./mysql -u 'root' -p > > It then asks > Enter password: > > I then select the database to use > mysql> use import_test1; > > I delete the previous phonebook list table because the import process does > not know that it should replace the previous records even though there > have been changes > mysql> use import_test1; > > mysql> exit > Bye > > > I then import by doing the following: > [root@ns2 bin]# ./mysqlimport --local -u "root" -p > --fields-terminated-by=, import_test1 phone2.txt > Enter password: > import_test1.phone2: Records: 53 Deleted: 0 Skipped: 0 Warnings: 1 > > > I was wondering is there anyway to automate this process in a script? > > I have never written a script in Linux before. If I can automate this > process, what kind of script should I use? > > Thanks. > > Peter > > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php