phpMyAdmin 2.x.x-Documentation (Installation and configuration)

Source: Internet
Author: User
Tags format array auth connect mysql mysql manual sql error first row
Objective
phpMyAdmin can manage the entire MySQL server (requiring superuser) or manage a single database. In order to achieve the latter, you
The MySQL user will need to be properly set up, and he can only read/write to the allowed database. That's until you've read the relevant parts of the MySQL manual.

Quick Install

The phpMyAdmin package is extracted to a directory.
Open config.inc.php3, modify $cfgservers[1][' host ' according to your environment, $cfgServers [1][' user '] and
$cfgServers the value of [1][' password ']. You can look at all the configurable variables listed in the configuration section below, depending on the situation
Condition to modify the other parameters.
It is recommended that the directory be protected (unless it is on an intranet) after phpMyAdmin is installed. For example, you can use Http-auth (with a. htaccess file).
Open file in Browser: Install host domain name/install directory/INDEX.PHP3. phpMyAdmin should show a welcome screen and your number
According to the library.
phpMyAdmin supports multiple languages. If you want to change to the Chinese version, modify the Require ("ENGLISH.INC.PHP3") in the config.inc.php3, or require ("chinese_gb.inc.php3"). So the interface is Chinese. Oh, great!
Save Config.inc.php3.
Installation Note
Please confirm that the phpMyAdmin directory is protected. There is no protection by default! It should not be read by a random person, especially a search engine.
Although I have added a "nofollow" directive to each page, it is possible that some search engines do not consider links that still continue to access the page.
Imagine AltaVista visiting a link called "Drop dtabase". You can
There is a comprehensive understanding of Apache authentication methods in Http://www.apacheweek.com/features/userauth. Another tutorial
In http://deepthought.texsci.edu/protected_dirs.html
PHP3 should be configured as Magic_quotes=on.
Configuration
All configurable data is placed in CONFIG.INC.PHP3.

$cfgServers Array
Starting with version 1.4.2, phpMyAdmin supports the management of multiple mysql-server. So, add a $cfgservers array to store
Logon information for different servers. $cfgServers [1][' host '] contains the host name of the first server, $cfgServers [2][' host ']
Hosts for the second server, and so on. If you have only one server to manage, you can simply ignore other $cfgservers
The host name of the port.

$cfgServers [n][' Port '] string
The port number of the nth MySQL server. The default value is 3300 (leave blank values).

$cfgServers [n][' host '] string
The host name of the nth MySQL server. For example, localhost.

$cfgServers [n][' Adv_auth '] boolean value
The Basic or Advanced authentication method should be used for this server. The Basic authentication method ($adv _auth = False) is an ordinary old practice:
Username and password are present in CONFIG.INC.PHP3. Advanced authentication Method ($adv _auth = True) is introduced from version 1.3.0, allowing you to pass
Http-auth to log in as a legitimate MySQL user. In config.inc you only need to provide a standard user, he can connect
To MySQL and can read the user/db table of the MySQL library (see $cfgservers[n][' Stduser ').

Recommended for use in Advanced mode management situations:

When phpMyAdmin is running in a multiuser environment, when people have shell processing privileges, you don't want to know the MySQL username/password.
When you want users to access their own databases and don't want them to interfere with others.
The advanced authentication method is safe because standard users only need read-only access to the MySQL library. MySQL password can not be easily cracked, the
To see another user's plaintext password for a normal user.

$cfgServers [n][' user '] string
$cfgServers [n][' password '] string
When using the Basic authentication method, phpMyAdmin will connect to this MySQL server using a username/password pair. When using the Advanced authentication Party
You don't need it when you type.

$cfgServers [n][' Stduser '] string
$cfgServers [n][' Stdpass '] string
When using the advanced authentication method, the username/password pair is used to verify the true username/password pair. This user must be able to connect to MySQL,
And you can read the user table in the MySQL library. It is not required when using the Basic authentication method.

$cfgServers [n][' only_db '] string
If a database name is set, only this database will be displayed to the user.

$cfgServers [n][' verbose '] string
It is only useful to use phpMyAdmin on multiple server portals. If set, this string will be displayed to replace the hostname in the Drop-down menu in the main page. For example, this might be useful if you want to display only certain databases in the system.


$cfgManualBase string
If set to a URL (it points to a MySQL document), the appropriate Help link is created.


$cfgPersistentConnections Boolean value
Whether to use persistent connections (mysql_connect or mysql_pconnect).

$cfgConfirm Boolean value
Should you display a warning message when you're about to lose data ("You really sure you want to ...").

$cfgMaxRows integer
The number of records to display when browsing a result set. If the result set contains more data, a link to the previous page/back page is displayed.

$cfgMaxInputsize integer
When you add a new record to a table, edit the size of the field.

$cfgBorder integer
The size of the table boundary.

$cfgThBgcolor string [HTML color]
The color used in the head of the table.

$cfgBgcolorOne string [HTML color]
The color of the first row of the table row.

$cfgBgcolorTwo string [HTML color]
The color of the second row of the table row.

$cfgOrder string ["DESC" |] ASC "]
Defines whether the field is displayed in ascending order ("ASC") or in descending order ("DESC") when you click on the field name.

$cfgShowBlob Boolean value
Defines whether a BLOB field is displayed when browsing the contents of a table.

$cfgShowSQL Boolean value
Defines whether the SQL query statement generated by the phpMyAdmin is displayed.

$cfgColumnTypes Array
All possible types of MySQL columns. Most of the cases you don't need to edit it.

$cfgFunctions Array
A list of MySQL support functions. Most of the cases you don't need to edit it.

$cfgAttributeTypes Array
The possible properties of the field. Most of the cases you don't need to edit it.

FAQ-FAQ
I can't insert a new record into the table--MySQL returns a SQL error.

Carefully check for SQL errors. I found that a lot of programmers used the wrong field type. Common errors include the following:

No size specified using varchar
Size specified using a text or blob
Also, check out the grammar chapters in the MySQL manual to make sure your grammar is correct.

phpMyAdmin cannot connect to MySQL. What's wrong?

Either the problem with the PHP installation or your username/password is wrong. Try to make up a small script with mysql_connect to see a
Under whether it can work. If not, it is possible that MySQL has not been compiled in PHP.

I can't edit the contents of the table, although the readme says it's a feature of phpMyAdmin.


phpMyAdmin only allows you to edit the contents of a table that has a primary key or unique key value.

When using advanced authentication management, phpMyAdmin always gives the process ban (Access denied).

There may be several reasons for this happening:

$stduser/$stdpassword is not correct. Try to turn off the $adv_auth and use this username and password to connect to MySQL.
The username/password specified in the logon dialog box is incorrect. Try the same method above to see if you can work.
You have set up a security mechanism for the phpMyAdmin installation directory, such as. htaccess files. This might interfere with phpMyAdmin's recognition.
Card management, then remove it.
I want to help with the development of phpMyAdmin. How should I proceed?

The following approach is preferred for new developers:

Remove the current CVS on anonymous CVS:
cvs-d:p server:anon@www.htmlwizard.net:/usr/local/cvsroot Login
[Password:phpmyadmin]
cvs-d:p Server:anon@www.htmlwizard.net:/usr/local/cvsroot Checkout phpMyAdmin
[This will create a new subdirectory named phpMyAdmin]
Join your stuff.
Send the modified file to me (tar format or gzip format) write permission to the CVS tree is authorized only to experienced phpMyAdmin have made
A contributor to the developer.

Take another look at the developers file.
What are some good ways to make phpmyadmin more secure against malicious attacks?

It depends on your system. If you are running a server that cannot be used by someone else, use the Web server's directory protection bindings
Is enough (for example, you can use the. htaccess file for Apache). If other people can access your service via Telnet
, it is not a good way to keep the MySQL password in plain text in your config.inc.php3 file. In this case you should
The use of phpMyAdmin Advanced authentication mode function.

How can I insert a null value into my table?

Enter the value of "null" (without quotes) as a field. This is especially useful for timestamps or automatic increment fields.

I am an ISP provider. Can I install a master phpmyadmin copy? Or do you need to install one for each customer?

Starting with version 2.0.3, you can install a master phpMyAdmin copy for all of your users. This feature is developed by the
Netcologne GmbH Initiative. This requires a reasonable set of MySQL users, and set the phpMyAdmin Advanced authentication method. When the certification
A user, phpMyAdmin performs these steps:

Select a record from the Mysql.user table that matches all user names/passwords to the application user. If no records are returned, authentication fails.
Otherwise, phpMyAdmin continues the 2nd step.
If the user's global Select_priv is "N" (that is, the user does not allow access to all databases), phpMyAdmin searches mysql.db
Table to find a record of the select_priv= "Y" for this user. If no records are found, authentication fails. Otherwise, phpMyAdmin
Displays all databases that are allowed to be viewed by the user.
If the user's global Select_priv is "Y", all the databases in the system are displayed.

This means you need to add users to the MySQL library as follows:

INSERT into User (Host, user, Password, 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) VALUES (' localhost ' , ' foo ', PASSWORD (' Bar '), ' n ', ' n ', ' n ', ' n ', ' n ', ' n ', ' n ', ' n ', ' n ', ' n ', ', ', ' n ', ', ', ', ', ' ', ' n '.
INSERT into db (Host, DB, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, Re Ferences_priv, Index_priv, Alter_priv) VALUES (' localhost ', ' foo_db ', ' foo ', ' y ', ' y ', ' y ', ' y ', ' y ', ' y ', ', ', ', ', ', ', ', ')

That way, for user Foo, only the "foo_db" library will be displayed.

phpMyAdmin Home: http://www.htmlwizard.net/phpMyAdmin/



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.