User login

Find text anywhere in a MySQL database (use PHPmyadmin)

I just had a quick Drupal question. We need to search our site and make sure a link is never used directly on any of the pages. I know Drugal is a sql backend -- is there a quick and easy way to just search the database for that?

Yes, there are ways. If it is in content Drupal's built in search should do it. Otherwise, PHPMyAdmin has a good every database table / every field search that's a good deal more complicated than a simple SQL command.

That's your best option: the alternatives are manually doing "SELECT * FROM tablename WHERE fieldname LIKE '%example%'; but that's a lot of fields and a lot of tables in Drupal; or doing your own searches on

So yes there's a PHP+MySQL solution to searching the entire database and the easiest way to get it is to install PHPMyAdmin if it is not already:

sql command find in any column or table
search mysql database
mysql find
how does phpmyadmin full text search work (answer: with a foreach loop or two, of course!)


Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.