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
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 at centos.org > http://lists.centos.org/mailman/listinfo/centos
On 11/08/2014 11:10 PM, 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" ??? > > > thankHi, as I understand, you need to apply a 'WHERE' clause? It can be done like this: mysqldump database table_bame --where="date_column BETWEEN '2012-07-01 00:00:00' and '2012-12-01 00:00:00'" Keep in mind, that this clause is valid only for table. I am not sure if you can use JOIN. Regards,