Sysadmins of the North

Technical blog, where topics include: computer, server, web, sysadmin, MySQL, database, virtualization, optimization and security

Category: MySQL

Restore single MySQL table from a full mysqldump backup file

If you need to restore a single table from a full MySQL backup, you may find yourself wondering “how do I do that?”. There are a few steps required, I outline them here for you to restore the contents of just one table back into the database from the mysqldump using Bash.

Read More

MySQL InnoDB performance improvement: InnoDB buffer pool instances – Updated!

Are you running into MySQL load problems? Learn how to tune MySQL servers for a heavy InnoDB workload, by configuring innodb_buffer_pool_instances. Dividing the InnoDB buffer pool into multiple instances improves Disk I/O. By doing so, you run your database and website more efficiently and faster. Here is a little help for you.

Read More

How to string replace on all WordPress posts in MySQL

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.

Read More

MySQL fix. Image via Flickr by Luis M. Gallardo D

MySQL database optimization with indices

Why MySQL indices are so important? 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.

Read More

Convert MySQL MyISAM tables to InnoDB

Convert MyISAM tables to InnoDB. In the earlier days of MySQL, the default storage engine for your database was MyISAM. This is also why you still encounter a lot of examples with engine=MyISAM online. Nowadays, the default storage engine is InnoDB, and MyISAM is no longer actively developed. Therefore, all MySQL performance optimizations are for InnoDB, and it’s recommended to switch to this as your table storage engine.

Read More

High Performance MySQL

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.

Read More

Check, repair and optimize MySQL tables with mysqlcheck

How to use mysqlcheck when your MySQL table gets corrupted. Check & repair tables with MySQL’s mysqlcheck, a command line table maintenance program. 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.

Read More

MySQL string comparison for MD5 and SHA1 hashes

MySQL string comparison functions for MD5 and SHA1 hashes; how to calculate MD5 and SHA1 hashes in MySQL and compare strings with MySQL. Some web scripting languages like 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!

Read More

Powered by WordPress & Theme by Anders Norén

15 queries, 0.281 seconds running PHP version 7.3.0