Searching a database via command prompt

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Searching a database via command prompt

Post by Luke »

I need to do a sweeping search of an entire database for a particular word via the ssh command prompt... is that possible?
User avatar
tr0gd0rr
Forum Contributor
Posts: 305
Joined: Thu May 11, 2006 8:58 pm
Location: Utah, USA

Managers

Post by tr0gd0rr »

Ha ha, My manager asked me to do that last year.

The only thing I've ever heard to do it is phpmyadmin. You may be able to run that from lynx, i don't know.

You also might try

Code: Select all

grep -Hni 'SEARCH_STR'
but your database may not store char/varchar columns as text. :| hairy problem, that is!
Post Reply