How to Enable phpMyAdmin Designer Mode

Standard
  1. Create a control user named pma – replace pmapass below with a good password, then copy and paste the SQL into the SQL form field on phpMyAdmin
GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
GRANT SELECT (
 Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
 Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
 File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
 Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
 Execute_priv, Repl_slave_priv, Repl_client_priv
 ) ON mysql.user TO 'pma'@'localhost';
GRANT SELECT ON mysql.db TO 'pma'@'localhost';
GRANT SELECT ON mysql.host TO 'pma'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
 ON mysql.tables_priv TO 'pma'@'localhost';
    1. Create the table structure (and phpmyadmin global db)– You will find a create_tables.sql file via ls in the path to your phpmyadmin scripts. For CentOS, this is @ /usr/local/cpanel/base/3rdparty/phpMyAdmin/examples Execute this sql, or copy and paste it and put it in the SQL form field in phpMyAdmin.
    2. Enable usage of db phpmyadmin in config.inc.php Replace pmapass below with the password of the pma user you created above. You can use vi (for example) to edit this file. i to insert, delete button to delete, :wq to save and quit
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
    1. If design is not active run this sql as root:
grant select on table `phpmyadmin`.`pma__bookmark` to pma;
grant insert on table `phpmyadmin`.`pma__bookmark` to pma;
grant update on table `phpmyadmin`.`pma__bookmark` to pma;
grant delete on table `phpmyadmin`.`pma__bookmark` to pma;

grant select on table `phpmyadmin`.`pma__column_info` to pma;
grant insert on table `phpmyadmin`.`pma__column_info` to pma;
grant update on table `phpmyadmin`.`pma__column_info` to pma;
grant delete on table `phpmyadmin`.`pma__column_info` to pma;

grant select on table `phpmyadmin`.`pma__designer_coords` to pma;
grant insert on table `phpmyadmin`.`pma__designer_coords` to pma;
grant update on table `phpmyadmin`.`pma__designer_coords` to pma;
grant delete on table `phpmyadmin`.`pma__designer_coords` to pma;

grant select on table `phpmyadmin`.`pma__history` to pma;
grant insert on table `phpmyadmin`.`pma__history` to pma;
grant update on table `phpmyadmin`.`pma__history` to pma;
grant delete on table `phpmyadmin`.`pma__history` to pma;

grant select on table `phpmyadmin`.`pma__pdf_pages` to pma;
grant insert on table `phpmyadmin`.`pma__pdf_pages` to pma;
grant update on table `phpmyadmin`.`pma__pdf_pages` to pma;
grant delete on table `phpmyadmin`.`pma__pdf_pages` to pma;

grant select on table `phpmyadmin`.`pma__recent` to pma;
grant insert on table `phpmyadmin`.`pma__recent` to pma;
grant update on table `phpmyadmin`.`pma__recent` to pma;
grant delete on table `phpmyadmin`.`pma__recent` to pma;

grant select on table `phpmyadmin`.`pma__relation` to pma;
grant insert on table `phpmyadmin`.`pma__relation` to pma;
grant update on table `phpmyadmin`.`pma__relation` to pma;
grant delete on table `phpmyadmin`.`pma__relation` to pma;

grant select on table `phpmyadmin`.`pma__table_coords` to pma;
grant insert on table `phpmyadmin`.`pma__table_coords` to pma;
grant update on table `phpmyadmin`.`pma__table_coords` to pma;
grant delete on table `phpmyadmin`.`pma__table_coords` to pma;

grant select on table `phpmyadmin`.`pma__table_info` to pma;
grant insert on table `phpmyadmin`.`pma__table_info` to pma;
grant update on table `phpmyadmin`.`pma__table_info` to pma;
grant delete on table `phpmyadmin`.`pma__table_info` to pma;

grant select on table `phpmyadmin`.`pma__table_uiprefs` to pma;
grant insert on table `phpmyadmin`.`pma__table_uiprefs` to pma;
grant update on table `phpmyadmin`.`pma__table_uiprefs` to pma;
grant delete on table `phpmyadmin`.`pma__table_uiprefs` to pma;

grant select on table `phpmyadmin`.`pma__tracking` to pma;
grant insert on table `phpmyadmin`.`pma__tracking` to pma;
grant update on table `phpmyadmin`.`pma__tracking` to pma;
grant delete on table `phpmyadmin`.`pma__tracking` to pma;

grant select on table `phpmyadmin`.`pma__userconfig` to pma;
grant insert on table `phpmyadmin`.`pma__userconfig` to pma;
grant update on table `phpmyadmin`.`pma__userconfig` to pma;
grant delete on table `phpmyadmin`.`pma__userconfig` to pma;

One thought on “How to Enable phpMyAdmin Designer Mode

Leave a Reply

Your email address will not be published. Required fields are marked *