0

Is there a way to export a database to text in phpMyAdmin without the DEFINER and other clauses that show my admin user name and IP? Thanks.

posfan12
  • 2,541
  • 8
  • 35
  • 57

1 Answers1

1

I had a look at the source code of phpMyAdmin - turns out it simply takes the output of a SHOW CREATE TABLE query, which unfortunately comes with the DEFINER and other clauses. One example in the pma source, in the method PMA_getTableDef():

$result = PMA_DBI_try_query('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table));

In other words can't remove them through phpMyAdmin but there's plenty of command line tools that can help you remove them, such as answered here: Remove DEFINER clause from MySQL Dumps

Tyron
  • 1,938
  • 11
  • 30