Databases Reference
In-Depth Information
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
The default value for connect_type is tcp . However, the extension will use a socket
because it concludes that this is more efficient as the host is localhost , so in this
case, we can use tcp or socket as the connect_type . To force a real tcp connection,
we can specify 127.0.0.1 instead of localhost in the host parameter. Because the
socket parameter is empty, the extension will try the default socket. If this default
socket, as defined in php.ini , does not correspond to the real socket assigned to the
MySQL server, we have to put the socket name (for example, /tmp/mysql.sock ) in
$cfg['Servers'][$i]['socket'] .
If the hostname is not localhost , a tcp connection will occur - here, on the special
port 3307 . However, leaving the port value empty would use the default 3306 port:
$cfg['Servers'][$i]['host'] = 'mysql.domain.com';
$cfg['Servers'][$i]['port'] = '3307';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
compress Configuration
Starting with PHP 4.3.0 and MySQL 3.23.49, 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;
Authentication Type: config
For our first test, we will use the config authentication type, which is easy to
understand. However, in the Multi-User Installation section, we will see more
powerful and versatile ways of authenticating.
Although it seems that we are logging in to phpMyAdmin, we are not! The
authentication system is a function of the MySQL server. We are merely using
phpMyAdmin (which is running on the web server) as an interface that sends our
user and password information to the MySQL server. Strictly speaking, we do not
log in to phpMyAdmin but through phpMyAdmin.
 
Search WWH ::




Custom Search