Top Five MySQL Commands

As Sys admins we are often tasks with working on multiple and disparate systems we need to know a little about everything to allow use to do our jobs effectively. This post will detail my top five MySQL commands to know – with one bonus command! The commands are:

  1. Create database wordpress;
    1. This command creates a database call wordpress.
  2. Show databases;
    1. The Command shows all databases that reside on the server.
  3. Use wordpress;
    1. Selects the wordpress database for use – all subsequent commands will run the wordpress database.
  4. show tables;
    1. Shows all tables within the current selected database.
  5. select * from courses;
    1. Displays all information from the courses table.
  6. Bonus Command! grant all on WordPress.* to ‘wordpressuser’@’localhost’ identified by ‘wordpresspass’;
    1. Grants all permissions on the WordPress database from the user wordpressuser from the local machine with the password wordpresspass

If you want to see these commands in action check out the youtube video here:

Also be sure to download the cheetsheet here which you can save and print out:


Top Five MySQL Commands

Leave a Reply

Your email address will not be published. Required fields are marked *