Ever need to find a string of text within a database, but aren't sure which table, row, or field to look in? mysqlgrep is a tool designed to locate all occurences of a piece of text within a particular table or entire database.
Linux is built on a cadre of small, versatile programs that combine well to fit just about any situation. It's sort of like a big nerdy swiss army knife ... or something - you get the point. grep is no exception. If, somehow, you're not familiar with it, the first line of the man page says it all:
NAME
grep, egrep, fgrep, rgrep - print lines matching a pattern
Pretty simple, right?
Yes. it's simple and powerful and great and I must use it at least 100 times throughout the day. Did that e-mail ever go out? grep the logs. What port did I set apache to listen on? grep the config file. Is the backup script running? grep the output from ps. Which source file contains the requireLogin() function? grep 'em. Can't find your keys? grep your office.
See what I mean?
Problem is, it won't help you if the piece of text you're looking for lives inside a database and you want to know which row(s) from which table(s) contain that text.
Enter mysqlgrep.
Last week I was looking for a particular string of text that I knew existed somewhere in a particular MySQL database I was working on, but I didn't know which field in which record in which table. First I Googled for a script that would let me specify a string to search my database for and would return all of the matching records. There were one or two, but I didn't like way they worked, so I spent a few minutes with perl and whipped up my own.
You can download it from the link at the bottom of this page. Usage is as follows:
mysqlgrep -u username -h hostname -d database -t table pattern
-u username : mysql username to connect with (default: root).
-h hostname : hostname of mysql server to connect to (default: localhost).
-d database : name of mysql database
-t table : name of the table to search within. If not provided, all tables will be searched.
-l : only list which tables contain a match, don't display actual data
pattern : the pattern to search for.
Feel free to contact me with suggestions, questions, etc...







Comments
I am from Togo and also am speaking English, give true I wrote the following sentence: "Get the exciting facts about natural progesterone and how it can deliver what."
THX 8-), Marianne.
I am from Thailand and learning to speak English, please tell me right I wrote the following sentence: "Mandell clinical pharmacy is an independently owned facility that specializes our highly trained pharmacists and nurses are available for private."
With respect :p, Mathea.
I am from Malta and too bad know English, please tell me right I wrote the following sentence: "Buy cheap pro gest natural progesterone cream value size, oz, from emerita."
Regards ;-) Ollie.
I am from Uzbekistan and know bad English, please tell me right I wrote the following sentence: "Schering plough licenses prometriumr marketing rights to solvay pharmaceutical madison, nj, jan."
With respect :-D, Verna.
I am from Emirates and too poorly know English, give true I wrote the following sentence: "This is a muscle from the relationship to a found floor about the different asian accuracy acquisition warren buffett."
Regards ;-) Sabmiller stock ticker.
I am from Australia and , too, and now am writing in English, give true I wrote the following sentence: "Attention volume was fortified by company of world."
Waiting for a reply :p, Desktop stocks ticker.
I am from Islands and now study English, tell me right I wrote the following sentence: " Speed a market history about the market.Critical reforms, a rounding exam when you indicate the lower milk way stimulus, ever are rather resulting like they would create."
Thank you so much for your future answers :(. Kiyoshi.
http://www.sanalhane.com
http://www.sevgilerimle.net
http://www.vidyo.net
http://www.ustatamirci.com
http://www.kombitamircisi.com
http://www.ecakombiservisi.gen.tr
http://www.ardaturan.net
http://www.sh-tsg.com
http://www.ustatamirci.net
Jim
http://www.helptobusiness.com
By the way, the mnogosearch indexes (which are actually mysql tables) are a little under 500meg.
jntu papers
--------------- --------------- ----------
http://knowsmokelessci garettes.com/smokeless-cigar ettes-on-sale/