phpMyAdmin的装配配置

WBOY
Release: 2016-06-13 13:25:34
Original
771 people have browsed it

phpMyAdmin的安装配置

phpMyAdmin的安装配置

?

(针对Debian系统)?

?

第一步:安装php5和Apache2

?

apt-get install php5

apt-get install Apache2

apt-get install php5-mysql

?

?

第二步:修改配置文件

?

修改“DocumentRoot”,修改文件: vi /etc/apache2/sites-available/default

?

第三步:下载phpMyAdmin软件

?

把文件上传到? DocumentRoot 下,改为 pma

?

?

?

最后:过程中遇到的问题解决方法

?

?

1)?缺少mysqli 扩展.请检查PHP配置

?

  

????? 在php.ini(/etc/php5/apache2/php.ini)中找到extension_dir = "./"修改为文件 mysqli.so 所在的目录。

?

  还需要修改mysql.default_port,参数,增加端口,及 host

?

2)?缺少mcrypt 扩展.请检查PHP配置

?

   apt-get install mcrypt* mhash*

?

  安装完成后重启apache2后便可。

?

3)登录时页面提示:#1045 #2002 无法登录 MySQL 服务器

?

  (1)首先说下phpmyadmin的安装
     a.解压放到网站的某个目录下,如mydb
     b.将config.sample.inc.php复制成config.inc.php


  (2)#2002 无法登录 MySQL 服务器
     出现这个错误,表示没有连接到数据库。修改config.inc.php文件,
     将$cfg['Servers'][$i]['host'] = 'localhost';
     改为$cfg['Servers'][$i]['host'] = '127.0.0.1';


  (3)#1045 无法登录 MySQL 服务器
     这个错误是因为密码或者用户名错误,但是为什么会密码错误呢?
     原来是因为我们修改了host,但数据库中root@127.0.0.1的密码默认是没有设置。
     修改数据库中root@127.0.0.1的密码.执行以下命令
     mysqladmin -h 127.0.0.1 -u root password 'yourpassword'

?

   

?4)#2013 无法登录 MySQL 服务器

?

   表示mysql服务器没有启动连接不上。(删除多余的my.cnf文件,如:/etc/mysql/my.cnf)

?

?

?

?

?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!