前提:apache2和mysql已经安装好
1、下载最新版本的phpmyadmin,解压到phpmyadmin
2、将phpmyadmin的权限设置为 drwxr-xr-x,移动到/usr/share/文件夹底下
3、在/var/www的底下新建一个连接
sudo ln -s /usr/share/phpmyadmin
4、在浏览器输入地址:http://localhost/phpmyadmin/
会提示root用户密码错误
5、点击页面上script setup
->add
->安装你的配置填写选项
->add
->选择config下的display,会显示你的配置代码
在phpmyadmin底下新建:config.inc.php
将代码拷贝到新建的文件中(之前的版本config.inc.php是在config文件夹底下)
6、如果现在启动phpmyadmin
会提示:wrong config file permision
需要修改文件的属性:sudo chmod -R 755 config.inc.php
下面是我的配置示例:
1、下载最新版本的phpmyadmin,解压到phpmyadmin
2、将phpmyadmin的权限设置为 drwxr-xr-x,移动到/usr/share/文件夹底下
3、在/var/www的底下新建一个连接
sudo ln -s /usr/share/phpmyadmin
4、在浏览器输入地址:http://localhost/phpmyadmin/
会提示root用户密码错误
5、点击页面上script setup
->add
->安装你的配置填写选项
->add
->选择config下的display,会显示你的配置代码
在phpmyadmin底下新建:config.inc.php
将代码拷贝到新建的文件中(之前的版本config.inc.php是在config文件夹底下)
6、如果现在启动phpmyadmin
会提示:wrong config file permision
需要修改文件的属性:sudo chmod -R 755 config.inc.php
下面是我的配置示例:
<?
php
/* $Id: config.sample.inc.php 9673 2006-11-03 09:05:54Z 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 <http://wiki.cihar.com>.
*/
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg [ ' blowfish_secret ' ] = '' ; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0 ;
/*
* First server
*/
$i ++ ;
/* Authentication type */
$cfg [ ' Servers ' ][ $i ][ ' auth_type ' ] = ' config ' ;
$cfg [ ' Servers ' ][ $i ][ ' user ' ] = ' root ' ; // MySQL user
$cfg [ ' Servers ' ][ $i ][ ' password ' ] = 'xxx ' ; // MySQL password (only needed
// with 'config' auth_type)
/* 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 ' ] = ' root ' ;
$cfg [ ' Servers ' ][ $i ][ ' controlpass ' ] = 'xxx ' ;
/* 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 ' ;
/*
* End of servers configuration
*/
/*
* Directories for saving/loading files from server
*/
$cfg [ ' UploadDir ' ] = '' ;
$cfg [ ' SaveDir ' ] = '' ;
?>
/* $Id: config.sample.inc.php 9673 2006-11-03 09:05:54Z 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 <http://wiki.cihar.com>.
*/
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg [ ' blowfish_secret ' ] = '' ; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0 ;
/*
* First server
*/
$i ++ ;
/* Authentication type */
$cfg [ ' Servers ' ][ $i ][ ' auth_type ' ] = ' config ' ;
$cfg [ ' Servers ' ][ $i ][ ' user ' ] = ' root ' ; // MySQL user
$cfg [ ' Servers ' ][ $i ][ ' password ' ] = 'xxx ' ; // MySQL password (only needed
// with 'config' auth_type)
/* 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 ' ] = ' root ' ;
$cfg [ ' Servers ' ][ $i ][ ' controlpass ' ] = 'xxx ' ;
/* 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 ' ;
/*
* End of servers configuration
*/
/*
* Directories for saving/loading files from server
*/
$cfg [ ' UploadDir ' ] = '' ;
$cfg [ ' SaveDir ' ] = '' ;
?>