MySQL Session Management

Command Line Interface

Connect

Connect to the MySQL RDBMS via the mysql binary, specifying host tethys and that you will authenticate with a password:


% mysql -h tethys -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.57-log FreeBSD port: mysql-server-5.1.57

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
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.

mysql> 

Show Databases

Show databases that you have permission to see.


mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| UBITname_db        |
| test               |
+--------------------+
3 rows in set (0.00 sec)

Select a Database


mysql> use UBITname_db;
Database changed

Show Tables within the Selected Database


mysql> show tables;
Empty set (0.00 sec)

mysql>

Change Your Password

When you get your new account, change your default password to a password only you know.


mysql> set password = password('MyPassw0rd');

Quit


mysql> quit
Bye