Databases Reference
In-Depth Information
$cfg['Servers'][$i]['hide_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
In this section, we have to enter in $cfg['Servers'][$i]['host'] the hostname or
IP address of the MySQL server - for example, mysql.mydomain.com or localhost .
If this server is running on a non-standard port or socket, we fill in the correct values
in $cfg['Servers'][$i]['port'] or $cfg['Servers'][$i]['socket'] . See the
section on connect_type for more details about sockets.
The displayed server name inside phpMyAdmin's interface will be the one entered in
'host' (unless we enter a non-blank value in the following parameter). For example:
$cfg['Servers'][$i]['verbose'] = 'Test server';
This feature can thus be used to hide the real server hostname as seen by the users.
extension
The traditional mechanism by which PHP can communicate with a MySQL server,
as available in PHP before version 5, is the mysql extension. This extension is still
available in PHP 5, but a new one called mysqli has been developed and should be
preferred for PHP 5, because of its improved performance and its support of the full
functionality of MySQL family 4.1.x. This extension is designed to work with MySQL
version 4.1.3 and higher.
In phpMyAdmin version 2.6.0, a new library has been implemented, making possible
the use of both extensions - choosing either for a particular server. We indicate the
extension we want to use in $cfg['Servers'][$i]['extension'] .
PersistentConnections
Another important parameter (which is not server-specific but applies to all server
definitions) is $cfg['PersistentConnections'] . For all servers to which we
connect using the mysql extension, this parameter, when set to TRUE , instructs PHP
to keep the connection to the MySQL server open. This speeds up the interaction
between PHP and MySQL. However, it is set to FALSE by default in config.inc.
php , because persistent connections are often a cause of resource depletion on servers
- MySQL refusing new connections. For this reason, the option is not even available
for the mysqli extension, so setting it to TRUE here would have no effect if you are
connecting with this extension.
connect_type, socket and port
Both the mysql and mysqli extensions automatically use a socket to connect to
MySQL if the server is on localhost . Consider this configuration:
 
Search WWH ::




Custom Search