Mac环境下 本地安装配置 phpMyAdmin

1:首先到 http://www.phpmyadmin.net  下载版本;

2:下载完毕后,解压到 web 目录;//如:参考(/Library/WebServer/Documents/phpMyAdmin)

3:在phpMyAdmin目录下 创建 config.inc.php 文件

4:在 config.inc.php 中添加一下代码 

/*
* Generated configuration file
* Generated by: phpMyAdmin 4.4.10 setup script
* Date: Fri, 18 Mar 2016 02:57:51 +0000
*/

/* Servers configuration */
$i = 0;

/* Server: phpserver [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'phpserver';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = 3306;
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';

/* End of servers configuration */

$cfg['blowfish_secret'] = '56eb6e991b1721.23231012';
$cfg['DefaultLang'] = 'en';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>

 

注意:代码中的 user 和 password 为数据库 mysql 的用户名和密码;需要按照自己的情况,酌情修改;

5:完成后再浏览器中打开地址:http://localhost/phpmyadmin/index.php 输入数据库用户名和密码

 

转载于:https://www.cnblogs.com/adolph007/p/5291359.html

你可能感兴趣的:(Mac环境下 本地安装配置 phpMyAdmin)