Determine MySQL Version via Command Line

Want to find out what version MySQL you are running using only your command line interface? This one is super easy. Log in to MySQL (replace “root” with your username of choice or keep as root) Enter your password when prompted Run the following statement Your output might look something like this…

Selectively Dump Data with mysqldump

You can dump part of a table using the mysqldump in command line. ┬áThe command is… The “-t” flag will suppress the “DROP” and “CREATE” commands so you will be left with a clean “INSERT” statement that you can load where ever needed. You can also use a shortcut for the “where” by using just […]

Create MySQL Database and Add New User (command line)

Here is a quick example of how to create a database, assign a new user and set their password. Connect to MySQL server as user “root” (you will be prompted for a password) The “mysql>” prompt will now appear. Create new database… we’ll call it “orders” Give user (named “fluffy”) full permissions Set password for […]