Database Reference
In-Depth Information
3
Working with MariaDB
In this chapter, you learn how to connect and log in to MariaDB, how to issue
MariaDB SQL statements, and how to obtain information about databases and
tables.
Making the Connection
Note
Example Tables Required From this point on, all chapters will use the example
databases and tables. If you have yet to install these, see Appendix B, “The Example
Tables,” before proceeding.
Now that you have a MariaDB DBMS and client software to use with it, it
would be worthwhile to briefly discuss connecting to the database.
MariaDB, like all client-server DBMSs, requires that you log in to the DBMS
before being able to issue commands. Login names might not be the same as
your network login name (assuming that you are using a network); MariaDB
maintains its own list of users internally and associates rights with each.
When you first installed MariaDB, you may have been prompted for an
administrative login (usually named root ) and a password (if you weren't, then
the root user account was created with no password). If you are using your
own local server and are simply experimenting with MariaDB, using this login
is fine. In the real world, however, the administrative login is closely protected
(as access to it grants full rights to create tables, drop entire databases, change
logins and passwords, and more).
To connect to MariaDB you need the following pieces of information:
The hostname (the name of the computer)—this is localhost if
connecting to a local MariaDB server
The port (if a port other than the default 3306 is used)
A valid user name
The user password (if required)
 
 
 
Search WWH ::




Custom Search