Can any one please help in that
in confg.php
used $CFG->dbtype = 'mariadb'; and this also $CFG->dbtype = 'mysqli';
still error occur in sometime
·
Not enough info .... :|
Not only DB type ... but DB host. Local or another machine. DB user. User have prev's to do Moodle? Where and how are you hosted? With whom?
Version of Moodle?
Have you a tool to check db for moodle ... like cPanel or do you have access to server where you could use mysql client from command line?
Can DB do utf8mb4 character set/collation ....
'SoS', Ken
As Ken says, we need more information. What database type and version is this? Is the database on the Moodle web server or a different server?
Check Connection_errors_max_connections in the global status, this should be 0, e.g.:
SHOW GLOBAL STATUS LIKE 'Connection_errors_max_connections';
+-----------------------------------+-------+
| Variable_name | Value |
+-----------------------------------+-------+
| Connection_errors_max_connections | 0 |
+-----------------------------------+-------+
If it's non-zero, check max_connections:
SHOW GLOBAL VARIABLES LIKE 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
This can be increased with SET GLOBAL max_connections = 200 (or more than 200) and adding max_connections = 200 to the database configuration file to make it persistent. Your hosting provider may manage this setting in which case you would need to contact them.