Showing entries 6861 to 6870 of 44035
« 10 Newer Entries | 10 Older Entries »
How to use the ClusterControl Query Monitor for MySQL, MariaDB and Percona Server

The MySQL database workload is determined by the number of queries that it processes. There are several situations in which MySQL slowness can originate. The first possibility is if there is any queries that are not using proper indexing. When a query cannot make use of an index, the MySQL server has to use more resources and time to process that query. By monitoring queries, you have the ability to pinpoint SQL code that is the root cause of a slowdown.

Related resources  Become a MySQL DBA blog series - Using Explain to improve SQL Queries  Become a MySQL DBA blog series - Optimizer Hints for faster query execution

[Read more]
How to use the ClusterControl Query Monitor for MySQL, MariaDB and Percona Server

The MySQL database workload is determined by the number of queries that it processes. There are several situations in which MySQL slowness can originate. The first possibility is if there is any queries that are not using proper indexing. When a query cannot make use of an index, the MySQL server has to use more resources and time to process that query. By monitoring queries, you have the ability to pinpoint SQL code that is the root cause of a slowdown.

Related resources  Become a MySQL DBA blog series - Using Explain to improve SQL Queries  Become a MySQL DBA blog series - Optimizer Hints for faster query execution

[Read more]
How to Replace MySQL with Percona Server on a CPanel, WHM VPS or Dedicated Server

In this blog post, we’ll look at how to replace MySQL with Percona Server for MySQL on a CPanel, WHM VPS or dedicated server.

In general, CPanel and WHM have been leaning towards support of MariaDB over other flavors. This is partly due to the upstream repos replacing the MySQL package with MariaDB (for example, on CentOS).

MySQL 5.6 is still supported though, which means they are keeping support for core MySQL products. But if you want to get some extra performance enhancements or enterprise features for free, without getting too many bells and whistles, you might want to install Percona Server.

I’ve done this work on a new dedicated server with the latest WHM and CPanel on CentOS 7, with MySQL 5.6 installed. …

[Read more]
Reinstall MySQL and Preserve All MySQL Grants and Users

In this blog post, we’ll look at how to preserve all MySQL grants and users after reinstalling MySQL.

Every so often, I need to reinstall a MySQL version from scratch and preserve all the user accounts and their permissions (or move the same users and privileges to another server).

As of MySQL 5.7, MySQL does not make this easy! MySQL SHOW GRANTS only shows permissions for one user, and the method suggested on StackExchange – dumping tables containing grants information directly – is not robust (as Rick James mentions in the comments). It also doesn’t work between different MySQL versions.

[Read more]
MySQL Query Performance Statistics In The Performance Schema

Updated 1/11/2017

Quite some time ago, when we added the ability to monitor MySQL query performance statistics from MySQL’s PERFORMANCE_SCHEMA, we learned a number of valuable lessons, still worth sharing. There are definitely right and wrong ways to do it. If you are looking to the P_S tables for monitoring MySQL query performance, this blog post might save you some time and mistakes.


Image Credit

What Is The Performance Schema?

First, a quick introduction. The Performance Schema includes a set of tables that give information on how statements are performing. Most of the P_S tables follow a set of predictable conventions: there’s a set of tables with a limited set of full-granularity current and/or historical data, which is aggregated into tables that accumulate over time. In the case …

[Read more]
MySQL Day – Sessions review #1

On February 3rd, just before Fosdem and the MySQL & Friends Devroom, MySQL’s Community Team is organizing the pre-Fosdem MySQL Day. We increased the amount of seats, so there are still some tickets available, don’t hesitate to register, this will provide you a unique occasion to meet MySQL engineers from Oracle in Europe. We also have very famous speakers from Percona and Booking.com.

Peter Zaitsev himself will deliver a session !

Let’s start this articles series on MySQL Day with my predecessor as MySQL Community Manager and now Product Manager for MySQL Server: Morgan Tocker !

Morgan will open the MySQL Day with …

[Read more]
MySQL Group Replication: Videocast #1

Hi !

I’m starting a small series of videocast related to MySQL Group Replication.

As I blogged earlier this year about Single-Primary or Multi-Primary Group Replication cluster, one of the limitation of using a cluster in Multi-Primary mode is the risk linked to concurrent DDLs (as ALTER STATEMENTS).

In Group Replication, DDLs are not isolating the full cluster and write operations are not blocked. But this may lead to problems if you change the same table on two different nodes at the same time for example. This is the topic of today’s videocast:

PHP and MySQL Basics

PHP and MySQL have had a long intertwined path together. I have been talking with a lot of newbies in the past several months who are trying to become PHP developers but are amazed at all the ancillary parts that go along with PHP such as unit testing, databases, JavaScript, continuous integration, and much more. Add in that there are two MySQL APIs -- PDO & MySQLi -- and an older deprecated mysql API still often found in the wild. This blog is the start of a series for new PHP developers to learn to program with a database. Client Server ModelThe PHP code when it seeks to talk to a MySQL (or most other databases) will make a connection to a port at an IP address. Usually MySQL is listening on port 3306. If you are developing an accessing a database on your local computer the IP address used will generally be at 127.0.0.1. The software that goes between the PHP application and the database is called a connector. …

[Read more]
Galera Cluster: adding a primary key to a MySQL table which lacks it... without downtime

OK, let me start with saying that a table without a primary key shouldn't be something that a DBA should ever stumble into.  Sure, InnoDB will secretly add one for us without telling - but that's not something we can use at application or administration level, it's just to make the engine happy.

So let's suppose you find some tables that lack a primary key, of course you need to do something about it, right?  Now, put Galera Cluster in the mix - Galera does not support tables without a primary key and will, secretly again, make that table inconsistent at cluster level.

You need to fix the damn table(s)!! And this is where the fun begins...  as you can't afford downtime for the operation so you need to resort to an online schema change of some type.

Galera cluster is …

[Read more]
How to Move a MySQL Partition from One Table to Another

In this blog post we’ll look at how to move a MySQL partition from one table to another, for MySQL versions before 5.7.

Up to version 5.7, MySQL had a limitation that made it impossible to directly exchange partitions between partitioned tables. Now and then, we get questions about how to import an .ibd for use as a partition in a table, as well as how to exchange partitions with another partitioned table. Below is step-by-step instructions on how to move a partition from one table to another.

In this example, one of our customers had two tables with the following structures:

CREATE TABLE live_tbl (
some_id bigint(20) NOT NULL DEFAULT '0',
summary_date date NOT NULL,
PRIMARY KEY (some_id,summary_date)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
/*!50500 PARTITION BY RANGE …
[Read more]
Showing entries 6861 to 6870 of 44035
« 10 Newer Entries | 10 Older Entries »