Home >> FAQs/Tutorials >> MySQL Tutorials

MySQL Tutorial - What Is "mysql" Command

By: FYIcenter.com

(Continued from previous topic...)

What Is "mysql"?

"mysql" is a command-line interface for end users to manage user data objects. You can use "mysql" to run any standard SQL statements against the server. For example, you use the following SQL statements to manage tables and table rows:

  • "CREATE TABLE links (name VARCHAR(80));" - Creates a table called "links" with one column.
  • "INSERT INTO links VALUES ('dba.fyicenter.com');" - Inserts a table row into "links" table.
  • "SELECT * FROM links;" - Selects all rows from "links" table and displays them on the screen.
  • "DELETE FROM links;" - Deletes all rows from "links" table.

"mysql" also allows you to run many non-SQL commands to gather information on your data objects. Here are some good examples:

  • "SHOW DATABASES;" - Displays all databases in your MySQL server.
  • "USE databaseName;" - Uses the specified database as the current database.
  • "SHOW TABLES;" - Displays all table in the current database.
  • "DESCRIBE links;" - Displays column information of the specified table.

To know about "mysql", read other parts of this FAQ collection.

(Continued on next topic...)

  1. What Tools Available for Managing MySQL Server?
  2. What Is "mysqld"?
  3. What Is "mysqladmin"?
  4. How To Check Server Status with "mysqladmin"?
  5. How To Shut Down the Server with "mysqladmin"?
  6. What Is "mysql"?
  7. How To Use "mysql" to Run SQL Statements?
  8. How To Show All Tables with "mysql"?
  9. What Is "mysqlcheck"?
  10. How To Analyze Tables with "mysqlcheck"?
  11. What Is "mysqlshow"?
  12. How To Show Table Names with "mysqlshow"?
  13. What Is "mysqldump"?
  14. How To Dump a Table to a File with "mysqldump"?
  15. What Is "mysqlimport"?
  16. How To Load Data Files into Tables with "mysqlimport"?

MySQL Tutorials:


Other Tutorials/FAQs:


Related Resources:


Selected Jobs: