PHPMyadmin 配置文件详解
PHPMyadmin 配置文件详解
PHPMyadmin 配置文件详解(配置)注意修改时注意缓存非常适合对数据库操作命令不熟悉的数据库管理者,下面我就说下怎么安装该工具:1.先到网上下载phpmyadmin,再解压到可以访问的web目录下(如果是虚拟空间,可以解压后通过ftp等上传到web目录下),当然您可以修改解压后该文件的名称。
2.配置config文件打开libraries下的config.default.php文件,依次找到下面各项,按照说明配置即可:A.访问网址引用:$cfg['PmaAbsoluteUri'] = '';这里填写phpmyadmin的访问网址B.mysql主机信息引用:$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address填写localhost或mysql所在服务器的ip地址,如果mysql和该phpmyadmin在同一服务器,则按默认localhost$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port mysql端口,如果是默认3306,保留为空即可C.mysql用户名和密码引用:$cfg['Servers'][$i]['user'] = 'root'; // MySQL user 访问phpmyadmin使用的mysql用户名fg['Servers'][$i]['password'] = ''; // MySQL password (only needed对应上述mysql 用户名的密码D.认证方法引用:$cfg['Servers'][$i]['auth_type'] = 'cookie';在此有四种模式可供选择,cookie,http,HTTP,configconfig方式即输入phpmyadmin的访问网址即可直接进入,无需输入用户名和密码,是不安全的,不推荐使用。
解决phpmyadmin上传文件大小限制的方法(简单,无需繁琐修改配置文件)
解决phpMyAdmin最大限制phpMyAdmin使用方便,已成为大多数站长的常用工具,对于小型网站来讲phpmyadmin已经绰绰有余了,但是对于中大型网站,在数据库较为庞大的时候,phpmyadmin就显得力不从心了!一般情况下,phpMyAdmin最大限制上传2M以内的文件,但是当网站运营一段时间后,即使把sql格式的数据库压缩成zip格式,想变成2M以内是不太现实的。
个人并不推荐使用phpMyAdmin来导入大数据库,因为大多数用户使用的是虚拟主机,很多文件没有服务器权限是无法修改的,而且phpmyadmin对大数据库的执行效率也非常低,容易出现错误。
导入大数据库的解决方案推荐使用BigDump工具来进行导入大数据库的操作,下载地址和使用方法见:用BigDump 工具导入超大MySQL数据库备份文件如果你很执着一定要用phpmyadmin来进行数据库导入操作,网络上虽然可以找到很多资料,但大多数都不全,只解决了一部分问题,所以我整理出了相对比较靠谱的方案,以下是我搜集的一些解决phpMyAdmin上传文件大小限制的方法方案一(简单)打开phpmyadmin下的配置文件config.inc.php查找$cfg['UploadDir'] = ”;$cfg['SaveDir'] = ”;给他们赋值$cfg['UploadDir'] = ‘upload’;$cfg['SaveDir'] = ‘save’;修改后如果提示“配置文件现在需要绝密的短语密码(blowfish_secret)。
”不用担心,问题解决方案/php/phpmyadmin-blowfish_secret.html然后在phpMyAdmin 的目录下创建两个空目录,upload 和save,并且把要导入的数据库文件(必须是sql格式,非zip格式)传送到upload 目录下。
phpMyadmin配置
在PHP网站开发中,最基本的PHP环境搭建涉及PHP、Apache/IIS、Mysql,对于数据库的管理,除了Mysql数据库自身提供了命令行工具方便开发人员管理数据库外,基于PHP 开发的phpmyadmin也是一个非常好用的Mysql数据库管理程序,在xampp等PHP环境配置安装程序中,phpmyadmin也是一个必备的PHP程序。
今天和大家分享如何安装、配置phpmyadmin。
phpmyadmin安装配置准备工作首先当然是下载phpmyadmin的安装包,提供两个phpmyadmin的下载地址:phpmyadmin 下载地址1,phpmyadmin下载地址2,地址1罗列了phpmyadmin2.x和phpmyadmin3.x,地址2只是最新的phpmyadmin版本。
我下载的是phpmyadmin3.3,在进行phpmyadmin3安装时需要的PHP环境至少为PHP5.2,Mysql5以上的版本。
如何进行PHP环境配置?phpmyadmin安装教程:如何安装phpmyadmin首先解压phpMyAdmin-3.3.3-rc1-all-languages.zip,然后重命名为phpmyadmin3,将其复制到php程序运行目录,我复制到D:\PHPWEB目录下。
在完成phpmyadmin3的这步安装步骤后,请确保你的IIS或者Apache服务器已开启,以及Mysql服务是否已开启,你可以在CMD模式下输入net start mysql开启Mysql数据库服务,同时请确保PHP已启用了Mysql的扩展库。
只要有一项没有开启,即可能导致phpmyadmin3打不开,访问出错。
至此phpmyadmin3的安装工作就算完成了,接下去就要进行phpmyadmin的配置工作。
phpmyadmin配置教程首先在游览器中输入phpmyadmin的远程访问地址:http://localhost/phpmyadmin3,出现如下界面phpmyadmin 远程访问配置用户名密码此界面说明:1、必须以cookies 方式登录,2、必须以合法用户名和密码进行远程登录,如果没有配置phpmyadmin 的用户名和密码,访问会被拒绝。
phpmyadmin教程(免费教程)说明书
Table of ContentsAbout1 Chapter 1: Getting started with phpmyadmin2 Remarks2 Versions2 Examples3 Installation or Setup3 How to create a database and grant privileges for database user.10 Credits14AboutYou can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: phpmyadminIt is an unofficial and free phpmyadmin ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official phpmyadmin.The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners.Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to ********************Chapter 1: Getting started with phpmyadmin RemarksphpMyAdmin is a free software used to manage MySQL databases via web interface. It is much easier than using MySQL console where the user must use commands to manage databases. By using phpMyAdmin, with a few mouse clicks people can create database and grant privileges for MySQL user for that database.Official documentationWikiVersionsExamplesInstallation or SetupDescription:phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement.Note 1: Many operating systems already include a phpMyAdmin package and will automatically keep it updated, however these versions are sometimes slightly outdated and therefore may be missing the latest features.Note 2: These method assumes that you have already setup a local web server with MySQL. Windows:Third Party Products:•The easiest way to get phpMyAdmin on Windows is using third party products which include phpMyAdmin together with a database and web server such as XAMPP(cross-platform).•List of Cross-Platform third party products:XAMPP, AMPPS, Zend Server Community EditionList of Windows Specific third party products:WampServer, EasyPHP Devserver, •Uniform Server, Bitnami WAMP Stack, WPN-XM Server Stack, WTServer, UwAmp, Vertrigo•Manual Installation :You can select any kit from given phpmyadmin kits.Example:For all languages choose some thing like phpMyAdmin-4.6.4-all-languages.7z or forlanguage specific choose something like phpMyAdmin-4.6.4-english.7zAfter Choosing a phpmyadmin kit extract the folder. Rename the extracted folder tophpMyAdmin it's easy to reference. Copy the extracted folder to your local web server'sdocument root. Depending on how you have configured your web server, this could be the www, htdocs, html, or public_html folder. If you are using IIS, open IIS Manager. In the left navigation tree, right-click on "Default Web Site" and select "Explore". Copy and paste the extracted phpMyAdmin folder into the location that opens.Linux distributionsNote: phpMyAdmin is included in most Linux distributions. It is recommended to use distribution packages when possible. They usually provide integration to your distribution and you will automatically get security updates from your distribution.•Third Party Products:XAMPP, TurnKey Linux LAMP stack, Bitnami LAMPStack,•Manual Installation::You can select any kit from given phpmyadmin kits.Example:For all languages choose some thing like phpMyAdmin-4.6.4-all-languages.7z or for language specific choose something like phpMyAdmin-4.6.4-english.7zAfter Choosing a phpmyadmin kit extract the folder. Rename the extracted folder to phpMyAdmin it's easy to reference. Copy the extracted folder to your local web server's document root. Depending on how you have configured your web server, this could be the htdocs or public_html folder.Debian:•Debian’s package repositories include a phpMyAdmin package, but be aware that theconfiguration file is maintained in /etc/phpmyadmin and may differ in some ways from the official phpMyAdmin documentation. Specifically it does:1.Configuration of web server (works for Apache and lighttpd).2.Creating of phpMyAdmin configuration storage using dbconfig-common.Securing setup script, see Setup script on Debian, Ubuntu and derivatives.3.•Terminal: The easiest way to install phpmyadmin in Debian is through apt-getsudo apt-get install phpmyadminDuring the installation, phpMyAdmin will walk you through a basic configuration. After the process starts follow these steps:1.Select Apache2 for the serverChoose YES when asked about whether to Configure the database for phpmyadmin with2.dbconfig-common3.Enter your MySQL password when promptedEnter the password that you want to use to log into phpmyadmin4.After the installation has completed, add phpmyadmin to the apache configuration.sudo nano /etc/apache2/apache2.confAdd the phpmyadmin config to the file.Include /etc/phpmyadmin/apache.confRestart apache:sudo service apache2 restartYou can then access phpmyadmin by going to your-ip-address/phpmyadmin.Security:Unfortunately, older versions of phpMyAdmin have had serious security vulnerabilities, including allowing remote users to eventually exploit root on the underlying virtual private server. One can prevent a majority of these attacks through a simple process: locking down the entire directory with Apache's native user/password restrictions which will prevent these remote users from even attempting to exploit older versions of phpMyAdmin.Set Up the .htaccess File:To set this up, start off by allowing the .htaccess file to work within the phpmyadmin directory. You can accomplish this in the phpmyadmin configuration file:sudo nano /etc/phpmyadmin/apache.confUnder the directory section, add the line “AllowOverride All” under “Directory Index”, making the section look like this:<Directory /usr/share/phpmyadmin>Options FollowSymLinksDirectoryIndex index.phpAllowOverride All[...]Configure the .htaccess fileWith the .htaccess file allowed, we can proceed to set up a native user whose login would be required to even access the phpmyadmin login page.Start by creating the .htaccess page in the phpmyadmin directory:sudo nano /usr/share/phpmyadmin/.htaccessFollow up by setting up the user authorization within .htaccess file. Copy and paste the following text inAuthType BasicAuthName "Restricted Files"AuthUserFile /path/to/passwords/.htpasswdRequire valid-userAuthType: This refers to the type of authentication that will be used to the check the passwords. The passwords are checked via HTTP and the keyword Basic should not be changed.AuthName: This is text that will be displayed at the password prompt. You can put anything here. AuthUserFile: This line designates the server path to the password file (which we will create in the next step.) Require valid-user: This line tells the .htaccess file that only users defined in the password file can access the phpMyAdmin login screen.Create the htpasswd file:Now we will go ahead and create the valid user information.Start by creating a htpasswd file. Use the htpasswd command, and place the file in a directory of your choice as long as it is not accessible from a browser. Although you can name the password file whatever you prefer, the convention is to name it .htpasswd.sudo htpasswd -c /path/to/passwords/.htpasswd usernameA prompt will ask you to provide and confirm your password.Once the username and passwords pair are saved you can see that the password is encrypted inthe file.Finish up by restarting apache:sudo service apache2 restartAccessing phpMyAdmin:phpMyAdmin will now be much more secure since only authorized users will be able to reach the login page.Fill it in with the username and password that you generated. After you login you can access phpmyadmin with the MySQL username and password.•Ubuntu:To get started, we can simply install phpMyAdmin from the default Ubuntu repositories.We can do this by updating our local package index and then using the apt packaging system to pull down the files and install them on our system:sudo apt-get updatesudo apt-get install phpmyadminWarning:When the first prompt appears, apache2 is highlighted, but not selected. If you do nothit "SPACE" to select Apache, the installer will not move the necessary files duringinstallation. Hit "SPACE", "TAB", and then "ENTER" to select Apache.1.For the server selection, choose apache2.2.Select yes when asked whether to use dbconfig-common to set up the database3.You will be prompted for your database administrator's passwordYou will then be asked to choose and confirm a password for the phpMyAdmin application4.itselfThe installation process actually adds the phpMyAdmin Apache configuration file into the/etc/apache2/conf-enabled/ directory, where it is automatically read.The only thing we need to do is explicitly enable the php5-mcrypt extension, which we can do by typing:sudo php5enmod mcryptAfterwards, you'll need to restart Apache for your changes to be recognized:sudo service apache2 restartYou can then access phpmyadmin by going to your-ip-address/phpmyadmin.•Fedora:Fedora ships the phpMyAdmin package, but be aware that the configuration file is maintained in /etc/phpMyAdmin/ and may differ in some ways from the official phpMyAdmin documentation. Terminal:First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.dnf -y updateThen it’s a matter of just running one command for installation via apt-get:dnf -y install phpmyadminSecurity:To secure phpMyAdmin we should lock down access to a specific IP address.When the phpMyAdmin package is installed, an Apache Virtual Host file is added to configure web access. Let’s edit that file:vim /etc/httpd/conf.d/phpMyAdmin.confBy default, the configuration for phpMyAdmin only allows access from the server on which it is installed.Change each IP address to the one you found in what is my ip address? or another IP address that will be connecting to phpMyAdmin remotely:Require ip 127.0.0.1Allow from 127.0.0.1Require ip 127.0.0.1Allow from 127.0.0.1Restart Apache:systemctl restart httpdVerify that phpMyAdmin is working by visiting http://the_IP_of_your_server/phpmyadmin For example: http://1.2.3.4/phpmyadminComposer:•You can install phpMyAdmin using Composer, however it’s currently not available in the defaultPackagist repository due to its technical limitations.The installation is possible by adding our own repositoryhttps:///packages.json:composer create-project phpmyadmin/phpmyadmin --repository-url=https:///packages.json --no-dev•Installing from Git:You can clone current phpMyAdmin source from https:///phpmyadmin/phpmyadmin.git: git clone https:///phpmyadmin/phpmyadmin.gitAdditionally you need to install dependencies using Composer:composer updateIf you do not intend to develop, you can skip installation of developer tools by invoking:composer update --no-devMac:•Third Party Products : MAMP, AMPPS, Bitnami MAMPStack, XAMPP•Manually:Download phpMyAdmin , For all languages choose something like phpMyAdmin-4.6.4-all-languages.tar.bz2 or for language specific choose something like phpMyAdmin-4.6.4-english.tar.gzAfter Choosing a phpmyadmin kit extract the folder. Rename the extracted folder to phpMyAdmin it's easy to reference. Copy the extracted folder to your local web server's document root. Depending on how you have configured your web server, this could be the htdocs or public_html folder.Make the config foldermkdir ~/Sites/phpmyadmin/configChange the permissionschmod o+w ~/Sites/phpmyadmin/configRun the set up in the browserhttp://localhost/~username/phpmyadmin/setup/ or http://localhost/phpmyadmin/setup/You need to create a new localhost mysql server connection, click new server.Switch to the Authentication tab and set the local mysql root user and the password. Add in the username “root” (maybe already populated, add in the password that you set up earlier for the MySQL root user set up, click on save and you are returned to the previous screen. (This is not the OSX Admin or root password – it is the MySQL root user).Make sure you click on save, then a config.inc.php is now in the /config directory of phpmyadmin directory, move this file to the root level of /phpmyadmin and then remove the now empty /config directory.Now going to http://localhost/~username/phpmyadmin/ will now allow you to interact with your MySQL databases.Note: Change localhost with your-ip-addressHow to create a database and grant privileges for database user.1.Navigate to phpMyAdmin by URL http://your_ip/phpmyadmin or http://localhost/phpmyadmin2.Login using username root and root password.3.Click on Databases tab.Enter database name, select collation (you may leave it to default) and click create.4.Click on Privileges tab and select "Add user account".5.6.You can select localhost if the connection is made only form local. Select "any host" if you are planing to connect from different hosts.7.Enter new username and password.Select the privileges you need for that user.8.9.Click on Database tab and select the database for which you need to give access(in our case the newly created database in step 4). Click Go.Read Getting started with phpmyadmin online:https:///phpmyadmin/topic/5577/getting-started-with-phpmyadminCredits。
phpMyAdmin教程
phpMyAdmin教程#1 phpMyAdmin教程先下载一份最新版的phpMyAdmin MYSQL管理器。
解压后得到一个phpMyAdmin的目录(你可以改名)找到目录里的config.inc.php文件,打开找到$cfg['PmaAbsoluteUri']修改你将上传到空间的phpMyAdmin的网址如:$cfg['PmaAbsoluteUri'] = '/phpmyadmin/';还有下面的$cfg['Servers'][$i]['host'] = 'localhost';(通常用默认,也有例外)$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? 在自己的机子里调试用config,如果在网上用cookie。
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user(用户名,自己机里用root,在网上设你的ftp 用户名)$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed自己机里不用设$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only(你只有一个数据就设置一下)还有设$cfg['DefaultLang'] = 'zh';设置完毕可以上传到网上了。
phpMyAdmin 的详细使用教程,phpMyAdmin创建数据库,创建用户图解教程
phpMyAdmin 的详细使用教程,phpMyAdmin创建数据库,创建用户图解教程一、设置数据库用户权限安装好以后,打开 phpMyAdmin 的首页,点击“权限”,如下图所示:点击“添加新用户”,如下图所示:现在按照要求填写,勾选权限,最后点击右下角的“执行”,如下图所示:下面对这些权限进行详细的描述:1、数据部分1.SELECT:是指允许读取数据2.INSERT:是指允许插入和替换数据3.UPDATE:是指允许更改数据4.DELETE:是指允许删除数据5.FILE:是指允许从数据中导入数据,以及允许将数据导出至文件2、结构部分1.CTEATE:允许创建新的数据库和表2.ALTER:允许修改现有表的结构3.INDEX:允许创建和删除索引4.DROP:允许删除数据库和表5.CREATE TEMPORARY TABLES:允许创建暂时表6.CREATE VIEW:允许创建新的视图7.SHOW VIEW:允许查询试图8.CREATE ROUTINE:允许创建新的存储过程9.ALTER ROUTINE:允许修改存储过程10.EXECUTE:允许执行查询在“权限”页面里点击最右边的“编辑权限的图标”,然后可以修改此用户的各种权限,如下图所示:修改完用户权限以后,需要回到 phpMyAdmin 的首页,重新加载一下授权,如下图所示:二、检查和修改数据库需要检查和修改数据库时,打开 phpMyAdmin 的首页,左边的侧边栏里显示着服务器上的各个数据库,点击就可以进入,也可以点击“数据库”图标,如下图所示:进入数据库以后,现在左边的侧边栏里显示着数据库的各个表,点击就可以进入,也可以点击右边的图标,如下图所示:进入表以后,现在可以对表进行插入、修改、删除等各种操作,如下图所示:三、修复数据库数据表损坏时,可以通过 PHPMyAdmin 进行修复。
1、登录 phpMyAdmin,进入需要修复的数据库页面,选择一个数据表前的方框,如下图所示:2、页面下方“选中项”下拉选择“修复表”,如下图所示:四、恢复和备份数据库1、导出备份数据库登录 phpMyAdmin,点击右边的“导出”,如下图所示:选择需要导出备份的数据库(按住 ctrl 可以多选),选择完毕,点击右下角的“执行”,如下图所示:2、导出备份数据表登录 phpMyAdmin,进入一个数据库页面,点击右边的“导出”,如下图所示:选择需要导出备份的数据表(按住 ctrl 可以多选),选择完毕,点击右下角的“执行”,如下图所示:3、导入SQL文件登录 phpMyAdmin,点击右边的“Import”导入,如下图所示:浏览文件位置,选择一个数据库文件,选择完毕,点击右下角的“执行”,如下图所示:五、执行 SQL 语句在 PHPMyAdmin 中可以输入 SQL 语句,进行各种数据库操作,输入 SQL 语句完毕,点击右下角的“执行”,如下图所示:。
phpmyadmin常用选项设置
// MySQL port -
$cfg['Servers'][$i]['socket']
= '';
socket - leave blank for default socket
// Path to the
$cfg['Servers'][$i]['connect_type'] ='tcp';
// How to connect
$cfg['Servers'][$i]['user'] user-----MySQL连接用户
='root'; //s'][$i]['password'] =''; //MySQLpassword(onlyneededwith'config'auth_type)-----MySQL连接 密码,建议在安装好 PHP和 MySQL后,先用 phpmyadmin设定 root密码,然后在 这里填写
$i++;
$cfg['Servers'][$i]['host']
= 'localhost'; // MySQL hostname
orIPaddress----这里可以设定远程 MySQL服务器 IP地址
$cfg['Servers'][$i]['port']
= '';
leaveblankfordefaultport-----默认为 3306
for no relation-links support
mysql配置文件详解
MySQL的主要配置文件是f(在Windows系统中为my.ini)。
这个文件包含了MySQL服务器和客户端的各种设置选项。
下面我们详细介绍f文件的结构、主要配置项及其作用:1文件位置在Linux系统中,f文件通常位于以下位置之一:•/etc/f•/etc/mysql/f•$MYSQL_HOME/f•~/f在Windows系统中,my.ini文件通常位于MySQL安装目录下。
2文件结构f文件由多个配置组(section)组成,每个组以方括号[]包围的标题开始。
主要的配置组包括:[mysqld] - MySQL服务器配置 [mysql] - MySQL命令行客户端配置 [client] - 所有MySQL客户端程序的通用配置 [mysqldump] - mysqldump工具的配置3主要配置项[mysqld] 部分的重要配置项:a. 基本设置port = 3306 # MySQL服务器监听端口bind-address = 127.0.0.1 # 绑定的IP地址datadir = /var/lib/mysql # 数据目录socket = /tmp/mysql.sock # Unix套接字文件位置b. 连接设置max_connections = 151 # 最大并发连接数max_allowed_packet = 16M # 最大允许的数据包大小c. 缓冲区和缓存设置key_buffer_size = 16M # 索引缓冲区大小innodb_buffer_pool_size = 128M # InnoDB缓冲池大小query_cache_size = 16M # 查询缓存大小d. 日志设置log_error = /var/log/mysql/error.log # 错误日志文件slow_query_log = 1 # 开启慢查询日志slow_query_log_file = /var/log/mysql/slow.log # 慢查询日志文件long_query_time = 2 # 定义慢查询的阈值(秒)e. InnoDB设置innodb_file_per_table = 1 # 每个表使用单独的表空间文件innodb_flush_log_at_trx_commit = 1 # 事务提交时刷新日志innodb_log_file_size = 48M # 日志文件大小f. 字符集和排序规则character-set-server = utf8mb4 # 服务器默认字符集collation-server = utf8mb4_general_ci # 服务器默认排序规则4[mysql] 和 [client] 部分这些部分通常包含客户端程序的配置,如:[mysql]auto-rehashdefault-character-set = utf8mb4[client]port = 3306socket = /tmp/mysql.sock5性能优化相关配置根据服务器硬件和工作负载,可能需要调整以下参数:innodb_buffer_pool_size = 4G # 根据可用内存调整innodb_log_buffer_size = 16Minnodb_read_io_threads = 8innodb_write_io_threads = 8innodb_flush_method = O_DIRECT6注意事项•修改配置文件后需要重启MySQL服务才能生效。
phpmyadmin的config-default-php文件中各个配置参数的详细说明
phpmyadmin的config.default.php文件中各个配置参数的详细说明phpMyAdmin 就是一种MySQL 数据库的管理工具,安装该工具后,即可以通过web 形式直接管理MySQL 数据,而不需要通过执行系统命令来管理,非常适合对数据库操作命令不熟悉的数据库管理者,下面详细说明该工具的安装方法。
一、下载1、先到官方站点下载phpMyAdmin 安装包:/(安装包含各种语言all-languages)2、再解压到web 可以访问的目录下,如果是虚拟空间,可以解压后通过ftp 工具上传到web 目录下,同时您可以修改解压后该文件的名称(你可以自定义目录名称)。
二、配置3、打开/libraries/config.default.php文件(旧版本是根目录下的config.inc.php文件),用写字板(不要用记事本,这是UTF8编码)进行编辑,按照说明配置即可。
4、查找$cfg['PmaAbsoluteUri']=…'; // 修改为你将上传到空间的phpMyAdmin的网址如:$cfg['PmaAbsoluteUri'] =…http: // 网站域名/phpmyadmin/';5、查找$cfg['Servers'][$i]['host'] =…localhost'; // 通常用默认,也有例外,可以不用修改6、查找$cfg['Servers'][$i]['auth_type'] =…config'; // 在自己的机子里调试用config;如果在网络上的空间用cookie.在此有四种模式可供选择:cookie,http,HTTP,config①config 方式即输入phpMyAdmin 的访问网址即可直接进入,无需输入用户名和密码,是不安全的,不推荐使用。
Linux1 配置phpMyAdmin
Linux1 配置phpMyAdmin载入phpMyAdmin到系统中后,需要对phpMyAdmin进行配置以便更好的管理MySQL数据库。
在phpMyAdmin的根目录/var/www/html/phpmyadmin下,有一个名为config.sample.inc.php的范例配置文件,可以将其复制成名为config.inc.php的配置文件(备份范例配置文件),文件内容如图4-61所示。
图4-61 配置文件内容可根据用户的环境对部分配置参数进行修改,下面配置一部分需要修改的可配置变量。
一般配置文件的格式是“$cfg['Servers'][$i]['配置参数'] = '参数值';”。
由于,phpMyAdmin支持对多个MySQL数据库服务器的管理。
所以['Servers'][$i]数组用来存放不同服务器的连接信息,代表i个服务器。
后面就是对['Servers'][$i]数组的各个参数进行设置。
●用户验证方式默认值为“$cfgServers[$i]["auth_type"] = 'cookie'”,如图4-62第30行所示,这样的验证方式限制了进行数据库管理时必须要输入用户名和密码才可进入,另外还有http和config的验证方式。
如果是config的验证方式,则直接进入了数据库。
图4-62 用户验证方式●设置网站的cookie默认值为“$cfg['blowfish_secret'] = '';”,即空字符。
如果验证方式是cookie,则需要将其改为网站的cookie,这里是本地地址"localhost",如图4-63第18行所示。
图4-63 设置网站的cookie●设置MySQL数据库服务器的域名或IP地址此处使用默认值为“$cfg['Servers'][$i]['host'] = 'localhost'”,表示MySQL数据库服务器就在本地Linux系统中,如图4-64第32行所示。
解决phpmyadmin上传文件大小限制的配置方法
phpmya dmin导入SQL文件时涉及到ph pmyad min上传文件大小限制问题,默认phpm yadmi n上传文件大小为2M,如果想要ph pmyad min上传超过2M大文件,就需要修改p hpmya dmin上传文件的大小配置或者将大文件分几批上传,相对来说修改phpmy admin上传文件大小的限制来得方便很多。
解决phpm yadmi n上传文件大小限制问题涉及修改php.ini配置文件和php myadm in配置文件。
修改phpm yadmi n上传文件大小限制主要分修改p hp.ini配置文件(php安装文件内)和phpmya dmin配置文件(config.inc.php)两个步骤。
第一步:修改php.ini配置文件中文件上传大小配置此步骤与一般的PHP.INI配置文件上传功能方法一致,需要修改ph p.ini配置文件中upl oad_m ax_fi lesiz e和pos t_max_size两个选项值,具体修改方法请参考:说到在php.ini 中的文件上传的配置,其实在之前介绍PHP文件上传功能代码实例教程以及Jquery AjaxUp load实现文件上传功能代码实例教程时我都有所提及。
PHP文件上传功能配置主要涉及p hp.ini配置文件中的up load_tmp_d ir、upload_max_files ize、post_m ax_si ze等选项。
php.ini中文件上传功能配置选项说明打开php.ini配置文件找到Fi le Upload sfile_u pload s = On默认允许HT TP文件上传,此选项不能设置为OFF。
upload_tmp_dir =默认为空,此选项在手动配置PHP运行环境时,也容易遗忘,如果不配置这个选项,文件上传功能就无法实现,这个选项设置的是文件上传时存放文件的临时目录,你必须给这个选项赋值,比如uplo ad_tm p_dir =’/leapso ulcn’,代表在C盘目录下有一个leaps oulcn目录,和sessi on配置一样,如果你是在l inux环境下,你必须赋予这个目录可写权限。
phpmyadmin密码验证的配置报告
phpmyadmin密码验证的配置报告孙明超概述未经配置的phpMyAdmin很不安全,容易受到攻击,或者根本无法正常使用,phpMyAdmin有3种授权模式(另外一种基于apache的验证模式在最后会提到)1 cookie:显示一个web登录页面,输入mysql的用户名和密码,然后进入管理界面2 http:显示1个windows登录框,输入mysql的用户名和密码,然和进入管理3 config:把mysql用户名和密码直接填入config.inc.php,不显示登录界面,直接进入管理界面实施步骤phpmyadmin的配置文件为本目录下的config.inc.php1使用cookie授权模式将'auth_type'改为'cookie',然后修改'blowfish_secret'用一个任意字符串作为cookie的加密字符串,配置文件如下:vim /usr/local/apache/htdocs/phpmyadmin/config.inc.php$cfg['Servers'][$i]['auth_type'] = 'cookie';$cfg['blowfish_secret'] = '1q2w3e4r';如此会出现一个web的登录页面2使用http授权模式vim /usr/local/apache/htdocs/phpmyadmin/config.inc.php$cfg['Servers'][$i]['auth_type'] = 'http';修改此处会出现一个Windows验证的登录框3 使用config授权模式config需要这几个参数:vim /usr/local/apache/htdocs/phpmyadmin/config.inc.php$cfg['Servers'][$i]['auth_type'] = 'config'; //授权模式$cfg['Servers'][$i]['user'] = 'root'; //mysql登陆用户$cfg['Servers'][$i]['password'] = '12345'; //mysql登陆用户密码除了上述三种phpmyadmin自带的方法外,还可以使用apache的配置来限制登录1在phpmyadmin目录下创建一个.htaccess文件,用于指定密码文件的位置,内容为AuthUserFile /etc/php_passwd AuthType Basic AuthName "Protected Area(随便写啦)" require user sunmch2使用/usrlocal/apache/bin下的htpasswd创建密码访问文件htpasswd –c /etc/php_passwd sunmch后面输入密码3vim /usr/local/apache/conf/http.conf加入以下内容<Directory "/usr/local/apache/htdocs/phpmyadmin">Options Indexes FollowSymLinksAllowOverride authconfigOrder allow,denyAllow from all</Directory>在设置使用cookie验证之后,再使用apache的验证,在连接数据库的时候输入两遍密码,更加安全!!!。
PhpMyAdmin配置
PhpMyAdmin配置在PHP网站开发中,最基本的PHP环境搭建涉及PHP、Apache/IIS、Mysql,对于数据库的管理,除了Mysql数据库自身提供了命令行工具方便开发人员管理数据库外,基于PHP开发的phpmyadmin也是一个非常好用的Mysql数据库管理程序,在xampp等PHP环境配置安装程序中,phpmyadmin也是一个必备的PHP程序。
今天和大家分享如何安装、配置phpmyadmin。
phpmyadmin安装配置准备工作首先当然是下载phpmyadmin的安装包,提供两个phpmyadmin的下载地址:phpmyadmin下载地址1,phpmyadmin下载地址2,地址1罗列了phpmyadmin2.x和phpmyadmin3.x,地址2只是最新的phpmyadmin版本。
我下载的是phpmyadmin3.3,在进行phpmyadmin3安装时需要的PHP环境至少为PHP5.2,Mysql5以上的版本。
如何进行PHP 环境配置?phpmyadmin安装教程:如何安装phpmyadmin首先解压phpMyAdmin-3.3.3-rc1-all-languages.zip,然后重命名为phpmyadmin3,将其复制到php程序运行目录,我复制到D:\PHPWEB目录下。
在完成phpmyadmin3的这步安装步骤后,请确保你的IIS或者Apache服务器已开启,以及Mysql服务是否已开启,你可以在CMD 模式下输入net start mysql开启Mysql数据库服务,同时请确保PHP 已启用了Mysql的扩展库。
只要有一项没有开启,即可能导致phpmyadmin3打不开,访问出错。
至此phpmyadmin3的安装工作就算完成了,接下去就要进行phpmyadmin的配置工作。
phpmyadmin配置教程首先在游览器中输入phpmyadmin的远程访问地址:http://localhost/phpmyadmin3,出现如下界面phpmyadmin 远程访问配置用户名密码此界面说明:1、必须以cookies 方式登录,2、必须以合法用户名和密码进行远程登录,如果没有配置phpmyadmin 的用户名和密码,访问会被拒绝。
PHPMyadmin配置文件详解
03转自老精灵的老房子:/wzy8123456/blog/item/d5c5893fa0fda7ea55e723db.htmlPHPMyadmin配置文件config.inc.php内容如下,在需要设置的地方增加了相关注释。
<?php/* $Id: config.inc.php,v 1.204.2.1 2003/10/10 14:24:24 nijel Exp $ */// vim: expandtab sw=4 ts=4 sts=4:/*** phpMyAdmin Configuration File** All directives are explained in Documentation.html*//*** Sets the php error reporting - Please do not change this line!*/if (!isset($old_error_reporting)) {error_reporting(E_ALL);@ini_set('display_errors', '1');}/*** Your phpMyAdmin url** Complete the variable below with the full url ie* http://www.your_/path_to_your_phpMyAdmin_directory/** It must contain characters that are valid for a URL, and the path is* case sensitive on some Web servers, for example Unix-based servers.** In most cases you can leave this variable empty, as the correct value* will be detected automatically. However, we recommend that you do* test to see that the auto-detection code works in your system. A good* test is to browse a table, then edit a row and save it. There will be* an error message if phpMyAdmin cannot auto-detect the correct value.** If the auto-detection code does work properly, you can set to TRUE the* $cfg['PmaAbsoluteUri_DisableWarning'] variable below.*/$cfg['PmaAbsoluteUri'] = '';-----这里设置你的phpmyadmin的URL,如:http://localhost/phpmyadmin//*** Disable the default warning about $cfg['PmaAbsoluteUri'] not being set* You should use this if and ONLY if the PmaAbsoluteUri auto-detection* works perfectly.*/$cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;/*** Disable the default warning that is displayed on the DB Details Structure page if * any of the required Tables for the relationfeatures could not be found*/$cfg['PmaNoRelation_DisableWarning'] = FALSE;/*** The 'cookie' auth_type uses blowfish algorithm to encrypt the password. If* at least one server configuration uses 'cookie' auth_type, enter here a* passphrase that will be used by blowfish.$cfg['blowfish_secret'] = '';-----设定好root密码后这里也要填写/*** Server(s) configuration*/$i = 0;// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0].// You can disable a server config entry by setting host to ''.$i++;$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address----这里可以设定远程MySQL服务器IP地址$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port-----默认为3306$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')-----连接MySQL服务器的方式$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection// (requires PHP >= 4.3.0)-----是否使用压缩协议,PHP版本须>= 4.3.0$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings// (this user must have read-only$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"// and "mysql/db" tables)-----MySQL控制用户设定,该用户只对mysql数据库下的user和db表有完全权限$cfg['Servers'][$i]['auth_type'] = 'config';// Authentication method (config, http or cookie based)?-----如果PHP安装模式为Apache,可以使用http和cookie;如果PHP安装模式为CGI,可以使用cookie;默认为config,是不安全的,不推荐。
3.3.2 phpMyAdmin的安装和配置_PHP开发典型模块大全(修订版)_[共2页]
PHP 开发典型模块大全704.删除记录delete在数据库中有些数据已经失去意义或者是错误的,需要将它们删除,此时可以使用delete 语句,该语句的格式如下:delete from 数据表名 where condition该语句在执行过程中,如果没有指定where 条件,将删除所有的记录;如果指定了where 条件,将按照指定的条件进行删除。
例如,删除管理员数据表tb _admin 中用户名为“小欣”的记录信息,如图3.23所示。
图3.23 删除数据表中指定条件的记录3.3 phpMyAdmin 图形化管理工具3.3.1 phpMyAdmin 介绍phpMyAdmin 是众多MySQL 图形化管理工具中应用最广泛的一种,是一款使用PHP 开发的B/S 模式的MySQL 客户端软件,该工具是基于Web 跨平台的管理程序,并且支持简体中文。
用户可以在官方网站“ ”上免费下载最新的版本。
phpMyAdmin 为Web 开发人提供了类似于Access 、SQL Server 的图形化数据库操作界面,通过该管理工具可以完全对MySQL 进行操作。
例如,创建数据库、数据表、生成MySQL 数据库脚本文件等。
3.3.2 phpMyAdmin 的安装和配置用户在配置好Apache 服务器对PHP 的支持后,通过安装方便快捷的phpMyAdmin 图形化管理工具来操作MySQL 数据库。
下面将分别介绍在Windows 操作系统下和Linux 操作系统下安装和配置phpMyAdmin 工具。
1.Windows 系统下phpMyAdmin 的安装配置 安装phpMyAdmin 前,首先应先到官方网站“/home _page/ index.php ”下载安装包,本节以phpMyAdmin-2.11.5-all-languages.rar 为例进行讲解。
安装phpMyAdmin 图形化管理工具 将下载的“phpMyAdmin-2.11.5-all-languages.rar ”文件解压缩到Apache 主目录下,解压后的名称是“phpMyAdmin-2.11.5-all-languages ”,其中2.11.5是phpMyAdmin 的版本号,为了便于使用可以将解压后的文件夹重新命名为phpMyAdmin 。
phpmyadmin下载、安装、配置教程
phpmyadmin下载、安装、配置教程本⽂为⼤家分享了phpmyadmin下载安装配置教程,供⼤家参考,具体内容如下点击右上⾓下载按钮下载得到phpMyAdmin-4.7.0-all-languages.zip解压到C盘根⽬录下,重命名为phpMyAdmin,进⼊该⽂件夹,找到config.sample.inc.php,改名为config.inc.php,⽤⽂本编辑器打开改⽂件。
找到下列代码$cfg['blowfish_secret'] = ''改成$cfg['blowfish_secret'] = 'c4ca4238a0b923820dcc509a6f75849b';//⼀个长字符串密码就⾏保存退出进⼊apache的conf⽂件夹下,新建⼀个phpmyadmin.conf⽂件,⽂本编辑器打开,加⼊下列代码,Alias /phpmyadmin "c:/phpMyAdmin/"<Directory "c:/phpMyAdmin/">Options Indexes FollowSymLinks MultiViewsAllowOverride allRequire all grantedphp_admin_value upload_max_filesize 128Mphp_admin_value post_max_size 128Mphp_admin_value max_execution_time 360php_admin_value max_input_time 360</Directory>保存退出在该⽂件夹内找到配置⽂件httdp.conf,⽤⽂本编辑器打开,在末尾增加⼀⾏Include conf/phpmyadmin.conf保存退出,重启apache即可。
以上就是本⽂的全部内容,希望对⼤家的学习有所帮助,也希望⼤家多多⽀持。
PhpMyAdmin配置
PhpMyAdmin配置1$cfg['blowfish_secret'] = '这里就是需要的短语密码'; /* 短语密码请随意填写 */原因:会出现这个问题,就是因为这段:$cfg['Servers'][$i]['auth_type'] = ‘cookie'这里有四个值可供填写:cookie http HTTP configconfig方式即输入phpmyadmin的访问网址即可直接进入,无需输入用户名和密码,是不安全的,不推荐使用。
cookie,http或HTTP时,登录phpmyadmin需要数据用户名和密码进行验证,具体如下:PHP安装模式为Apache,可以使用http和cookie;PHP安装模式为CGI,可以使用cookie通常这个值设置为cookie即可。
二、phpMyAdmin 高级功能未全部设置,部分功能不可用。
原因请先看官方的详细说明:若要使用一些高级功能(如: 书签、注释、SQL 查询历史、结构追踪、生成 PDF 、内容转换等),你需要创建一些特殊的数据表。
这些表可以放在你自己的数据库里,也可以在一个多用户的服务器上创建一个独立的数据库(这个数据库将通过其对应的帐号访问,所以不应该给其他用户访问这个数据库的权限)。
Please look at your ./examples/ directory, where you should find a file called create_tables.sql. (If you are using a Windows server, pay special attention to FAQ 1.23).If you already had this infrastructure and upgraded to MySQL 4.1.2 or newer, please use ./examples/upgrade_tables_mysql_4_1_2+.sql and then create new tables by importing ./examples/create_tables.sql.你可以使用phpMyAdmin 来创建这些数据表。
phpMyAdmin3.3.8安装配置详细全过程,及各种问题解决方法
phpMyAdmin3.3.8安装配置详细全过程,及各种问题解决方法今天调试PHP数据库Mysql,在单位的电脑上安装phpMyAdmin数据库管理软件,本来是很简单的事,却出现了几个问题:1/无法载入mcrypt扩展,请检查PHP配置;2/配置文件现在需要绝密的短语密码(blowfish_secret);3/#2003-服务器没有响应。
为了以备不时之需,把遇到的这些问题的解决方法归纳到博客,省得日后再遇到这类问题还要到处阅读文档,寻找解决方法。
由于目前phpMyAdmin的最新版本已经更新到了phpMyAdmin 3.3.8,网上流传的很多配置方法都是以前老版本的,已经不太适应新版本的配置要求;于是顺便也把phpMyAdmin 3.3.8的配置步骤也列在下面;为了切换及调试PHP方便,我采用的是windows系统,本地调试。
1、先下载phpMyAdmin安装包:到国外官方网站上,点击导航栏上的“DOWNLOADS”链接进入下载页面,选择“all-languages.zip”版本下载到本地,解压;把解压缩文件放到系统指定的虚拟根目录下的phpmyadmin文件夹里(可自定义文件夹名),如flymorn的本地存放位置是D:\www\phpmyadmin里。
2、找到phpmyadmin文件夹里的/libraries/config.default.php文件(旧版本是根目录下的config.inc.php文件),用支持UTF-8编码的写字板打开进行编辑。
3、查找 $cfg['PmaAbsoluteUri']修改为你将上传到空间的phpMyAdmin的网址如:$cfg['PmaAbsoluteUri'] = '/phpmyadmin/';这里因为我是本地调试,我改为$cfg['PmaAbsoluteUri'] ='http://localhost/phpmyadmin/';注意:不要漏掉最后的反斜杠/和开头的http。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
PHPMyadmin 配置文件详解(配置)注意修改时注意缓存非常适合对数据库操作命令不熟悉的数据库管理者,下面我就说下怎么安装该工具:1.先到网上下载phpmyadmin,再解压到可以访问的web目录下(如果是虚拟空间,可以解压后通过ftp等上传到web目录下),当然您可以修改解压后该文件的名称。
2.配置config文件打开libraries下的config.default.php文件,依次找到下面各项,按照说明配置即可:A.访问网址引用:$cfg['PmaAbsoluteUri'] = '';这里填写phpmyadmin的访问网址B.mysql主机信息引用:$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address填写localhost或mysql所在服务器的ip地址,如果mysql和该phpmyadmin在同一服务器,则按默认localhost$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port mysql端口,如果是默认3306,保留为空即可C.mysql用户名和密码引用:$cfg['Servers'][$i]['user'] = 'root'; // MySQL user 访问phpmyadmin使用的mysql用户名fg['Servers'][$i]['password'] = ''; // MySQL password (only needed对应上述mysql 用户名的密码D.认证方法引用:$cfg['Servers'][$i]['auth_type'] = 'cookie';在此有四种模式可供选择,cookie,http,HTTP,configconfig方式即输入phpmyadmin的访问网址即可直接进入,无需输入用户名和密码,是不安全的,不推荐使用。
当该项设置为cookie,http或HTTP时,登录phpmyadmin需要数据用户名和密码进行验证,,具体如下:PHP安装模式为Apache,可以使用http和cookie;PHP安装模式为CGI,可以使用cookieE.短语密码(blowfish_secret)的设置引用:$cfg['blowfish_secret'] = '';如果认证方法设置为cookie,就需要设置短语密码,置于设置为什么密码,由您自己决定,但是不能留空,否则会在登录phpmyadmin时提示错误好了,到此为止,您已经成功安装了phpmyadmin,简单吧,赶快登录体验下吧说明:该文档说明的只是安装phpmyadmin的基本配置,关于config.default.php文件中各个配置参数的详细说明可以phpMyAdmin 就是一种MySQL 数据库的管理工具,安装该工具后,即可以通过web 形式直接管理MySQL 数据,而不需要通过执行系统命令来管理,非常适合对数据库操作命令不熟悉的数据库管理者,下面详细说明该工具的安装方法。
一、下载1、先到官方站点下载phpMyAdmin 安装包:/(安装包含各种语言all-languages)2、再解压到web 可以访问的目录下,如果是虚拟空间,可以解压后通过ftp 工具上传到web 目录下,同时您可以修改解压后该文件的名称(你可以自定义目录名称)。
二、配置3、打开/libraries/config.default.php文件(旧版本是根目录下的config.inc.php文件),用写字板(不要用记事本,这是UTF8编码)进行编辑,按照说明配置即可。
4、查找$cfg['PmaAbsoluteUri']=…'; // 修改为你将上传到空间的phpMyAdmin的网址如:$cfg['PmaAbsoluteUri'] =…http: // 网站域名/phpmyadmin/';5、查找$cfg['Servers'][$i]['host'] =…localhos t'; // 通常用默认,也有例外,可以不用修改6、查找$cfg['Servers'][$i]['auth_type'] =…config'; // 在自己的机子里调试用config;如果在网络上的空间用cookie.在此有四种模式可供选择:cookie,http,HTTP,config①config 方式即输入phpMyAdmin 的访问网址即可直接进入,无需输入用户名和密码,是不安全的,不推荐使用。
②设置cookie,http,HTTP方式,登录phpMyAdmin 需要数据用户名和密码进行验证。
具体如下:PHP 安装模式为Apache,可以使用http 和cookie;PHP 安装模式为CG I,可以使用cookie。
7、查找$cfg['Servers'][$i]['user'] = …root'; // MySQL用户名8、查找$cfg['Servers'][$i]['password'] =''; // MySQL 密码(only needed 留空就可以了)9、查找$cfg['Servers'][$i]['only_db'] = ''; // 你只有一个数据就设置一下,设置为你的数据库名;如果你想架设服务器,那么建议留空10、查找$cfg['DefaultLang'] = …zh'; // 这里是选择语言,zh代表简体中文的意思11、查找$cfg['blowfish_secret'] =''; // 如果认证方法设置为cookie,就需要设置短语密码,设置为什么密码,由您自己决定,这里不能留空,否则会在登录phpMyAdmin 时提示如下图所示的错误。
12、设置完毕后保存,现在可以上传到网络空间上了,浏览http://网站域名/phpmyad min/测试一下。
(输入数据库的用户名及密码就可以了)如果要安装过程中出现:“phpMyAdmin - 错误缺少mysqli 扩展。
请检查PHP 配置。
”错误。
解决方法如下:①到phpmyadmin文件夹的\libraries\config.default.php文件中找:$cfg['Servers'][$i][' extension']='mysql';语句。
②如果有找到$cfg['Servers'][$i]['extension']='mysql';这句,就继续查找下面这句$cfg[' Servers'][$i]['extension']='mysqli'; 并把其的注释去掉。
③如果没有找到$cfg['Servers'][$i]['extension']='mysql';这句,就把$cfg['Servers'][$i][' extension']='mysqli';语句,改成$cfg['Servers'][$i]['extension']='mysql'; 语句。
(即确保" mysql " 值能生效)<?php/* $Id: config.inc.php,v 1.204.2.1 2003/10/10 14:24:24 nijel Exp $ */// vim: expandtab sw=4 ts=4 sts=4:/*** phpMyAdmin Configuration File** All directives are explained in Documentation.html*//*** Sets the php error reporting - Please do not change this line!*/if (!isset($old_error_reporting)) {error_reporting(E_ALL);@ini_set('display_errors', '1');}/*** Your phpMyAdmin url** Complete the variable below with the full url ie* http://www.your_/path_to_your_phpMyAdmin_directory/** It must contain characters that are valid for a URL, and the path is* case sensitive on some Web servers, for example Unix-based servers. ** In most cases you can leave this variable empty, as the correct value * will be detected automatically. However, we recommend that you do * test to see that the auto-detection code works in your system. A goo d* test is to browse a table, then edit a row and save it. There will be* an error message if phpMyAdmin cannot auto-detect the correct value. ** If the auto-detection code does work properly, you can set to TRUE t he* $cfg['PmaAbsoluteUri_DisableWarning'] variable below.*/$cfg['PmaAbsoluteUri'] = '';-----这里设置你的phpmyadmin的URL,如:http: //localhost/phpmyadmin//*** Disable the default warning about $cfg['PmaAbsoluteUri'] not being se t* You should use this if and ONLY if the PmaAbsoluteUri auto-detection * works perfectly.*/$cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;/*** Disable the default warning that is displayed on the DB Details Struct ure page if* any of the required Tables for the relationfeatures could not be found */$cfg['PmaNoRelation_DisableWarning'] = FALSE;/*** The 'cookie' auth_type uses blowfish algorithm to encrypt the passwor d. If* at least one server configuration uses 'cookie' auth_type, enter here a* passphrase that will be used by blowfish.$cfg['blowfish_secret'] = '';-----设定好root密码后这里也要填写/*** Server(s) configuration*/$i = 0;// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $c fg['Servers'][0].// You can disable a server config entry by setting host to ''.$i++;$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address----这里可以设定远程MySQL服务器IP地址$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank f or default port-----默认为3306$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MyS QL server ('tcp' or 'socket')-----连接MySQL服务器的方式$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed prot ocol for the MySQL connection// (requires PHP >= 4.3.0)-----是否使用压缩协议,PHP版本须>= 4.3.0$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user setti ngs// (this user must have read-only $cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/use r"// and "mysql/db" tables)-----MySQL 控制用户设定,该用户只对mysql数据库下的user和db表有完全权限$cfg['Servers'][$i]['auth_type'] = 'config';// Authentication method (config, http or cookie based)?-----如果PHP安装模式为Apache,可以使用http和cookie;如果PHP安装模式为CGI,可以使用co okie;默认为config,是不安全的,不推荐。