PhpMyAdmin2.x. x-document (installation and configuration)

Source: Internet
Author: User
Tags mysql manual php3 file sql error
Preface phpMyAdmin can manage the entire MySQL server (requires a super user) or a single database. To implement the latter, you need to properly set the MySQL User, which can only read and write the permitted databases. Wait until you have read the related sections in the MySQL manual. Quick installation: remove the phpMyAdmin package to a directory. Open config. inc. p phpmyadmin

Preface
PhpMyAdmin can manage the entire MySQL server (requires a super user) or a single database. To implement the latter, you
The MySQL User needs to be properly set, and he can only read/write the permitted databases. Wait until you have read the related sections in the MySQL manual.

Quick installation

Remove the phpMyAdmin package to a directory.
Open config. inc. php3 and modify $ regionservers [1] ['host'], $ regionservers [1] ['user'] and
$ Login servers [1] ['password'] value. You can refer to all the configurable variables listed in the configuration section under "tables ".
Other parameters.
We recommend that you protect the directory after installing phpMyAdmin (unless on an enterprise Intranet ). For example, you can use a HTTP-AUTH (with a. htaccess file ).
Open the file in the browser: install the host domain name/installation directory/index. php3. PhpMyAdmin should display a welcome screen and your number
Database.
PhpMyAdmin supports multiple languages. If you want to change to the Chinese version, modify require ("english. inc. php3") in config. inc. php3 to require ("chinese_gb.inc.php3 "). In this way, the interface is Chinese. Great!
Save config. inc. php3.
Installation notes
Make sure that the phpMyAdmin directory is protected. No protection is provided by default! It should not be read by anyone, especially the search engine.
Although I add a "nofollow" command to each page, some search engines may not consider continuing to access the page links.
Imagine how AltaVista accessed a link named "Drop Dtabase. You can
At http://www.apacheweek.com/features/userauth, you can fully understand the authentication certificate of apache. Another tutorial
In http://deepthought.texsci.edu/protected_dirs.html
PHP3 should be configured as magic_quotes = on.
Configuration
All configurable data is stored in config. inc. php3.

$ Worker servers array
PhpMyAdmin supports managing multiple MySQL-servers from version 1.4.2. Therefore, the $ regionservers array is added for storage.
Logon information of different servers. $ Incluservers [1] ['host'] contains the host name of the first server, $ incluservers [2] ['host']
Is the host of the second server, and so on. If you only have one server to manage, you can simply ignore the other $ ingress servers
The host name of the port.

$ Define servers [n] ['port'] string
The port number of the nth MySQL server. The default value is 3300 (the null value is retained ).

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

$ Incluservers [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 a common practice:
The user name and password are stored in config. inc. php3. Advanced Authentication ($ adv_auth = true) is introduced from version 1.3.0.
Use HTTP-Auth to log on as a valid MySQL User. In config. inc, you only need to provide a standard user who can connect
To MySQL and read the user/db table of the mysql database (see $ login servers [n] ['stduser']).

We recommend that you use advanced management:

When phpMyAdmin is running in a multi-user environment and people have shell processing permissions, you do not want to know the MySQL User name/password.
When you want users to access their own databases and do not want them to interfere with others.
Advanced Authentication is secure because standard users only need read-only permissions on the mysql database. MySQL passwords cannot be easily cracked.
The plaintext password of other users is not displayed for a common user.

$ Incluservers [n] ['user'] string
$ Login servers [n] ['password'] string
When the basic authentication method is used, phpMyAdmin uses the user name/password to connect to the MySQL server. When using advanced certification providers
Is not required.

$ Incluservers [n] ['stduser'] string
$ Incluservers [n] ['stdpass'] string
When advanced authentication is used, the user name/password pair is used to verify the real user name/password pair. This user must be able to connect to MySQL,
You can also read the user table of the mysql database. This parameter is not required when basic authentication is used.

$ Incluservers [n] ['only _ db'] string
If a database name is set, only this database is displayed to the user.

$ Incluservers [n] ['verbose '] string
PhpMyAdmin is only useful for multiple server portals. If this parameter is set, the string is displayed to replace the host name in the context menu on the home page. For example, if you want to display only some databases in the system, this may be useful.


$ CfgManualBase string
If it is set to a URL (which points to the MySQL document), a corresponding help link is created.


$ Define persistentconnections Boolean value
Whether to use persistent connection (mysql_connect or mysql_pconnect ).

$ Define confirm Boolean value
Whether a warning message ("Are you sure you want to...") should be displayed when you are about to lose data ...").

$ Explain maxRows integer
The number of records displayed when you browse a result set. If the result set contains more data, the link to the previous or back pages is displayed.

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

$ CfgBorder integer
The size of the table boundary.

$ CfgThBgcolor string [HTML color]
Used in the color of the header.

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

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

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

$ Empty showblob Boolean value
Determines whether the BLOB field is displayed when you browse the content of a table.

$ Explain showsql Boolean value
Determines whether to display the SQL query statements generated by phpMyAdmin.

$ Columntypes array
All possible MySQL column types. In most cases, you do not need to edit it.

$ CfgFunctions array
List of functions supported by MySQL. In most cases, you do not need to edit it.

$ CfgAttributeTypes array
Possible attributes of a field. In most cases, you do not need to edit it.

FAQ-FAQs
I cannot insert a new record to the table -- MySQL returns an SQL error.

Check SQL errors carefully. I found that many programmers use the wrong field type. Common errors include:

No size specified when using VARCHAR
The size is specified using TEXT or BLOB.
In addition, check the syntax section in the MySQL manual to confirm that your syntax is correct.

PhpMyAdmin cannot connect to MySQL. What's wrong?

Or PHP installation problems or your username/password is incorrect. Compile a small script using mysql_connect.
Whether it can work. If not, it may be that MySQL has not been compiled in PHP.

I cannot edit the table content, although README says this is a special feature of phpMyAdmin.


PhpMyAdmin only allows you to edit the content of a table with the primary key or unique key value.

When advanced authentication management is used, phpMyAdmin always provides "Access denied )".

There may be several reasons:

$ Stduser/$ stdpassword is incorrect. Disable $ adv_auth and use this username and password to connect to MySQL.
The user name/password specified in the logon dialog box is incorrect. Try the same method above to see if it can work.
You have created a security mechanism for the phpMyAdmin installation directory, for example, the. htaccess file. This may interfere with phpMyAdmin's recognition.
Certificate Management, then delete it.
I want to help phpMyAdmin development. What should I do?

The following method is preferred for new developers:

Obtain the current CVS on anonymous CVS:
Cvs-d: pserver: anon@www.htmlwizard.net:/usr/local/cvsroot login
[Password: phpMyAdmin]
Cvs-d: pserver: anon@www.htmlwizard.net:/usr/local/cvsroot checkout phpMyAdmin
[Create a new subdirectory named phpMyAdmin]
Add your stuff
Send the modified file to me (tar or gzip) and grant the write permission to the CVS tree to experienced phpMyAdmin users.
Contributed by developers.

Take a look at the DEVELOPERS file.
Is there any good way to make phpMyAdmin more secure against malicious attacks?

It depends on your system. If you are running a server that cannot be used by others, use the directory protection binding of the web server.
This is enough (for example, you can use the. htaccess file for Apache ). If other users can access your service through telnet
To save the MySQL password in plain text in your config. inc. php3 file. In this case, you should
This uses the advanced authentication function of phpMyAdmin.

How can I insert a null value to my table?

Enter "null" (no quotation marks) as the field value. This is particularly useful for timestamps or automatically adding fields.

I am an ISP supplier. Can I install phpMyAdmin copy of a master? Or do I need to install one for every customer?

From version 2.0.3, you can install a master phpMyAdmin copy for all your users. This feature is developed
Proposed by NetCologne GmbH. In this way, you must set the MySQL User reasonably and set the advanced authentication method of phpMyAdmin. When authenticated
When a user is using phpMyAdmin, perform these steps:

Select all records whose usernames/passwords match the applied user from the mysql. user table. If no record is returned, authentication fails.
Otherwise, phpMyAdmin continues step 1.
If your global Select_Priv is "N" (that is, you are not allowed to access all databases), phpMyAdmin searches for mysql. db.
Table to find records of Select_Priv = "Y" for this user. If no record is found, authentication fails. Otherwise, phpMyAdmin
Displays all databases that can be viewed by users.
If your global Select_Priv is "Y", all the databases in the system are displayed.

This means you need to add users to the mysql database as follows:

Insert into user (Host, User, Password, Select_priv, primary, Update_priv, Delete_priv, Create_priv, Drop_priv, primary, Shutdown_priv, primary, File_priv, Grant_priv, primary, Index_priv, Alter_priv) VALUES ('localhost', 'foo', PASSWORD ('bar'), 'n ', 'N', 'n', 'n ')
Insert into db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, VALUES, Index_priv, Alter_priv) VALUES ('localhost ', 'foo _ db', 'foo', 'y ',',',', ')

In this 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.