People seem fairly impressed when I mention that I’ve written a couple of books on databases and software. I try not to make a big deal of it, just mentioning it in passing as appropriate, because I actually don’t consider it to be a big deal. I’m one of those people who likes to share knowledge, likes to write and has accumulated a decent amount of knowledge on a few things. Occasionally, that knowledge demands to be organized and backed up in article or book form. There’s also been the hope that others will find it useful in their own lives and might actually pay for it.
One of the nice features of MySQL as a database software is its noinstall option in which you download the files themselves and perform a manual installation that takes just under a gigabyte of space on your drive. If you’re a developer or a student, this means you can quickly create a new self-contained instance wherever you need it and then blow it away if you need to without cluttering up your registry.
This does mean working on the command line so you’ll want to have a certain comfort level with that. You will also need to be working with Administrative privileges.
XAMPP is one of many AMP software stacks (Apache – MySQL – PHP) that can be used to create a local web development environment for design and testing. It automatically installs and configures Apache as a web server so that you can view your pages through http://localhost, MySQL as a database server for website data and PHP to render any PHP code within your pages.
Once you have XAMPP installed, you can install WordPress or other content management systems locally so that you can easily develop and test your web content and programming before uploading it to the web or an intranet. I also use WordPress as a local CMS for organizing my own content.
Setting up XAMPP and WordPress takes as little as 10 minutes and can be done either on your hard drive or a USB flash drive as I show in this video. The flash drive option is a little slower but it is easily portable between systems as XAMPP runs entirely from the directory it’s installed to.
Coming in 2020 - "Understanding MySQL and MariaDB" Download a FREE sample chapter! The ability to work with data and the systems that store it is a fundamental career skill and will remain one for many years to come.Understanding MySQL and MariaDB is an upcoming book that will guide you in learning about two of the most popular database software titles in the world today. More than a textbook, it will combine quality instruction with online resources to help you understand the concepts you need to work with database technology and add more skills to your resume.
One of CiviCRM’s strengths is the ability to add custom fields to hold specific information about your contacts. One thing it doesn’t offer (yet) is a calculated field type that will present the results of calculations of other fields. While calculated fields are generally discouraged in relational database design, they are sometimes necessary within a user interface. One suggested method is to add custom code hooks within CiviCRM’s PHP code but as a database guy, I decided on a back-end solution.
On a recent project, I setup CiviCRM and CiviCase to enable a local organization to better manage its client database. The old database had been developed in Borland Paradox and was quickly becoming unusable. As a free and open source solution, CiviCRM turned out to be just the solution needed to accommodate this non-profit.
While CiviCRM itself does allow for the import of data through its API interface, I found that the contacts importer rejected a good portion of this data. The data had been entered by many volunteers into a database which did not impose many constraints on what data was required or how it could be entered. As with any case history, this data was essential to working with clients. With the volume of data involved, manual re-entry was not an option.
Fortunately, while CiviCRM’s data model is sophisticated, it’s relatively easy to decipher and I was eventually able to import the bulk of the data into CiviCase using a series of MySQL queries and MySQL Workbench.
One of my current projects involves migrating a large amount of data away from an old custom Borland Paradox application into a new CiviCRM system. As with too many quickly-constructed apps, this old Paradox database wasn’t especially well designed and, among other the other challenges in salvaging the data, there were no restrictions on how dates could be entered. This means that, in multiple fields within each of the 20,000+ database records, I might see any of the following:
While CiviCRM does have a utility for importing data from CSV and other SQL tables, it was having quite a time with this collection and many of the dates were being mishandled. That’s if the records weren’t rejected entirely for other reasons. Data migration doesn’t often happen with just a few settings adjustments and a click of the Import button.
A few months ago, I wrote about how to install MySQL on Windows with IIS. Now I want to show you how to create an AMP web programming stack (Apache, MySQL & PHP) on Mac OS X. As with Windows, you could just go with a ready-made development environment like MAMP but, if you’re going to be doing real database and web design work with MySQL, it’s best to know how everything works.
For this demonstration, I’m going to be using Mac OS X El Capitan (v.10.11), the latest version as of this writing. My installation environment is a hosted Mac server with 1 GB of RAM and 40 GB of disk space. I will be demonstrating the process using the Terminal commands.
Unlike Windows, OS X already includes the Apache web server and PHP language pre-installed so it’s a much simpler process to ensure that everything is working together. You will need root access in order to install and configure the components.
Note: This article was written in 2015 and is in the process of being updated. It is still useful as a general guide for issues you might encounter in this type of installation. Please take this into consideration when downloading components.
One of my latest projects was setting up WordPress, the popular content management system, on a client’s web server which was running Windows Server 2008. WordPress requires installations of MySQL for the database back-end and the PHP scripting language in order to serve up the WordPress content. On a local Windows machine, I’d probably just use a pre-configured WAMP (Windows, Apache, MySQL, PHP) stack package like XAMPP which is installed quickly and includes all the necessary components. That’s not quite an option in a professional environment, though. I was also working with Internet Information Services (IIS) 7.5 for the web server instead of Apache so the process is a little more involved.
As part of my latest project, I decided to try out WampServer, the Windows development environment for developing web applications with Apache web server, MySQL database and PHP scripting (Windows, Apache, MySQL, PHP – WAMP). Packages like WampServer and EasyPHP are simplified ways to create a testing environment on your PC without spending a lot of time downloading, installing and configuring the individual components. The package also includes utilities such as PHPMyAdmin and SQLBuddy for managing your MySQL databases and writing SQL queries. The software is available in 32- and 64-bit versions and the installation is pretty straightforward.
In a recent post, I talked about using the WordPress plugin Add Meta Tags for adding meta descriptions and titles to posts and pages within my WordPress sites. It’s a simple SEO tool but works well. Nevertheless, I decided to switch my sites over to Yoast SEO for all its extra features and guidance in constructing pages. I was anticipating quite a job as this blog alone has almost 100 posts and all of those descriptions needed to be transferred from the fields created by the old plugin to Yoast’s fields. Yoast does have some import tools of its own but they didn’t include the one I’d been using and my experience with a third-party converter had not been good so I was glad to find that I could do it so simply with one query in phpMyAdmin.