Category: MySQL/MariaDB

Mysql client usage tips

Performing your SQL tasks using mysql client might not be as easy as it is in any web or graphical user interface (like phpmyadmin for instance), but there are few tips that could definitely help easing it a bit. Commands The mysql client supports commands. These have long and short form, you can use both

Mysql client connect options

It might happen that you don’t have access to MySQL via phpmyadmin or some other user friendly tool. Then what usually comes to help is the console mysql client. Bellow are listed the most important options when connecting to mysql server: -u , –user=name  – the login user -p , –-password[=name] – the login password

Catching slow queries with mysql client

There might be times when you just need to check all currently running queries so to catch any possible slow ones. Then, instead of enabling the mysql slow log it’s easier to check these with the mysql client using the SHOW FULL PROCESSLIST statement. You could also use the shorter form, SHOW PROCESSLIST, but keep

How to enable mysql slow query log

Following are 3 different ways to enable the slow log: 2 on mysqld startup and 1 while it’s running 1. Enable it in the config That’s the most obvious way. You should locate your my.cnf config file (usually in /etc/ for most unix/linux based operating systems) and in it under the [mysqld] section add: