Escolar Documentos
Profissional Documentos
Cultura Documentos
7 and more
In order not to interfere with MySQL, the default port used by MariaDB is port
3307.
To allow the use of MariaDB, the relevant option must be validated in the
Wampserver settings:
Right-click Wampmanager icon -> Wamp settings -> Allow MariaDB
But... still have to install a version of MariaDB 10.1.19 or upper of which you
will find the installer on Sourceforge or on 'http://wampserver.aviatechno.net'
Once the MariaDB item appears in the Wampmanager menus, you can use it.
--- Some details about using MariaDB with Wampserver 3.0.7
--- PhpMyAdmin
PhpMyAdmin can be set to use either MySQL or MariaDB.
Just modify the file wamp\apps\phpmyadmin4.x.y\config.inc.php by declaring a second
server with MariaDB.
When calling PhpMyAdmin, there will be the choice of the server: MySQL or MariaDB.
/* Servers configuration */
$i = 0;
$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.7/en/';
/* End of servers configuration */
?>
--- End of file
For your connections to a database server to be done with MariaDB instead of MySQL,
you must specify the port number.
Indeed, without specifying the port, it will be the default port that will be used,
therefore 3306, so the default port assigned to MySQL.
Connection scripts use, for example:
$mysqli = new mysqli('127.0.0.1', 'user', 'password', 'database');
Or, in procedural terms :
$mysqli = mysqli_connect('127.0.0.1', 'user', 'password', 'database');
if ($mysqli->connect_error) {
die('Connect Error (' . $mysqli->connect_errno . ') '
. $mysqli->connect_error);
}
echo '<p>Connection OK '. $mysqli->host_info.'</p>';
echo '<p>Server '.$mysqli->server_info.'</p>';
$mysqli->close();
?>