Learn how to replace content in your MySQL database in bulk with MySQL REPLACE. Sometimes it’s useful to know how to bulk edit content in your WordPress MySQL database, using MySQL’s REPLACE() function. Here is how to string replace content in WordPress wp_posts
table to bulk edit WordPress posts through MySQL.
MySQL
MySQL database optimization with indices
Why MySQL indices are so important? Here at Vevida, we like to help our customers as much as possible. Even with optimizing a MySQL database when they don’t ask for it, or when a customer doesn’t know performance can be improved. For example by adding an index because we spotted a slow query in our slow-query log.
Convert MySQL MyISAM tables to InnoDB
In the earlier days of MySQL, the default storage engine for your database tables was “MyISAM”. InnoDB is the engine to use now, and MyISAM is no longer actively developed. Therefore all MySQL optimizations are for InnoDB, and it’s recommended to switch from MyISAM to this InnoDB storage engine for your MySQL database tables. Follow this tutorial on how to convert from MyISAM to InnoDB.
How to flush MySQL query cache from time to time
How to flush MySQL query_cache
to prevent fragmentation of free query cache memory space? Here is a how to for unattended and automatically clearing MySQL’s query cache using a Linux cronjob. And I’ll show you how to on the mysql
shell.
How to: Test MySQL database connectivity in ASP.NET, PHP, ASP
Simple MySQL connection test from your website with ASP.NET, PHP & classic ASP. Whenever you need a MySQL connectivity test from a website or server, it’s handy to have various test scripts nearby. Whether it is because you are setting up a new website or you have just installed a new server and are running your tests.
WordPress wp_options table autoload micro-optimization
Learn how to optimize WordPress’ wp_options table for faster database results. This probably isn’t a big issue, but today I noticed a slow MySQL query coming from a WordPress database (WordPress wp_options table). This made me investigate and to optimize the WordPress wp_options table “autoload” feature. The autoload feature loads and caches all autoloaded options, if available, or all options. The default option is to autoload, and over time when the wp_options
table grows, this degrades performance.
Check, repair and optimize MySQL tables with mysqlcheck
De mysqlcheck client is a command line table maintenance program for MySQL. Mysqlcheck checks, repairs, optimizes, or analyzes MySQL tables. In this post I’ll show you how to use mysqlcheck
to optimize all MySQL tables using a cronjob.
How to compare MD5 and SHA1 hashes in MySQL
Some web scripting languages, such as classic ASP, don’t have native string hashing functions – like MD5 or SHA1. This makes it quite difficult to hash or encrypt user supplied input, and to perform string comparison to compare hashes. Let’s make MySQL do the string comparison and hash calculations for us!
Optimize all MySQL tables with PHP/MySQLi multi_query
The PHP MySQLi extension supports multiple queries, which are concatenated by a semicolon, with mysqli->multi_query
. We use this to optimize all MySQL tables, in a single multi-query statement. Neat! Optimizing MySQL tables is important to keep tables small and fast. This boosts MySQL, PHP and website performance and we all love that, don’t we? :)
Clean-up WordPress spam comments and meta data
How to delete WordPress spam comments and meta data with phpMyAdmin. A lot of WordPress spam comments and meta data will keep your WordPress database huge, and slows down your site. It’s best to delete spam comments regularly, but if you’re facing hundreds of thousands spam comments, here is how to delete them all in bulk
Block WordPress comment spammers manually
The less spammers hit your WordPress blog, the better your blog performs, is one of my opinions. A second is, the less unnecessary plugins you use on your WordPress blog, the better. So, a little while ago I decided to remove plugins like Stop Spammer Registration Plugin and do its work myself. Here is why & how:
WordPress CMS admin password reset
How to reset your WordPress password? If you’ve lost or forgotten your WordPress admin password, you can easily reset the password. Either use the following MySQL statement to reset your WordPress admin password, or change it through functions.php
.
Connect to SqlCe (SQL Server Compact) database from ASP
Connect to SQL Server Compacy (SqlCe) database with ASP. Here is how to install the Microsoft.SQLSERVER.CE.OLEDB.4.0
Provider and use classic ASP to connect to an SqlCe (SQL Server Compact) database sdf file, as a Microsoft Access database replacement. For Windows Server IIS. SQL Server Compact (SqlCe), the embedded database engine, is the default database for Visual Studio 2010 SP1 and WebMatrix 3. This means, it’s recommended to use SqlCe over Access nowadays.