Home arrow MySQL arrow Page 3 - MySQL in SSH: Basic Guide

Basic MySQL Database and Table Commands in SSH - MySQL

There are some hosting companies that do not offer an SSL (Secure Socket Layer) environment for MySQL. It is important to have an SSL environment for MySQL, because your sessions are protected with “encryption.” Fortunately, if you can't get SSL with your hosting company, there is an alternative: SSH.

  1. MySQL in SSH: Basic Guide
  2. Connecting to MySQL Server using the Putty SSH Client
  3. Basic MySQL Database and Table Commands in SSH
  4. Creating a New MySQL Table and Configuration
By: Codex-M
Rating: starstarstarstarstar / 5
May 03, 2010

print this article



After logging in,  below you will find the important commands that you should know (bolded words are the exact commands, while the part that is not bolded is the MySQL prompt):

1. Showing all MySQL databases in your server

mysql> show databases;

2. Access the database and use it:

mysql> use databasename;

For example, if your MySQL database name is moviedatabase then:

mysql> use moviedatabase;

3. Showing all the MySQL tables for the specified database name:

mysql> show tables from databasename;

4. Show all of the records from a specified table

mysql> select * from databasetablename;

To view the entire records of a specified table, you should ensure that:

  • You have selected the database to work using USE command.
  • You know the exact database table name; if not, execute the "SHOW TABLES from databasename;" command to get the list of tables.

5. Show all of the database table field names, type and configuration of a certain table:

mysql> describe databasetablename;

Before you try to view database table specifics like its configuration, make sure that you have selected a database using the USE command.

6. Exiting the MySQL server

mysql> exit

>>> More MySQL Articles          >>> More By Codex-M

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Oracle Unveils MySQL 5.6
- MySQL Vulnerabilities Threaten Databases
- MySQL Cloud Options Expand with Google Cloud...
- MySQL 5.6 Prepped to Handle Demanding Web Use
- ScaleBase Service Virtualizes MySQL Databases
- Oracle Unveils MySQL Conversion Tools
- Akiban Opens Database Software for MySQL Use...
- Oracle Fixes MySQL Bug
- MySQL Databases Vulnerable to Password Hack
- MySQL: Overview of the ALTER TABLE Statement
- MySQL: How to Use the GRANT Statement
- MySQL: Creating, Listing, and Removing Datab...
- MySQL: Create, Show, and Describe Database T...
- MySQL Data and Table Types
- McAfee Releases Audit Plugin for MySQL Users

Developer Shed Affiliates


Dev Shed Tutorial Topics: