MySQL and Access via ODBC
A client of mine had a request to connect Microsoft Access to MySQL via an ODBC connector. The MySQL ODBC setup is not very common, but is entirely possible. MySQL does provide an ODBC connector for...
View ArticleCan’t Connect To MySQL Server
I recently had a problem with an Ubuntu server that was running MySQL. None of my applications were connecting to the database. After poking around in the server, I realized the database doesn’t seem...
View ArticleInstall MySQL on Mac
This article shows you how to install MySQL on the Mac OS X. MySQL is an open-source relational database management system used in majority of websites on the Internet. MySQL works on many platforms...
View ArticleInstall MariaDB on Ubuntu
MariaDB is a drop-in replacement for MySQL database. On most cases, you can just uninstall MySQL and install MariaDB and you are good to go. To keep up the two databases compatible, the MariaDB team...
View ArticleBackup Rotation
After another downtime with my service provider, I wasn’t really happy with my backup strategy. Although, I have a backup plan in place, it’s not to the level of detail that I wanted. Back to the...
View ArticleChange MySQL Password
The following are instructions on how to change your MySQL password from the Unix command line. Login to MySQL and access MySQL table. mysql -u root -p use mysql; Change the password for any user,...
View ArticleMass Find and Replace
There are situations when you have to do a mass find and replace on your database. Let’s say you’re really, really bad speller. You just recently found out that you’ve been spelling a word for wrongly...
View ArticleWhere Featured Images Are Stored
The WordPress Genesis theme uses featured images on its posts on several of its themes. If you’re curious as to where the Genesis theme stores the image links on the database, you’ll need to go to a...
View ArticleQuick Database Check
Here’s a quick PHP script to check if your web server can connect to your MySQL database. It’s a neat little script if you don’t have any application installed yet, and you just want to see if your web...
View ArticleRun SQL in Bash
Here’s an example on how to run MySQL commands from Bash. mysql dbname -e "UPDATE wp_options SET option_value='http://domain.com' WHERE option_name='home'"; mysql dbname -e "UPDATE wp_options SET...
View ArticleRecover MySQL Root Password
How to recover a MySQL root password without a password. Stop MySQL.Start MySQL Safe Mode.Login to MySQL as root without password.Change root password. # Stop MySQL. service mysql stop # MySQL Safe...
View ArticleMySQL Backup To S3 Bucket
Here’s my MySQL backup script to the S3 Bucket. Just a couple of things about the script. It’s using … AWS CLIMysqldump They must be setup and configured to work properly. #!/bin/bash cd...
View ArticleMySQL Restore
Here’s how to restore a MySQL database from mysqldump. mysql -u user -p mysql> drop database databasename; mysql> quit; Bye mysql -u user -p databasename < filename.sql Drop database first,...
View ArticleMySQL SSL Connection
The standard way to connect to MySQL is: mysql -h hostname -u user -p Here’s how to connect to MySQL with SSL encryption. mysql -h hostname -u user -p \ --ssl-ca=server-ca.pem \...
View ArticleMySQL Restore to another DB
In order to restore a MySQL database to another database, use routines and triggers. mysqldump -p user -p --routines --triggers db1 > db1.sql To restore to another database, just use the normal...
View Article