phpmyadmin安装常见问题

来源:互联网 发布:mac 中文输入法 编辑:程序博客网 时间:2024/05/22 02:12

常见FAQ

 

1、  Phpmyadmin错误提示:“无法加载 mcrypt扩展,请检查您的 PHP配置

下载:wget http://www.atomicorp.com/installers/atomic

执行:sh ./atomic

安装:yum installphp-mcrypt libmcrypt libmcrypt-devel

重启系统:shutdown-r now

重新编译php:

#./configure--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql  --with-mcrypt=/usr/local/include

# make

# make install

 

2、  Phpmyadmin错误提示:“没有找到 PHP扩展 mbstring,而您现在好像在使用多字节字符集。没有mbstring扩展的 phpMyAdmin 不能正确分割字符串,可能产生意想不到的结果

解决方法:添加--enable-mbstring,重新执行

#./configure--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql  --with-mcrypt=/usr/local/include--enable-mbstring

#make

#make install

3、  phpmyadmin提示:“错误 缺少 mysqli扩展。请检查 PHP 配置

源码安装mysql的解决方法,重新按下面提示编译:

#./configure--with-apxs2=/usr/local/apache2/bin/apxs  --with-mcrypt=/usr/local/include --enable-mbstring--with-mysql=/usr/local/mysql --with-mysqli=mysqlnd--with-pdo-mysql=mysqlnd

重新编译php,make,make install

此时可能会遇见,编译错误提示:

configure:error: Cannot find MySQL header files under yes.

Notethat the MySQL client library is not bundled anymore

 

原因是:找不到mysql.h。

通过find / -namemysql.h命令找出mysql具体位置,修改--with-mysql=/usr/local/mysql

重新编译

 

更多官方参考资料:

http://www.php.net/manual/en/mysqli.installation.php

 

4、  Phpmyadmin错误提示:”phpMyAdmin 高级功能未全部设置,部分功能不可用。要查出原因请点这里

解决方法

1、在mysql中创建名为phpmyadmin的数据库。

2、将phpmyadmin安装目录下的examples/create_tables.sql导入这个数据库。

3、在当前连接的mysql服务器中创建mysql用户并赋予权限。如下:

 

GRANT USAGE ON mysql.* TO 'mysqladmin'@'192.168.1.100'IDENTIFIED BY 'mysqladmin690';

GRANT SELECT (

   Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,

   Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,

   File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,

   Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,

   Execute_priv, Repl_slave_priv, Repl_client_priv

   ) ON mysql.user TO 'mysqladmin'@'192.168.1.100';

GRANT SELECT ON mysql.db TO 'mysqladmin'@'192.168.1.100';

GRANT SELECT ON mysql.host TO 'mysqladmin'@'192.168.1.100';

GRANT SELECT (Host, Db, User, Table_name,Table_priv, Column_priv)

   ON mysql.tables_priv TO 'mysqladmin'@'192.168.1.100';

 

 

GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost';

 

4、修改libraries中的config.default.php文件,内容如下(查找关键词并修改):

$cfg['Servers'][$i]['controluser'] ='username';//改为mysql的用户名

$cfg['Servers'][$i]['controlpass'] ='password';//改为mysql的密码

$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';

$cfg['Servers'][$i]['recent'] = 'pma_recent';

$cfg['Servers'][$i]['table_uiprefs'] ='pma_table_uiprefs';

$cfg['Servers'][$i]['tracking'] ='pma_tracking';

$cfg['Servers'][$i]['userconfig']= 'pma_userconfig';

 

 

如果配置连接多台mysql服务器,可以通过phpmyadmin的下面这个页面设置:

http://192.168.1.100:8080/admin/setup/index.php

 

然后下载文件config.inc.php,放在phpmyadmin的根目录

 

 

注:多台服务器创建的mysql用户应该一致才能共同使用上面配置