Mudanças entre as edições de "Phpmyadmin"

De WikiLICC
Ir para: navegação, pesquisa
(Criou página com 'Para habilitar designer no phpmyadmin siga: * http://foundationphp.com/tutorials/pma_config.php')
 
m (Reload the configuration)
 
(6 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
 
Para habilitar designer no phpmyadmin siga:
 
Para habilitar designer no phpmyadmin siga:
 
* http://foundationphp.com/tutorials/pma_config.php
 
* http://foundationphp.com/tutorials/pma_config.php
 +
 +
==Importing the phpmyadmin database==
 +
 +
* Launch phpMyAdmin, make sure the home screen is selected, and click the Import tab.
 +
* Click the Browse and select /usr/share/phpMyAdmin/sql/create_tables.sql.
 +
 +
==Creating the pma user account==
 +
 +
phpMyAdmin requires a dedicated user account for the phpmyadmin database.
 +
* Click the Users tab
 +
* Click Add user.
 +
* Use
 +
  User name: pma
 +
  Host: localhost
 +
  Password: secret (choose your own password)
 +
* Click Go to create the user account.
 +
 +
==Setting the permissions for the pma account==
 +
 +
* Click the SQL tab at the top of the phpMyAdmin screen.
 +
 +
* Copy the following series of SQL queries, and paste them into the SQL field in phpMyAdmin.
 +
    GRANT USAGE ON mysql.* TO 'pma'@'localhost';
 +
    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';
 +
    GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost';
 +
 +
* Click Go to execute the queries.
 +
 +
== Update the phpMyAdmin configuration file ==
 +
 +
Edit the file /etc/config.inc.php
 +
 +
* adding or editing the following
 +
    <?php
 +
 
 +
    $cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
 +
 
 +
    $i = 0;
 +
 
 +
    $i++;
 +
    /* Authentication type */
 +
    $cfg['Servers'][$i]['auth_type'] = 'config';
 +
    $cfg['Servers'][$i]['user'] = 'root';
 +
    $cfg['Servers'][$i]['password'] = 'root';                  //  <=======
 +
    /* Server parameters */
 +
    $cfg['Servers'][$i]['host'] = 'localhost';
 +
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
 +
    $cfg['Servers'][$i]['compress'] = false;
 +
    /* Select mysql if your server does not have mysqli */
 +
    $cfg['Servers'][$i]['extension'] = 'mysqli';
 +
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
 +
 
 +
    /*
 +
    * phpMyAdmin configuration storage settings.
 +
    */
 +
 
 +
    /* User account for configuration storage */
 +
    $cfg['Servers'][$i]['controluser'] = 'pma';
 +
    $cfg['Servers'][$i]['controlpass'] = 'SENHA_DO_USER_pma';    //  <=======
 +
 
 +
    /* Storage database and tables */
 +
    $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]['table_uiprefs'] = 'pma__table_uiprefs';
 +
    $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
 +
    $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
 +
    $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
 +
    $cfg['Servers'][$i]['recent'] = 'pma__recent';
 +
    $cfg['Servers'][$i]['users'] = 'pma__users';
 +
    $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
 +
    $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
 +
 
 +
    ?>
 +
To enable Designer tab WHEN clicking a database,
 +
    $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
 +
 +
The preceding script uses the MAMP default root password for MySQL (root):
 +
    $cfg['Servers'][$i]['password'] = 'SENHA_ROOT_DO_MYSQL';
 +
 +
It also uses secret as the password for the pma user account:
 +
    $cfg['Servers'][$i]['controlpass'] = 'SENHA_DO USER_pma';
 +
 +
==Reload the configuration==
 +
 +
Before the changes take effect, you need to reload the MySQL privileges and the phpMyAdmin configuration. The simple way to do this is to stop MySQL and restart the server. Then close your browser, and relaunch phpMyAdmin. You should now have access to the advanced features of phpMyAdmin.
 +
 +
Maybe, clear the cache too.

Edição atual tal como às 01h50min de 13 de setembro de 2015

Para habilitar designer no phpmyadmin siga:

Importing the phpmyadmin database

  • Launch phpMyAdmin, make sure the home screen is selected, and click the Import tab.
  • Click the Browse and select /usr/share/phpMyAdmin/sql/create_tables.sql.

Creating the pma user account

phpMyAdmin requires a dedicated user account for the phpmyadmin database.

  • Click the Users tab
  • Click Add user.
  • Use
 User name: pma
 Host: localhost
 Password: secret (choose your own password)
  • Click Go to create the user account.

Setting the permissions for the pma account

  • Click the SQL tab at the top of the phpMyAdmin screen.
  • Copy the following series of SQL queries, and paste them into the SQL field in phpMyAdmin.
   GRANT USAGE ON mysql.* TO 'pma'@'localhost';
   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';
   GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost';
  • Click Go to execute the queries.

Update the phpMyAdmin configuration file

Edit the file /etc/config.inc.php

  • adding or editing the following
   <?php
 
   $cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
 
   $i = 0;
 
   $i++;
   /* Authentication type */
   $cfg['Servers'][$i]['auth_type'] = 'config';
   $cfg['Servers'][$i]['user'] = 'root';
   $cfg['Servers'][$i]['password'] = 'root';                  //  <=======
   /* Server parameters */
   $cfg['Servers'][$i]['host'] = 'localhost';
   $cfg['Servers'][$i]['connect_type'] = 'tcp';
   $cfg['Servers'][$i]['compress'] = false;
   /* Select mysql if your server does not have mysqli */
   $cfg['Servers'][$i]['extension'] = 'mysqli';
   $cfg['Servers'][$i]['AllowNoPassword'] = false;
 
   /*
    * phpMyAdmin configuration storage settings.
    */
 
   /* User account for configuration storage */
   $cfg['Servers'][$i]['controluser'] = 'pma';
   $cfg['Servers'][$i]['controlpass'] = 'SENHA_DO_USER_pma';    //  <=======
 
   /* Storage database and tables */
   $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]['table_uiprefs'] = 'pma__table_uiprefs';
   $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
   $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
   $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
   $cfg['Servers'][$i]['recent'] = 'pma__recent';
   $cfg['Servers'][$i]['users'] = 'pma__users';
   $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
   $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
 
   ?>

To enable Designer tab WHEN clicking a database,

   $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

The preceding script uses the MAMP default root password for MySQL (root):

   $cfg['Servers'][$i]['password'] = 'SENHA_ROOT_DO_MYSQL';

It also uses secret as the password for the pma user account:

   $cfg['Servers'][$i]['controlpass'] = 'SENHA_DO USER_pma';

Reload the configuration

Before the changes take effect, you need to reload the MySQL privileges and the phpMyAdmin configuration. The simple way to do this is to stop MySQL and restart the server. Then close your browser, and relaunch phpMyAdmin. You should now have access to the advanced features of phpMyAdmin.

Maybe, clear the cache too.