Too many connections” error mysql
$ mysql –u root –p SHOW STATUS LIKE 'max_used_connections'; $ mysql –u root –p mysql> SHOW VARIABLES LIKE 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 151 | +-----------------+-------+ # vi /etc/my.cnf max_connections = 512 MySQL my.cnf file - Found option without preceding group Just add [mysqld] as first line in the /etc/mysql/my.cnf file. Example [ mysqld] max_connections = 512 If on Ubuntu try without the 'd' systemctl start mysql