Question About Dump On MySQL Home » CentOS » Question About Dump On MySQL August 11, 2014 Rodrigo Pichiñual Norin CentOS 4 Comments 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 ” ??? thank
August 11, 2014 Rodrigo Pichiñual Norin CentOS 4 Comments 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 ” ??? thank
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
Hi, 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,
great!! thank for your answers, it is very useful for me Regards 2014-08-11 17:33 GMT-04:00 Todor Petkov : CentOS mailing list CentOS@CentOS.org http://lists.CentOS.org/mailman/listinfo/CentOS
4 thoughts on - Question About Dump On MySQL
echo “select * from users where id=20;” | mysql -u user -ppass -Ddb
Alan McRae
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
Hi,
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,
great!!
thank for your answers, it is very useful for me
Regards
2014-08-11 17:33 GMT-04:00 Todor Petkov:
CentOS mailing list CentOS@CentOS.org http://lists.CentOS.org/mailman/listinfo/CentOS