Connecting safely
Now that the root user has a password, it's up to us to make sure that password, and the passwords of all the other users we will inevitably create, stay secure and not get revealed by mistake. One of the most important ways to do that is to always follow good practice when connecting.
Connecting safely on the command line
When connecting to MariaDB as the root, or any other user from the command line, we tell the mysql
command-line client that we are connecting with a password by using the -p
flag. When we do so, we can either specify the password right after the -p
flag with no space in between, as shown in the following example:
mysql -u root -pmypassword
Or, even better, we can just leave the -p
flag by itself and the client ...
Get Getting Started with MariaDB - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.