Databases Reference
In-Depth Information
If the hostname is not
localhost
, a TCP connection will occur; in this case, on the
special port
3307
. However, leaving the port value empty would use the default
3306
port:
$cfg['Servers'][$i]['host'] = 'mysql.mydomain.com';
$cfg['Servers'][$i]['port'] = '3307';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
compress
The protocol used to communicate between PHP and MySQL allows a compressed
mode. Using this mode provides better efficiency. To take advantage of this mode,
simply specify:
$cfg['Servers'][$i]['compress'] = TRUE;
PersistentConnections
Another important parameter (which is not server-specific but applies to all server
definitions) is
$cfg['PersistentConnections']
. For every server we connect to
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
as
persistent connections are often a cause of resource depletion on servers (you would
find MySQL refusing new connections). For this reason, the option is not even
available for the
mysqli
extension. Hence, setting it to
TRUE
here would have no
effect if you are connecting with this extension.
controluser
Defining the control user has the following two purposes:
• On a MySQL server running with
--skip-show-database
, the control user
permits the use of multi-user authentication even though servers running
with this option are not commonly seen. This aspect is described in
Chapter
2
.
• On all versions of MySQL server, this user is necessary to be able to use
the advanced features of phpMyAdmin.
Search WWH ::
Custom Search