1,解压缩phpmyadmin4.2.8压缩包到/usr/local/phpMyAdmin

2,复制config.sample.inc.php为config.inc.php

3,修改nginx.conf 里

加入 include /usr/local/nginx/conf.d/*.conf; 这段,

http {
include mime.types;
default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on;
#tcp_nopush on; #keepalive_timeout ;
keepalive_timeout ; gzip on;
include /usr/local/nginx/conf.d/*.conf;

新建conf.d文件夹

新建phpmyadmin.conf如下

server {
listen ;
server_name localhost;
access_log /usr/local/nginx/phpmyadmin-access.log main; location / {
root /usr/local/phpMyAdmin;
index index.php;
} location ~ \.php$ {
root /usr/local/phpMyAdmin;
fastcgi_pass 127.0.0.1:;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
} location ~ /\.ht {
deny all;
}
}

4,config.inc.php修改为:

 * This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = '123456'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ /*
* Servers configuration
*/
$i = 0; /*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true; /*
* phpMyAdmin configuration storage settings.
*/ /* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = ''; /* 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]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'root';
$cfg['Servers'][$i]['password'] = '';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

  

最新文章

  1. 导出DBF,并且提供下载 [转]
  2. 关于union的那些事儿
  3. Python开发【第一篇】Python基础之函数递归
  4. CodeForces114E——Double Happiness(素数二次筛选)
  5. Python学习笔记一--字符串的使用
  6. UVa 11040 (水题) Add bricks in the wall
  7. C# Windows Sockets (Winsock) 接口 (转)
  8. hdu2489 Minimal Ratio Tree
  9. Mysql分页处理(PageHelper)
  10. 机器学习之AdaBoost原理与代码实现
  11. Sessions Hang on row cache lock
  12. samba及其基本应用
  13. lightoj 1074
  14. Linux查看线程
  15. DevOps - CI - Jenkins
  16. JS 创建自定义对象的方式方法
  17. C51中的关键字和ANSIC标准关键字
  18. Java Magic. Part 3: Finally
  19. 2. Get the codes from GIT
  20. Python2.7 - IMOOC - 4

热门文章

  1. requests SSLError: hostname 'ccc.xxx.com' doesn't match '*.b0.upaiyun.com'
  2. Go 安装 sqlite3驱动报错
  3. Spark数据分析-记录关联问题
  4. 关于IDEA每次修改HTML,Css等静态资源文件都需要重启的设置修改
  5. Django框架(二)
  6. iOS应该具备知识点
  7. 用python处理html代码的转义与还原
  8. 命令行听歌http://www.linuxsir.org/bbs/thread280142.html?pageon=1#1584689
  9. PB测款方法 店铺运费模板 设置
  10. Python *Mix_w