On Tuesday 12 August 2014 08:15:16 Alan McRae wrote:
echo "select * from users where id=20;" | mysql -u user -ppass -Ddb
Alan McRae
On 12/08/2014 08:10, Rodrigo Pichiñual Norin wrote:
I need export an registers of a data base from command line.
It is possible with mysqldump?
for example:
mysqldump -u user -ppass db "select *from users where id=20" ???
thank _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
No need for the pipe:
mysql -u user -p $DATABASE -e "select * from users where id=20"
NOTE: I did *not* type the password, the very fact that you can actually type the password in the command should be abolished from mysql cli
Regards