首页 > php教程 > php手册 > 正文

需要密码登录phpmyadmin设置方法

php中文网
发布: 2016-06-13 09:55:32
原创
1667人浏览过

找开config.inc.php教程

一、使用cookie授权模式 将'auth_type'改为'cookie',然后修改'blowfish_secret'用一个任意字符串作为cookie的加密字符串,如果没有加密钥匙,系统会显示"配置文件现在需要绝密的短语密码(blowfish_secret) " ,配置文件如下: $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['blowfish_secret'] = '44e2f5aece2855.93921574'; 修改完毕后,登录窗口入下
4
http授权模式的web登陆页面

二、使用config授权模式
   config需要这几个参数:
$cfg['Servers'][$i]['auth_type'] = 'config';  
//授权模式 $cfg['Servers'][$i]['user'] = 'root';        
//mysql教程登陆用户 $cfg['Servers'][$i]['password'] = '12345';   
//mysql登陆用户密码

将config.inc中,改成
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)?
注意,不是http 而是 cookie 哦!!!

三、用http授权模式
$cfg['Servers'][$i]['auth_type'] = 'http';

http授权模式的登陆窗口
注意事项:如果mysql服务器端采用了4.1以上版本,而客户端连接用的是mysql4.1一下版本,对用户设置密码时注意使用OLD_PASSWORD函数,举例:
mysql > SET PASSWORD = OLD_PASSWORD('12345')
mysql > /G
附录:(以下内容是自己写的)除了上述三种phpmyadmin自带的方法外,还可以使用apache的配置来限制登录,在phpmyadmin目录下放置一个.htaccess文件,指定使用的密码记录文 件。然后用htpasswd来生成密码保存在该密码记录文件中(文件的内容是加密的,使用方法htpasswd /etc/php_passwd username)。
    httpd.conf中的内容:phpmyadmin's directory"> AllowOverride AuthConfig
.htaccess文件的内容
authtype basic authuserfile /etc/php_passwd authname information require valid-user
我们可以看到/etc/php_passwd文件中的内容类似这样:
username:2Y2CD6nfJuwL6


更详细的教程

 打开phpMyAdmin中libraries文件找到config.default.php并打开.

  找到$cfg['servers'][$i]['user'] = ' ',在' '中加入'root'

  找到$cfg['servers'][$i]['password'] = ' ',在' '中加入'123456';

  这两个地方的修改就是加入刚才安装的Mysql的用户名和密码,读者可自行修改.

Shopxp购物系统Html版
Shopxp购物系统Html版

一个经过完善设计的经典网上购物系统,适用于各种服务器环境的高效网上购物系统解决方案,shopxp购物系统Html版是我们首次推出的免费购物系统源码,完整可用。我们的系统是免费的不需要购买,该系统经过全面测试完整可用,如果碰到问题,先检查一下本地的配置或到官方网站提交问题求助。 网站管理地址:http://你的网址/admin/login.asp 用户名:admin 密 码:admin 提示:如果您

Shopxp购物系统Html版 0
查看详情 Shopxp购物系统Html版

立即学习PHP免费学习笔记(深入)”;

 
这个是配置文件也要修改一下。
config.inc.php

/* $Id: config.sample.inc.php 9689 2006-11-10 20:05:49Z nijel $ */
// vim: expandtab sw=4 ts=4 sts=4:

/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use scripts/setup.php
*
* All directives are explained in Documentation.html and on phpMyAdmin
* wiki .
*/

/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'afafafaf'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = ''; //用户名
$cfg['Servers'][$i]['controlpass'] = '';//密码
/* Advanced phpMyAdmin features */
// $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';

/*
* End of servers configuration
*/

/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>

相关标签:
PHP速学教程(入门到精通)
PHP速学教程(入门到精通)

PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号