📄 documentation.txt
字号:
under the $cfg['Servers'][$i]['controluser']& $cfg['Servers'][$i] ['controlpass'] settings. The following example assumes you want to use pma as the controluser and pmapass as the controlpass, but this is only an example: use something else in your file! Of course you have to replace localhost by the webserver's host if it's not the same as the MySQL server's one. 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'; If you are using an old MySQL version (below 4.0.2), please replace the first GRANT SELECT query by this one: 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 ) ON mysql.user TO 'pma'@'localhost'; ... and if you want to use the many new relation and bookmark features: GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost'; (this of course requires that your linked-tables infrastructure be set up). Of course, the above queries only work if your MySQL version supports the GRANT command. This is the case since 3.22.11. * Then each of the true users should be granted a set of privileges on a set of particular databases. Normally you shouldn't give global privileges to an ordinary user, unless you understand the impact of those privileges (for example, you are creating a superuser). For example, to grant the user real_user with all privileges on the database user_base: GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password'; What the user may now do is controlled entirely by the MySQL user management system. With HTTP or cookie authentication mode, you don't need to fill the user/ password fields inside the $cfg['Servers'] array.'http' authentication mode * Was called 'advanced' in versions before 2.2.3. * Introduced in 1.3.0, it uses Basic HTTP authentication method and allows you to login as any valid MySQL user. * Is supported with most PHP configurations. For IIS (ISAPI) support using CGI PHP see FAQ 1.32, for using with Apache CGI see FAQ 1.35. * See also FAQ 4.4 about not using the .htaccess mechanism along with 'http' authentication mode.'cookie' authentication mode * You can use this method as a replacement for the HTTP authentication (for example, if you're running IIS). * Obviously, the user must enable cookies in the browser. * With this mode, the user can truly logout of phpMyAdmin and login back with the same username. * If you want to login to arbitrary server see $cfg['AllowArbitraryServer'] directive. * As mentioned in the requirements section, having the mcrypt extension will speed up access considerably, but is not required.'config' authentication mode * This mode is the less secure one because it requires you to fill the $cfg ['Servers'][$i]['user'] and $cfg['Servers'][$i]['password'] fields (and as a result, anyone who can read your config.inc.php can discover your username and password). But you don't need to setup a "controluser" here: using the $cfg['Servers'] [$i]['only_db'] might be enough. * In the ISP FAQ section, there is an entry explaining how to protect your configuration file. * For additional security in this mode, you may wish to consider the Host authentication $cfg['Servers'][$i]['AllowDeny']['order'] and $cfg ['Servers'][$i]['AllowDeny']['rules'] configuration directives.ConfigurationWarning for Mac users: PHP does not seem to like Mac end of lines character ("\r"). So ensure you choose the option that allows to use the *nix end of linecharacter ("\n") in your text editor before saving a script you have modified.Configuration note: Almost all configurable data is placed in config.inc.php.If this file does not exist, please refer to the Quick install section tocreate one. This file only needs to contain the parameters you want to changefrom their corresponding default value in libraries/config.default.php.The parameters which relate to design (like colors) are placed in themes/themename/layout.inc.php. You might also want to create config.footer.inc.phpand config.header.inc.php files to add your site specific code to be includedon start and end of each page.$cfg[PmaAbsoluteUri] string Sets here the complete URL (with full path) to your phpMyAdmin installation's directory. E.g. http://www.your_web.net/ path_to_your_phpMyAdmin_directory/. Note also that the URL on some web servers are case?sensitive. Don?t forget the trailing slash at the end. Starting with version 2.3.0, it is advisable to try leaving this blank. In most cases phpMyAdmin automatically detects the proper setting. Users of port forwarding will need to set PmaAbsoluteUri (more info). A good test is to browse a table, edit a row and save it. There should be an error message if phpMyAdmin is having trouble auto?detecting the correct value. If you get an error that this must be set or if the autodetect code fails to detect your path, please post a bug report on our bug tracker so we can improve the code.$cfg[PmaNoRelation_DisableWarning] boolean Starting with version 2.3.0 phpMyAdmin offers a lot of features to work with master / foreign - tables (see $cfg['Servers'][$i]['pmadb']). If you tried to set this up and it does not work for you, have a look on the "Structure" page of one database where you would like to use it. You will find a link that will analyze why those features have been disabled. If you do not want to use those features set this variable to TRUE to stop this message from appearing.$cfg[blowfish_secret] string Starting with version 2.5.2, the 'cookie' auth_type uses blowfish algorithm to encrypt the password. If you are using the 'cookie' auth_type, enter here a random passphrase of your choice. It will be used internally by the blowfish algorithm: you won't be prompted for this passphrase. The maximum number of characters for this parameter seems to be 46.$cfg[Servers] array Since version 1.4.2, phpMyAdmin supports the administration of multiple MySQL servers. Therefore, a $cfg['Servers']-array has been added which contains the login information for the different servers. The first $cfg ['Servers'][$i]['host'] contains the hostname of the first server, the second $cfg['Servers'][$i]['host'] the hostname of the second server, etc. In libraries/config.default.php, there is only one section for server definition, however you can put as many as you need in config.inc.php, copy that block or needed parts (you don't have to define all settings, just those you need to change).$cfg['Servers'][$i]['host'] string The hostname or IP address of your $i-th MySQL-server. E.g. localhost.$cfg['Servers'][$i]['port'] string The port-number of your $i-th MySQL-server. Default is 3306 (leave blank). If you use "localhost" as the hostname, MySQL ignores this port number and connects with the socket, so if you want to connect to a port different from the default port, use "127.0.0.1" or the real hostname in $cfg ['Servers'][$i]['host'].$cfg['Servers'][$i]['socket'] string The path to the socket to use. Leave blank for default.$cfg['Servers'][$i]['connect_type'] string What type connection to use with the MySQL server. Your options are 'socket' & 'tcp'. It defaults to 'tcp' as that is nearly guaranteed to be available on all MySQL servers, while sockets are not supported on some platforms. To use the socket mode, your MySQL server must be on the same machine as the Web server.$cfg['Servers'][$i]['extension'] string What php MySQL extension to use for the connection. Valid options are: mysql : The classic MySQL extension. This is the recommended and default method at this time. mysqli : The improved MySQL extension. This extension became available with php 5.0.0 and is the recommended way to connect to a server running MySQL 4.1.x.$cfg['Servers'][$i]['compress'] boolean Whether to use a compressed protocol for the MySQL server connection or not (experimental). This feature requires PHP >= 4.3.0.$cfg['Servers'][$i]['controluser'] string $cfg['Servers'][$i]['controlpass'] string This special account is used for 2 distinct purposes: to make possible all relational features (see $cfg['Servers'][$i]['pmadb']) and, for a MySQL server older than 4.1.2 or running with --skip-show-database, to enable a multi-user installation (http or cookie authentication mode). When using HTTP or cookie authentication modes (or 'config' authentication mode since phpMyAdmin 2.2.1), you need to supply the details of a MySQL account that has SELECT privilege on the mysql.user (all columns except "Password"), mysql.db (all columns) & mysql.tables_priv (all columns except "Grantor" & "Timestamp") tables. This account is used to check what databases the user will see at login. Please see the install section on "Using authentication modes" for more information. In phpMyAdmin versions before 2.2.5, those were called "stduser/stdpass".$cfg['Servers'][$i]['auth_type'] string ['http'|'cookie'|'config'] Whether config or cookie or http authentication should be used for this server. + 'config' authentication ($auth_type = 'config') is the plain old way: username and password are stored in config.inc.php. + 'cookie' authentication mode ($auth_type = 'cookie') as introduced in 2.2.3 allows you to log in as any valid MySQL user with the help of cookies. Username and password are stored in cookies during the session and password is deleted when it ends. This can also allow you to login in arbitrary server if $cfg['AllowArbitraryServer'] enabled. + 'http' authentication (was called 'advanced' in older versions) ($auth_type = 'http') as introduced in 1.3.0 allows you to log in as any valid MySQL user via HTTP-Auth. Please see the install section on "Using authentication modes" for more information.$cfg['Servers'][$i]['user'] string $cfg['Servers'][$i]['password'] string When using auth_type = 'config', this is the user/password-pair which phpMyAdmin will use to connect to the MySQL server. This user/password pair is not needed when HTTP or cookie authentication is used and should be empty.$cfg['Servers'][$i]['only_db'] string or array If set to a (an array of) database name(s), only this (these) database(s) will be shown to the user. Since phpMyAdmin 2.2.1, this/these database(s) name(s) may contain MySQL wildcards characters ("_" and "%"): if you want to use literal instances of these characters, escape them (I.E. use 'my\ _db' and not 'my_db'). This setting is an efficient way to lower the server load since the latter does not need to send MySQL requests to build the available database list. But it does not replace the privileges rules of the MySQL database server. If set, it just means only these databases will be displayed but not that all other databases can't be used. An example of using more that one database: $cfg['Servers'][$i]['only_db'] = array('db1', 'db2'); As of phpMyAdmin 2.5.5 the order inside the array is used for sorting the databases in the left frame, so that you can individually arrange your databases. If you want to have certain databases at the top, but don't care about the others, you do not need to specify all other databases. Use: $cfg ['Servers'][$i]['only_db'] = array('db3', 'db4', '*'); instead to tell phpMyAdmin that it should display db3 and db4 on top, and the rest in alphabetic order.$cfg['Servers'][$i]['hide_db'] string Regular expression for hiding some databases. This only hides them from listing, but user is still able to access them.$cfg['Servers'][$i]['verbose'] string Only useful when using phpMyAdmin with multiple server entries. If set, this string will be displayed instead of the hostname in the pull-down menu on the main page. This can be useful if you want to show only certain databases on your system, for example.$cfg['Servers'][$i]['pmadb'] string The name of the database containing the linked-tables infrastructure. See the Linked-tables infrastructure section in this document to see the benefits of this infrastructure, and for a quick way of creating this database and the needed tables.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -