Installing SQL Express

MSSQL Express 2017 on a Dedicated Server

Microsoft SQL Server is a powerful database that is commonly used with ASP.NET and other website programming languages. However, licensing for MSSQL can be expensive and is sometimes prohibitive for smaller businesses and applications. Fortunately, Microsoft provides a free version of MSSQL server called MSSQL Express. Installing MSSQL Express on your dedicated server is quick and easy, especially with the new features included in MSSQL Express 2017.

Continue reading “Installing SQL Express”

Restore Your WordPress Database with WP-CLI

This article is a follow up to a previous article on the process of backing up a WordPress database with wp-cli. You may want to read that article before this one.

In this article you will learn how to restore a WordPress database backup using wp-cli tool. Having this skill at your disposal is crucial for situations where you need to restore a backup in a pinch. This skill can be particularly helpful if you are testing major changes and need to revert back.

Pre-flight Check:

  • These instructions were created with a cPanel-based server in mind.
  • Command line access via SSH will be necessary to follow along.
  • The server must have WP-CLI installed, for installation directions see this tutorial.

Continue reading “Restore Your WordPress Database with WP-CLI”

How to Disable MySQL Strict Mode

MySQL’s, and MariaDB’s, strict mode controls how invalid or missing values in data changing queries are handled; this includes INSERT, UPDATE, and CREATE TABLE statements. With MySQL strict mode enabled, which is the default state, invalid or missing data may cause warnings or errors when attempting to process the query.

When strict mode is disabled the same query would have its invalid, or missing, values adjusted and would produce a simple warning. This may seem like the preferred result, however with strict mode disabled certain actions may cause unexpected results; for instance, when the value being inserted exceeds the maximum character limit it will be truncated to fit the limit. Continue reading “How to Disable MySQL Strict Mode”

Modifying Fields in Database Tables with phpMyAdmin

 

  1. This tutorial assumes you’ve already logged in to phpMyAdmin.
  2. Now let’s learn how to modify fields in database tables.
  3. Select the details table here.phpma-modifyfield-frame3_1
  4. Let’s modify the address field. Click Change  icon.phpma-modifyfield-frame4_1
  5. Make the changes you want, then click Save.phpma-modifyfield-frame6_1
  6. That’s it! We’ve successfully changed the name of the address field to city.phpma-modifyfield-frame7_1

 

Inserting Fields into Database Tables with phpMyAdmin

This tutorial assumes you’ve already logged in to phpMyAdmin. Let’s learn how to insert fields into database tables.

  1. Select the details table here.phpma-insertfield-frame03_1
  2. In this case, let’s choose to add an address field AFTER the name field.phpma-insertfield-frame05_1
  3. Click Save when finished.phpma-insertfield-frame11_1
  4. That’s it! Our details table now has a new address field.phpma-insertfield-frame12_1

 

Renaming Database Tables with phpMyAdmin

This tutorial assumes you’ve already logged in to phpMyAdmin. Let’s learn how to rename database tables.

  1. Click the database table you wish to rename.phpma-rename-frame3_1
  2. Then click the Operations tab.phpma-rename-frame4_1
  3. Enter a new name for the table here.phpma-rename-frame6_1
  4. Then click Go.
  5. That’s it! The information table has been renamed infotable, and is listed here.phpma-rename-frame7_1

 

Exporting Databases and Tables with phpMyAdmin

This tutorial assumes you’ve already logged in to phpMyAdmin. Let’s learn how to export a database.

  1. Click the database you wish to export here.phpma-export-frame03_1
  2. Then click the Export button.phpma-export-frame04_1
  3. In this case, we want to export the entire database in SQL format, so we can easily import it later. This is a good way to backup your database.
  4. Be sure to check any options you want before proceeding.phpma-export-frame06_1
  5. Check the Save as File check box, then click Go.phpma-export-frame11_1
  6. That’s it! The demo1234_members database has been exported to our local computer.
  7. If you only wanted to export a table, and not the entire database select the table you want to export and export just as you would a database.
  8. Remember that exporting tables only exports the selected tables within a database, whereas exporting a database will export all tables as well the data schema(provided they’re all selected).
  9. That’s it! The details table has been exported to its own file.

 

Importing Databases and Tables with phpMyAdmin

 

  1. This tutorial assumes you’ve already logged in to phpMyAdmin.
  2. Now let’s learn how to import a database.
  3. Click the database you wish to import here.phpma-import-frame03_1
  4. Let’s assume the data in our details table is corrupt, and we want to import a saved (exported) copy of the data.
  5. Therefore, let’s first delete the existing details table from our database.phpma-import-frame05_1
  6. Now let’s import the saved copy of our database, which includes the details table.phpma-import-frame07_1

    phpma-import-frame09_1

    phpma-import-frame14_1

  7. That’s it! The demo1234_members database has been successfully imported, as indicated here.

 

Searching Through a Database with phpMyAdmin

This tutorial assumes you’ve already logged in to phpMyAdmin.  Now let’s learn how to use the Search feature.

  1. Click the database you wish to search here.phpma-search-frame03_1
  2. Then click the Search tab and enter words or values to search for in the database.
    phpma-search-frame04_1
  3. There are several options you can use to refine your search. This database only has one table (details), but if there were more, you could limit your search to specific tables here.phpma-search-frame05_1
  4. When ready, click Go to perform the search. This search found one match. Click Browse.phpma-search-frame06_1
  5. We can now make changes to the record that was found.phpma-search-frame10_1
  6. Click Go when finished.