Database Reference
In-Depth Information
MariaDB Tools
As just explained, MariaDB is a client-server DBMS, and so to use MariaDB
you need a client, an application that you use to interact with MariaDB (giving
it commands to be executed).
There are many client application options, but when learning MariaDB (and
indeed, when writing and testing MariaDB scripts) you are best off using a
utility designed for just that purpose. Two tools in particular warrant specific
mention.
mysql Command Line
Every MariaDB installation comes with a simple command line utility called
mysql . This utility does not have any drop-down menus, fancy user interfaces,
mouse support, or anything like that.
Typing mysql at your operating system command prompt displays a welcome
message followed by a simple prompt that looks like this:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1
Server version: 5.2.4-MariaDB Source distribution
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2
license
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
MariaDB [(none)]>
Note
MySQL Options and Parameters If you just type mysql by itself, you might receive an
error message. This will likely be because security credentials are needed or because
MySQL is not running locally or on the default port. mysql accepts an array of com-
mand line parameters you can (and might need to) use. For example, to specify a
user login name of ben , you'd use mysql -u ben . To specify a username, host
name, port, and be prompted for a password, you'd use mysql -u ben -p -h
myserver -P 9999 .
A complete list of command line options and parameters can be obtained using mysql
--help .
Of course, your version and connection information might differ, but you'll be
able to use this utility regardless. Note that:
 
 
 
Search WWH ::




Custom Search