LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mysqladmin

administers MySQL servers

TLDR

Check server status
$ mysqladmin -u [user] -p status
copy
Create database
$ mysqladmin -u [user] -p create [database_name]
copy
Drop database
$ mysqladmin -u [user] -p drop [database_name]
copy
Change password
$ mysqladmin -u [user] -p password "[newpassword]"
copy
Show variables
$ mysqladmin -u [user] -p variables
copy
Show process list
$ mysqladmin -u [user] -p processlist
copy
Shutdown server
$ mysqladmin -u [root] -p shutdown
copy
Ping server
$ mysqladmin -u [user] -p ping
copy

SYNOPSIS

mysqladmin [options] command

DESCRIPTION

mysqladmin is a command-line client for performing administrative operations on MySQL servers. It can check server status, create and drop databases, reload privileges, flush logs, and shut down the server.Common administrative tasks include checking if the server is alive (ping), viewing server variables and status counters (variables, extended-status), reloading grant tables after permission changes (flush-privileges), and monitoring active connections (processlist).

PARAMETERS

COMMAND

Administration command.
-u USER
Username.
-p [PASSWORD]
Password.
-h HOST
Server hostname.
status
Show server status.
create DB
Create database.
drop DB
Drop database.
flush-privileges
Reload grant tables.
extended-status
Show server status variables.
--help
Display help information.

INSTALL

sudo apt install mariadb-client
copy
sudo apk add mariadb-client
copy
sudo zypper install mariadb-client
copy

CAVEATS

Requires admin privileges. Dangerous operations (drop). Use carefully in production.

HISTORY

mysqladmin is part of the MySQL distribution, providing command-line administration since early versions.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid