When mysql exits, the second line does nothing, as it is not a valid shell command.
try :
echo 'INSERT INTO table_name (column_name) VALUES ("value")' | mysql --user=root --password=xxxxxxxx Database_Name
Or put the second line in a file, and cat the file through a pipe to mysql.
Mike Tuller wrote:
I am trying to create a script that will insert data. Right now I am just using something simple to test this out, but I can't get it to work. Here is what I have.
mysql --user=root --password=xxxxxxxx Database_Name; INSERT INTO table_name (column_name) VALUES ("value");
After I run the script, I check the data, and nothing was entered. When I run each statement on it's own (not from a script file, but in the shell) Everything seems to work. It just doesn't work when you try to run it from a script.
Any ideas?
Mike Tuller
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]