I have used phpMyAdmin for years - I owe those guys a donation because I couldn't have run my business without it.

That said, there are several things I need to do throughout my databases:

  • find all tables with a field like %CreateDate%
  • find all tables like %tableName% WITHOUT a field named CreateDate
  • copy some field structures by control-clicking from one table. Then, navigate to another table and "paste" those fields to that table
  • click on a field with non-normalized values (e.g. Pending, inactive, active, closed), and from that, create a lookup table named _____, where a list of the current values comes up and I assign integer values to the names, and the table gets updated
  • move a field up or down in a table
  • synchronize two tables so that fields missing in one are put in the other (and vice versa), but respecting char lengths if the modified table's field has longer data
  • find all tables with more than n records
  • etc. - basically, cool stuff..

Any other options out there that anyone has used and liked?

    seems unlikely you will find an of the shelf script that's going to be that specific. you could either write something yourself or hire some one to do it. A couple of things you want to do show a lack of understanding of db management -
    ie "move a field up or down in a table" you should never want t do that to a db, it may be something to with displaying data from a db, but that's a separate issue.

      There's TOAD and SQLYOG
      both are commercial products (oh I just checked, it says Toad is freeware)
      I looked at both a couple of years ago but decided writing my own view and data manipulation scripts was less trouble
      - they do what you want but obviously will take time to learn

        sfullman wrote:

        * find all tables with a field like %CreateDate%

        SELECT CONCAT("`", TABLE_SCHEMA, "`.`", TABLE_NAME, "`") table
        FROM information_schema.COLUMNS
        WHERE COLUMN_NAME LIKE '%CreateDate%'
        sfullman wrote:

        * find all tables like %tableName% WITHOUT a field named CreateDate

        This can be done with a query similar to the one above.

        sfullman wrote:

        * copy some field structures by control-clicking from one table. Then, navigate to another table and "paste" those fields to that table

        Eh... just copy-and-paste the ALTER TABLE statement and modify as needed.

        sfullman wrote:

        * click on a field with non-normalized values (e.g. Pending, inactive, active, closed), and from that, create a lookup table named _____, where a list of the current values comes up and I assign integer values to the names, and the table gets updated

        I can't really think of any one-click solution to this other than doing exactly what you said (SELECT all distinct values for that column, INSERT those into a new table with an AUTO_INCREMENT field, ALTER TABLE to add a new indexed/foreign key indexed/whatever table, etc. etc.).

        If you can't find an editor that does all of that for you automagically, then you could probably write your own stored procedure that does all of that.

        sfullman wrote:

        * move a field up or down in a table

        Doesn't make much sense - see dagon's response. Is there a particular reason you'd ever want to do this?

        sfullman wrote:

        * synchronize two tables so that fields missing in one are put in the other (and vice versa), but respecting char lengths if the modified table's field has longer data

        So the end result would be two nearly identical tables? Not only does this seem like bad DB design/normalization/etc. etc., but I can't really think of why (or how) one might make this a usable feature.

        sfullman wrote:

        * find all tables with more than n records

        Again, using the information_schema DB this would be quite easy to do. Note, however, that for InnoDB tables you're only going to get an approximation (unless you do something really nasty like loop through every row in an InnoDB table and count them) which can vary quite a bit when 'n' becomes sufficiently large.

        sfullman wrote:

        * etc. - basically, cool stuff..

        Ah, finally I get to suggest the editor I know will never let me down: the MySQL CLI client that's bundled with MySQL server. :p

          Phpmyadmin is open source and has some allowance for contribution by developers. If you need some feature in it, make it.

          And like others have noted phpmyadmin can do some of what you are wanting.

            Write a Reply...