Увеличаване броя на max_connections в MySQL

Проверяваме броя като се логнем с root в mysql

стандарнто са 150.

Сега може да ги увеличим по следния начин

след това отиваме в конфигурацията на mysql – my.cnf

За Debian базираните системи обикновенно се намира в /etc/mysql/my.cnf

За CentOS и RHEL базираните системи обикновенно се намира в /etc/my.cnf

и добавяме следния ред

след което рестартираме mysql.

Резултата е

 

Добавяне на база през конзола

Качване на база през конзола

сетване с различен енкодинг

 

Mysql_stat

(PHP 4 >= 4.3.0, PHP 5)

mysql_statGet current system status

Warning

This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi orPDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:

 

Example #1 mysql_stat() example

Outputs something similar to:

Uptime: 698
Threads: 1
Questions: 4
Slow queries: 0
Opens: 19
Flush tables: 1
Open tables: 12
Queries per second avg: 0.5

 

MySQL show status – show open database connections

MySQL „show status“ FAQ: Can you demonstrate how to use the MySQL show statuscommand to show MySQL variables and status information, such as the number of open MySQL connections?

I don’t have a whole lot of time today to give this a detailed discussion, but here is a quick look at some MySQL work that I did recently to show MySQL open database connections.

MySQL show status – Open database connections

You can show MySQL open database connections (and other MySQL database parameters) using the MySQL show status command, like this:

All those rows and values that are printed out correspond to MySQL variables that you can look at. Notice that I use like 'Conn%'in the first example to show variables that look like „Connection“, then got a little wiser in my second MySQL show status query.

Continue reading