RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
phpmyadmin怎么配置

小编给大家分享一下phpmyadmin怎么配置,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!

创新互联建站专业为企业提供海原网站建设、海原做网站、海原网站设计、海原网站制作等企业网站建设、网页设计与制作、海原企业网站模板建站服务,十载海原做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

开启记录history的参数是以下这个,当设置为true后就能将用户操作的sql记录在配合pmyadmin的pma_history中
$cfg['QueryHistoryDB'] = 'true'; //enable phpmyadmin record user sql

点击(此处)折叠或打开

  1. /**

  2.  * Debian local configuration file

  3.  *

  4.  * This file overrides the settings made by phpMyAdmin interactive setup

  5.  * utility.

  6.  *

  7.  * For example configuration see

  8.  *   /usr/share/doc/phpmyadmin/examples/config.sample.inc.php

  9.  * or

  10.  *   /usr/share/doc/phpmyadmin/examples/config.manyhosts.inc.php

  11.  *

  12.  * NOTE: do not add security sensitive data to this file (like passwords)

  13.  * unless you really know what you're doing. If you do, any user that can

  14.  * run PHP or CGI on your webserver will be able to read them. If you still

  15.  * want to do this, make sure to properly secure the access to this file

  16.  * (also on the filesystem level).

  17.  */

  18. if (!function_exists('check_file_access')) {

  19.     function check_file_access($path)

  20.     {

  21.      if (is_readable($path)) {

  22.         return true;

  23.      } else {

  24.         error_log(

  25.          'phpmyadmin: Failed to load ' . $path

  26.          . ' Check group www-data has read access and open_basedir restrictions.'

  27.         );

  28.         return false;

  29.      }

  30.     }

  31. }

  32. // Load secret generated on postinst

  33. if (check_file_access('/var/lib/phpmyadmin/blowfish_secret.inc.php')) {

  34.     require('/var/lib/phpmyadmin/blowfish_secret.inc.php');

  35. }

  36. // Load autoconf local config

  37. if (check_file_access('/var/lib/phpmyadmin/config.inc.php')) {

  38.     require('/var/lib/phpmyadmin/config.inc.php');

  39. }

  40. /**

  41.  * Server(s) configuration

  42.  */

  43. $i = 0;

  44. // The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].

  45. // You can disable a server config entry by setting host to ''.

  46. $i++;

  47. /**

  48.  * Read configuration from dbconfig-common

  49.  * You can regenerate it using: dpkg-reconfigure -plow phpmyadmin

  50.  */

  51. if (check_file_access('/etc/phpmyadmin/config-db.php')) {

  52.     require('/etc/phpmyadmin/config-db.php');

  53. }

  54. /* Configure according to dbconfig-common if enabled */

  55. if (!empty($dbname)) {

  56.     /* Authentication type */

  57.     $cfg['Servers'][$i]['auth_type'] = 'cookie';

  58.     /* Server parameters */

  59.     if (empty($dbserver)) $dbserver = 'localhost';

  60.     $cfg['Servers'][$i]['host'] = $dbserver;

  61.     if (!empty($dbport) || $dbserver != 'localhost') {

  62.         $cfg['Servers'][$i]['connect_type'] = 'tcp';

  63.         $cfg['Servers'][$i]['port'] = $dbport;

  64.     }

  65.     //$cfg['Servers'][$i]['compress'] = false;

  66.     /* Select MySQLi if your server has it */

  67.     $cfg['Servers'][$i]['extension'] = 'mysqli';

  68.     /* Optional: User for advanced features */

  69.     $cfg['Servers'][$i]['controluser'] = $dbuser;

  70.     $cfg['Servers'][$i]['controlpass'] = $dbpass;

  71.     $cfg['QueryHistoryDB'] = 'true'; //enable phpmyadmin record user sql

  72.     //$cfg['QueryHistoryMax'] = '100'; //specify the amount of saved history sql

  73.     // Allow connection to server name ending with -mysql:

  74.     $cfg['ArbitraryServerRegexp'] = '@^[^:]\-mysql$@';

  75.     /* Optional: Advanced phpMyAdmin features */

  76.     $cfg['Servers'][$i]['pmadb'] = $dbname;

  77.     $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';

  78.     $cfg['Servers'][$i]['relation'] = 'pma__relation';

  79.     $cfg['Servers'][$i]['table_info'] = 'pma__table_info';

  80.     $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';

  81.     $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';

  82.     $cfg['Servers'][$i]['column_info'] = 'pma__column_info';

  83.     $cfg['Servers'][$i]['history'] = 'pma__history';

  84.     $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';

  85.     $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';

  86.     $cfg['Servers'][$i]['tracking'] = 'pma__tracking';

  87.     $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';

  88.     $cfg['Servers'][$i]['recent'] = 'pma__recent';

  89.     

  90.     /* Uncomment the following to enable logging in to passwordless accounts,

  91.      * after taking note of the associated security risks. */

  92.     // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

  93.     /* Advance to next server for rest of config */

  94.     $i++;

  95. }

  96. /* Server: XXXXXX.com,1234 [1] */

  97. $i++;

  98. $cfg['Servers'][$i]['verbose'] = 'XXXXXX.com,1234';

  99. $cfg['Servers'][$i]['host'] = 'XXXXXX.com';

  100. $cfg['Servers'][$i]['port'] = 1234;

  101. $cfg['Servers'][$i]['socket'] = '';

  102. $cfg['Servers'][$i]['connect_type'] = 'tcp';

  103. $cfg['Servers'][$i]['extension'] = 'mysql';

  104. $cfg['Servers'][$i]['auth_type'] = 'cookie';

  105. $cfg['Servers'][$i]['user'] = '';

  106. $cfg['Servers'][$i]['password'] = '';

  107. $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';

  108. $cfg['Servers'][$i]['controluser'] = 'pma';

  109. $cfg['Servers'][$i]['controlpass'] = 'pmapassword';

  110. $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';

  111. $cfg['Servers'][$i]['relation'] = 'pma__relation';

  112. $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';

  113. $cfg['Servers'][$i]['table_info'] = 'pma__table_info';

  114. $cfg['Servers'][$i]['column_info'] = 'pma__column_info';

  115. $cfg['Servers'][$i]['history'] = 'pma__history';

  116. $cfg['Servers'][$i]['recent'] = 'pma__recent';

  117. $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';

  118. $cfg['Servers'][$i]['tracking'] = 'pma__tracking';

  119. $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';

  120. $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';

  121. $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';

  122. $cfg['Servers'][$i]['tracking_version_auto_create'] = true;

  123. $cfg['QueryHistoryDB'] = 'true'; //enable phpmyadmin record user sql

  124. //$cfg['QueryHistoryMax'] = '100'; //specify the amount of saved history sql

  125. /* End of servers configuration */

  126. /* Authentication type */

  127. //$cfg['Servers'][$i]['auth_type'] = 'cookie';

  128. /* Server parameters */

  129. //$cfg['Servers'][$i]['host'] = 'localhost';

  130. //$cfg['Servers'][$i]['connect_type'] = 'tcp';

  131. //$cfg['Servers'][$i]['compress'] = false;

  132. /* Select mysqli if your server has it */

  133. //$cfg['Servers'][$i]['extension'] = 'mysql';

  134. /* Optional: User for advanced features */

  135. // $cfg['Servers'][$i]['controluser'] = 'pma';

  136. // $cfg['Servers'][$i]['controlpass'] = 'pmapass';

  137. /* Storage database and tables */

  138. // $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';

  139. // $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';

  140. // $cfg['Servers'][$i]['relation'] = 'pma_relation';

  141. // $cfg['Servers'][$i]['table_info'] = 'pma_table_info';

  142. // $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';

  143. // $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';

  144. // $cfg['Servers'][$i]['column_info'] = 'pma_column_info';

  145. // $cfg['Servers'][$i]['history'] = 'pma_history';

  146. // $cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

  147. // $cfg['Servers'][$i]['tracking'] = 'pma_tracking';

  148. // $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

  149. // $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';

  150. // $cfg['Servers'][$i]['recent'] = 'pma_recent';

  151. /* Uncomment the following to enable logging in to passwordless accounts,

  152.  * after taking note of the associated security risks. */

  153. // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

  154. /*

  155.  * End of servers configuration

  156.  */

  157. /*

  158.  * Directories for saving/loading files from server

  159.  */

  160. $cfg['UploadDir'] = '';

  161. $cfg['SaveDir'] = '';

  162. /* Support additional configurations */

  163. foreach (glob('/etc/phpmyadmin/conf.d/*.php') as $filename)

  164. {

  165.     include($filename);

  166. }

  167. /* Display warning on main page if the MySQL library and server version is diff */

  168. $cfg['ServerLibraryDifference_DisableWarning'] = 'true';

看完了这篇文章,相信你对“phpmyadmin怎么配置”有了一定的了解,如果想了解更多相关知识,欢迎关注创新互联行业资讯频道,感谢各位的阅读!


分享名称:phpmyadmin怎么配置
本文网址:http://lswzjz.com/article/gdsgps.html