Mysql delete data via cli

From thelinuxwiki
Revision as of 01:19, 13 April 2014 by Nighthawk (Talk | contribs)

Jump to: navigation, search

deleting range from shell

delete user_id if greater than 2

mysql -h localhost -u root mediawikidb -e "DELETE FROM thelinuxwiki_user WHERE user_id > '2'" --password=password

the above command was used to delete everything but the admin user.