mysql -V
mysql --version
mysqld --version
If there are no firewalls blocking your route, you can also get basic version information using telnet or nc...
telnet myserver 3306
nc myserver 3306
Example output from nc...
U8.0.23-commercial(h(Mj3_*n▒▒▒▒▒5ek-*(1LNcaching_sha2_password^CSELECT VERSION();
SELECT @@VERSION;
SHOW VARIABLES LIKE "%version%";
sudo systemctl status mysqld
sudo service mysql status
mysql -uusername -p -estatus
sudo /etc/init.d/mysql status
This only works on some systems
SHOW GLOBAL STATUS LIKE 'Uptime';
SELECT TIME_FORMAT(SEC_TO_TIME(VARIABLE_VALUE ),'%Hh %im') AS Uptime
FROM information_schema.GLOBAL_STATUS
WHERE VARIABLE_NAME='Uptime';
Reasons why MySQL might have poor performance...
Reasons why MySQL might have poor performance...
Resource Bottlenecks (I/O, Memory, CPU)
Sub-optimal Server Settings
Other programs (e.g. Backup, Virus-Checkers etc)
Faulty hardware
Bad queries / database design
Table Corruption / Fragmentation
OS / MySQL Bugs
Storage issues (full filesystems, incorrect permissions)