hi all,
just wondering, is there a way to run sql statements as a single shell command?
What I mean is that I don't want to have to log in the mysql.exe util. For example, I can log into mysql and run a sql statement like this:
mysql -u root -p
...
mysql> use MyDBName
mysql> insert into table1 blah blah..
However, I would prefer if I could just skip the whole logging ing part entirely.
According to the mysql documentation, this should work:
C:\mysql\bin\>mysql --user=root --password=rootpass DBName insert into table1 blah blah..
but that doesn't work.
Is what I'm trying to achieve possible? Seems to me like it should be, but the mysql documentation isn't very clear on how to do this. thanks
Rick
just wondering, is there a way to run sql statements as a single shell command?
What I mean is that I don't want to have to log in the mysql.exe util. For example, I can log into mysql and run a sql statement like this:
mysql -u root -p
...
mysql> use MyDBName
mysql> insert into table1 blah blah..
However, I would prefer if I could just skip the whole logging ing part entirely.
According to the mysql documentation, this should work:
C:\mysql\bin\>mysql --user=root --password=rootpass DBName insert into table1 blah blah..
but that doesn't work.
Is what I'm trying to achieve possible? Seems to me like it should be, but the mysql documentation isn't very clear on how to do this. thanks
Rick