Fix setting max_connections in mysql

This commit is contained in:
herlesupreeth
2021-07-07 12:37:36 +02:00
parent 97a57ec2c4
commit 9f0cbb7a99

View File

@@ -27,6 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
sed -i "s/127.0.0.1/0.0.0.0/g" /etc/mysql/mysql.conf.d/mysqld.cnf
sed -i "s/# max_connections = 151/max_connections = 250/g" /etc/mysql/mysql.conf.d/mysqld.cnf
cat > ~/.my.cnf <<EOF
[mysql]
user=root
@@ -52,7 +53,6 @@ then
mysql -u root -e "GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION";
mysql -u root -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY ''"
mysql -u root -e "FLUSH PRIVILEGES;"
mysql -u root -e "SET GLOBAL max_connections=200;"
fi
pkill -9 mysqld