Hi!
I want to search a string in whole database [not in a table]? Is it possible in MYSQL? If so then how?
Thanks in advance
Hi!
I want to search a string in whole database [not in a table]? Is it possible in MYSQL? If so then how?
Thanks in advance
no.
Use mysqldump to dump the database into a text file, like this:
mysqldump.exe databasename -u username -p > "c:\\databasedump.sql"
Then search using a good text editor.
If you’re on linux, you can pipe the output to grep and/or awk and all that stuff too.
PS: this will only work if the string is cleartext. (not encrypted or encoded in a strange way)
As it looks like this topic has been bumped I’ll add another way of doing this.
I have written a PHP script which allows you to find and replace (or just find) any text string across a complete MySQL database. You can view/downlaod the code here:
http://www.mjdigital.co.uk/blog/search-and-replace-text-in-whole-mysql-database/
I am working on a way to incorporate Wildcards and regular expressions - if you’re desperate for that functionality then let me know.
MJ7