1

tried

SET GLOBAL max_connections = 1024;

to change maximum number of connections its showing

1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation.

now Bigrock is telling me that I have to get a dedicated server to be able to increase maximum connections. [I'm using a linux shared hosting] is there any other way?

Lelio Faieta
  • 6,457
  • 7
  • 40
  • 74
amateurCoder
  • 11
  • 1
  • 5
  • if you really need to increase that value either: your application is big enough for dedicated resource or you have some errors in your architecture that are leading to a connection overhead – Lelio Faieta Mar 30 '22 at 10:27
  • already answered see this https://stackoverflow.com/questions/31315660/1227-access-denied-you-need-at-least-one-of-the-super-privileges-for-thi – Mamun Malik Mar 30 '22 at 10:31
  • Does this answer your question? [#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation](https://stackoverflow.com/questions/31315660/1227-access-denied-you-need-at-least-one-of-the-super-privileges-for-thi) – Javier G.Raya Mar 30 '22 at 10:43
  • @MamunMalik sorry, but could you tell how to increase maximmum-no-of-connections? – amateurCoder Mar 30 '22 at 10:47
  • @JavierG.Raya this certainly doesnot answer my question. – amateurCoder Mar 30 '22 at 10:48
  • @LelioFaieta ` ` ` SHOW VARIABLES LIKE "max_connections"; ` ` ` shows 150 connections max. but I need more than that. – amateurCoder Mar 30 '22 at 10:51
  • Your service provider offered you the option of moving to a dedicated host. That's their requirement if you need more database connections. This is clearly not a code issue. – Bill Karwin Mar 30 '22 at 17:13

1 Answers1

0

To permanently increase max connections, open my.cnf file,

sudo vi /etc/my.cnf

Depending on your Linux distribution and type of installation, my.cnf file may be located at any of the following locations.

/etc/my.cnf
/etc/mysql/my.cnf
$MYSQL_HOME/my.cnf
~/.my.cnf

Add the following line under [mysqld] section.

max_connections = 200

Now if you restart MySQL server, the changes will persist.