ホームページ  >  記事  >  バックエンド開発  >  PHPMyadmin設定ファイル(設定)の詳しい説明_PHPチュートリアル

PHPMyadmin設定ファイル(設定)の詳しい説明_PHPチュートリアル

WBOY
WBOYオリジナル
2016-07-21 15:42:17757ブラウズ

このツールは、データベース操作コマンドに慣れていないデータベース管理者に非常に適しています。このツールのインストール方法を説明します。

1. まず、phpmyadmin をオンラインでダウンロードし、アクセス可能な Web ディレクトリに解凍します。もちろん、解凍したファイルの名前を変更することもできます。

2. 設定ファイルを設定します ライブラリの下の config.default.php ファイルを開き、次の項目を順番に見つけて、指示に従って設定します。
A. URL にアクセスします
引用:
$cfg[ 'PmaAbsoluteUri'] = '';ここにphpmyadminのアクセスURLを入力します


B.mysqlホスト情報 Quote:
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL ホスト名または IP アドレス
localhost または mysql が配置されているサーバーの IP アドレスを入力します。mysql と phpmyadmin が同じサーバー上にある場合は、デフォルトの localhost を押します
$cfg['Servers'][$i] ['port'] = ''; // MySQL ポート - デフォルトのポートの場合は空白のままにしておきます
mysql ポート、デフォルトの 3306 の場合は空白のままにしておきます


C.mysql ユーザー名とパスワード Quote:
$ cfg['Servers'][$i]['user'] = 'root'; // MySQL ユーザーが phpmyadmin にアクセスするために使用する mysql ユーザー名
fg['Servers'][$i]['password'] = ''; // MySQL パスワード (上記の mysql ユーザー名に対応するパスワードのみ

D. 認証方法
Quote:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
ここで選択できるモードは cookie、http、HTTP、config の 4 つです
config 方法はユーザー名とパスワードを入力せずに phpmyadmin のアクセス URL を直接入力する方法です。これは安全ではないため推奨されません。項目は cookie、http、または HTTP に設定されており、phpmyadmin にログインするには検証のためにユーザー名とパスワードが必要です。詳細は次のとおりです。
PHP インストール モードは Apache、http と cookie を使用できます。
PHP インストール モードは CGI、 Cookie を使用できます


E. フレーズ パスワード (blowfish_secret) の設定
Quote: $cfg['blowfish_secret '] = ''; 認証方法が Cookie に設定されている場合は、フレーズ パスワードを設定する必要があります。どのようなパスワードを設定するかはあなた次第ですが、空白のままにすることはできません。空白のままにしないと、phpmyadmin へのログイン時にエラーが表示されます
さて、これで完了です。これまでのところ、phpmyadmin は正常にインストールされました。簡単です。ログインして体験してください。

手順:
このドキュメントでは、phpmyadmin のインストールの基本的な設定についてのみ説明します。config.default.php ファイル内の各設定パラメータの詳細な説明を参照してください。

phpMyAdmin は、このツールをインストールした後、MySQL データベース管理ツールです。システム コマンドを実行する必要がなく、Web 経由で MySQL データを直接管理できます。データベース操作コマンドに慣れていないデータベース管理者に非常に適しています。詳細は、ツールのインストール方法について説明します。

1. ダウンロードします

1. まず、公式 Web サイトにアクセスして、phpMyAdmin インストール パッケージをダウンロードします: http://www.phpmyadmin.net/ (インストールにはすべての言語が含まれています) 2. Web は、仮想空間の場合は、ftp ツールを使用して解凍して Web ディレクトリにアップロードできます。同時に、解凍されたファイルの名前を変更できます (ディレクトリ名はカスタマイズできます)。

2. 設定

3. /libraries/config.default.php ファイルを開きます (古いバージョンはルート ディレクトリにある config.inc.php ファイルです)。ワードパッドを使用します (メモ帳は使用しないでください。これは UTF8 です)。エンコード)を編集し、指示に従って設定します。 4. $cfg['PmaAbsoluteUri']=''; // スペースにアップロードする phpMyAdmin の URL に変更します
例: $cfg['PmaAbsoluteUri'] ='http:// name/phpmyadmin/' ;
5. $cfg['Servers'][$i]['host'] ='localhost' を検索します。 // 通常はデフォルトが使用されますが、必要ない場合もあります。
6. $cfg['Servers'][ $i]['auth_type'] ='config'; を検索します。インターネット上で Cookie を使用する場合は、そこにあります。 cookie、http、HTTP、configの4つのモードから選択できます
① config方法は、ユーザー名とパスワードを入力せずにphpMyAdminのアクセスURLを直接入力する方法であり、安全ではないため推奨しません。
② Cookie、http、HTTPメソッドを設定し、phpMyAdminにログインし、検証のためにデータのユーザー名とパスワードが必要です。
詳細は次のとおりです: PHP インストール モードは Apache、http と Cookie を使用できます。PHP インストール モードは CGI で、Cookie を使用できます。
7. $cfg['Servers'][$i]['user'] = 'root' を検索します。
8. $cfg['Servers'][$i]['password] を検索します。 '] =''; // MySQL パスワード (必要な場合のみ、空白のままにしておきます)
9. $cfg['Servers'][$i]['only_db'] = '';データは 1 つあり、サーバーを設定する場合は空白のままにすることをお勧めします
10. Search $cfg['DefaultLang'] = 'zh'; zh は簡体字中国語を意味します
11. Find $cfg['blowfish_secret'] =''; // 認証方法が Cookie に設定されている場合、どのようなパスワードを設定するかはあなた次第です。ここを空白のままにすることはできません。空白のままにすると、phpMyAdmin にログインするときに次のようなプロンプトが表示されます。

12、设置完毕后保存,现在可以上传到网络空间上了,浏览http://网站域名/phpmyadmin/测试一下。(输入数据库的用户名及密码就可以了)

如果要安装过程中出现:“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 " 值能生效)


/* $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_web.net/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,是不安全的,不推荐。

$cfg['Servers'][$i]['user']          = 'root';      // MySQL user-----MySQL连接用户

$cfg['Servers'][$i]['password']      = '';         
// MySQL password (only needed with 'config' auth_type)-----MySQL连接密码,建议在安装好PHP和MySQL后,先用phpmyadmin设定root密码,然后在这里填写

$cfg['Servers'][$i]['only_db']       = '';          // If set to a db-name, only
                                                    // this db is displayed
                                                    // at left frame
                                                    // It may also be an array
                                                    // of db-names-----如果在这里设定一个数据库的名字,那么登陆后框架左边将只显示这个数据库

$cfg['Servers'][$i]['verbose']       = '';          // Verbose name for this host - leave blank to show the hostname

$cfg['Servers'][$i]['pmadb']         = '';          // Database used for Relation, Bookmark and PDF Features
                                                    // (see scripts/create_tables.sql)
                                                    //   - leave blank for no support
                                                    //     DEFAULT: 'phpmyadmin'
$cfg['Servers'][$i]['bookmarktable'] = '';          // Bookmark table
                                                    //   - leave blank for no bookmark support
                                                    //     DEFAULT: 'pma_bookmark'
$cfg['Servers'][$i]['relation']      = '';          // table to describe the relation between links (see doc)
                                                    //   - leave blank for no relation-links support
                                                    //     DEFAULT: 'pma_relation'
$cfg['Servers'][$i]['table_info']    = '';          // table to describe the display fields
                                                    //   - leave blank for no display fields support
                                                    //     DEFAULT: 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = '';          // table to describe the tables position for the PDF schema
                                                    //   - leave blank for no PDF schema support
                                                    //     DEFAULT: 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages']     = '';          // table to describe pages of relationpdf
                                                    //   - leave blank if you don't want to use this
                                                    //     DEFAULT: 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info']   = '';          // table to store column information
                                                    //   - leave blank for no column comments/mime types
                                                    //     DEFAULT: 'pma_column_info'
$cfg['Servers'][$i]['history']       = '';          // table to store SQL history
                                                    //   - leave blank for no SQL query history
                                                    //     DEFAULT: 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE;        // set to FALSE if you know that your pma_* tables
                                                    // are up to date. This prevents compatibility
                                                    // checks and thereby increases performance.
$cfg['Servers'][$i]['AllowDeny']['order']           // Host authentication order, leave blank to not use
                                     = '';
$cfg['Servers'][$i]['AllowDeny']['rules']           // Host authentication rules, leave blank for defaults
                                     = array();


$i++;
$cfg['Servers'][$i]['host']            = '';
$cfg['Servers'][$i]['port']            = '';
$cfg['Servers'][$i]['socket']          = '';
$cfg['Servers'][$i]['connect_type']    = 'tcp';
$cfg['Servers'][$i]['compress']        = FALSE;
$cfg['Servers'][$i]['controluser']     = '';
$cfg['Servers'][$i]['controlpass']     = '';
$cfg['Servers'][$i]['auth_type']       = 'config';
$cfg['Servers'][$i]['user']            = 'root';
$cfg['Servers'][$i]['password']        = '';
$cfg['Servers'][$i]['only_db']         = '';
$cfg['Servers'][$i]['verbose']         = '';
$cfg['Servers'][$i]['pmadb']           = ''; // 'phpmyadmin' - see scripts/create_tables.sql
$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]['verbose_check']   = TRUE;
$cfg['Servers'][$i]['AllowDeny']['order']
                                       = '';
$cfg['Servers'][$i]['AllowDeny']['rules']
                                       = array();

$i++;
$cfg['Servers'][$i]['host']            = '';
$cfg['Servers'][$i]['port']            = '';
$cfg['Servers'][$i]['socket']          = '';
$cfg['Servers'][$i]['connect_type']    = 'tcp';
$cfg['Servers'][$i]['compress']        = FALSE;
$cfg['Servers'][$i]['controluser']     = '';
$cfg['Servers'][$i]['controlpass']     = '';
$cfg['Servers'][$i]['auth_type']       = 'config';
$cfg['Servers'][$i]['user']            = 'root';
$cfg['Servers'][$i]['password']        = '';
$cfg['Servers'][$i]['only_db']         = '';
$cfg['Servers'][$i]['verbose']         = '';
$cfg['Servers'][$i]['pmadb']           = ''; // 'phpmyadmin' - see scripts/create_tables.sql
$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]['verbose_check']   = TRUE;
$cfg['Servers'][$i]['AllowDeny']['order']
                                       = '';
$cfg['Servers'][$i]['AllowDeny']['rules']
                                       = array();

// 複数のサーバーが設定されている場合は、$cfg['ServerDefault']
// をいずれか 1 つに設定して、phpMyAdmin の起動時にそのサーバーに自動接続することができます。
// または 0 に設定すると、ログインせずにサーバーのリストを指定します
// 構成されているサーバーが 1 つだけの場合、$cfg['ServerDefault'] *必ず*
// そのサーバーに設定してください。[color]=red]-----すべての MySQL サーバーを表示するかどうか
$cfg['ServerDefault'] = 1; [0]);

/**

* その他の主要な phpMyAdmin 設定
*/
$cfg['OBGzip'] = 'auto'; // 可能であれば GZIP 出力バッファリングを使用します (TRUE|FALSE|'auto')
-----必要に応じて GZIP を使用します。出力バッファリング
$cfg['PersistentConnections'] = FALSE; // MySQL データベースへの永続接続を使用します

-----MySQL 永続接続、つまり pconnect を使用するかどうか

$cfg['ExecTimeLimit'] = 300; // 最大実行時間 (秒単位) (制限なしの場合は 0)

-----最大スクリプト実行時間、単位: 秒

cfg ['Skiplockedtables'] = false; $cfg['AllowUserDropDatabase'] = FALSE; // 「データベースのドロップ」リンクを通常のユーザーに表示します

-----「データベースのドロップ」リンクを通常のユーザーに表示するかどうか



$cfg['確認'] = TRUE; // 「DROP TABLE」と「DROP DATABASE」を確認します-----データテーブル/ライブラリを削除する前に確認プロンプトボックスが表示されるかどうか

$cfg['LoginCookieRecall'] = TRUE; // Cookie 認証モードで以前のログインを呼び出すかどうか-----以前の Cookie 認証モードで Cookie を呼び出すかどうか

Trueに設定されている場合、PMAは複数のステートメントクエリを計算し続けます

www.bkjia.comtru​​ehttp://www.bkjia.com/PHPjc/320973.html技術記事このツールは、データベース操作コマンドに慣れていないデータベース管理者に非常に適しています。このツールのインストール方法を説明します。 1. まず、インターネットから phpmyadmin をダウンロードし、アクセス可能な Web ディレクトリに解凍します。
声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。