Connecting to MySQL/MariaDB through Command Line

From PKC
Jump to navigation Jump to search

Articles[1] that explaining how to use command line to access MySQL can be easily found on the web. However, an important thing that novice database administrators must learn is that MySQL (MariaDB is an implementation of MySQL forked in 2009) stores its secrets in the database. This means that if you were to be using Docker-Compose or similar tools to create certain instances of database, that had already created an image that captures the password defined earlier, then, you will have to use the password settings defined in the earlier stages to access the database. Not knowing this mechanism could cause you hours of trial/error without getting anywhere.

References