Showing entries 91 to 100 of 1334
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Linux (reset)
How to convert galera node to async slave and vice-versa with MariaDB Galera Cluster.

Recently, I was working with one of our customer and this is what their requirement as they want to automate this process for converting galera node to async slave and make async slave to galera node without shutting down any server. ———- Here are the steps for how to do that. I assumes that you already have working 3 nodes galera cluster if not, then for the testing purpose you can create it from my previous post. setup-three-nodes-mariadb-galera-cluster-on-single-server-with-mysql-sandbox ———- Btw, there is no matter how many nodes you have. Now, create one test1 table and add 3 records in galera cluster.

MariaDB [nil]> select * from test1;
+------+-----------+
| id   | name      |
+------+-----------+
|    1 | nilnandan |
|    2 | joshi     |
|    3 | niljoshi  |
+------+-----------+ …
[Read more]
Making Maxscale/ProxySQL Highly Available ( 2 > 1 )

As Mydbops we are implementing Load Balancer using Maxscale or ProxySQL ( Our presentation ) for lot our client,  but these load balancers will become a SPOF (Single Point of failure) .  We have tried to explore services like HAProxy, Nginx, and Keepalived etc. Except Keepalived, all the services need to run on the standalone instance and  did not satisfy our exact need.

Keepalived does not requires any standalone instance, it can be deployed and configured with a minimal effort and provide the HA Solutions to the DB Infra. This approach not only fits for our DB setup, we can implement same …

[Read more]
CPU Utilization is Not a Useful Metric

Once upon a time CPU utilization was quite a useful metric. Following are the output of several tools that provide CPU utilization metrics:

top

top reports a load of 1.66.

Is this correct? No. The correct load number is probably closer to 2.4.

# top -b -n 1| head -20
top - 11:27:45 up 151 days,  1:55,  7 users,  load average: 1.66, 1.84, 1.88
Tasks: 389 total,   3 running, 386 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.7%us, 20.6%sy,  1.2%ni, 77.3%id,  0.1%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  32639636k total, 32206476k used,   433160k free,   235732k buffers
Swap: 16359420k total, 10285664k used,  6073756k free,  2354840k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16702 root      20   0 8274m 5.0g 5.0g S 85.1 16.1  59164:55 VirtualBox
 4657 root      20   0  9.8g 5.2g 5.1g S 45.5 16.6  26518:13 VirtualBox
 6239 root      20   0  9.8g 5.1g 5.1g S 39.6 16.5  31200:52 VirtualBox
27070 root …
[Read more]
Donkey System

Donkey system is a fully automatic MySQL database change system.
It gives a great help both to the release of the business and the company’s automated operation and maintenance.

Donkey.pptx
Donkey_intro.pdf

HashiCorp Nomad and App Deployment with MySQL

We started our series on MySQL Docker deploments by showing how to deploy and use MySQL locally with docker-compose in Docker Compose and App Deployment with MySQL. Docker-compose itself is limited to one machine and it does not solve cross-node networking or span multiple datacenters. This is a job for so called cluster schedulers, i.e. […]

Three client error messages that MySQL DBAs should know by heart to save time

Working in an operations environment means that you get a lot of questions.  There’s the inevitable troubleshooting tasks that go along with being a DBA.  This is designed to be a quick reference post, much like my more in depth post in 2016 about timeouts. These typical error messages can create confusion and unneeded activities to diagnose.  To aid my own process of elimination and those of others, here are three error messages every DBA should know by heart.

SQLSTATE[HY000] [2002] Connection timed out

Plain and simple: this error means the client cannot connect to the server.

  • The calling program is trying to connect to the wrong database server (one that it cannot reach).
  • The database server is completely down (you’d get another error if the server and client actually made a connection). …
[Read more]
Hands-On Look at ZFS with MySQL

This post is a hands-on look at ZFS with MySQL.

In my previous post, I highlighted the similarities between MySQL and ZFS. Before going any further, I’d like you to be able to play and experiment with ZFS. This post shows you how to configure ZFS with MySQL in a minimalistic way on either Ubuntu 16.04 or Centos 7.

Installation

In order to be able to use ZFS, you need some available storage space. For storage – since the goal here is just to have a hands-on experience – we’ll use a simple file as a storage device. Although simplistic, I have now been using a similar setup on my laptop for nearly three years (just can’t get rid of it, it is too useful). For simplicity, I suggest you use a small Centos7 or Ubuntu 16.04 VM with one core, 8GB of disk and 1GB of RAM.

First, you need to install …

[Read more]
Docker Compose and App Deployment with MySQL

In this post we show how to use the mysql-server Docker image for local development. We first introduce a simple example app that starts up and tries to connect to a given db until successful. We then show how to start containers for multiple MySQL versions and use our example app to connect to them. […]

MySQL and Linux Context Switches

In this blog post, I’ll look at MySQL and Linux context switches and what is the normal number per second for a database environment.

You might have heard many times about the importance of looking at the number of context switches to indicate if MySQL is suffering from the internal contention issues. I often get the question of what is a “normal” or “acceptable” number, and at what point should you worry about the number of context switches per second?

First, let’s talk about what context switches are in Linux. This StackOverflow Thread provides a good discussion, with a lot of details, but basically it works like this:  

The process (or thread in MySQL’s case) is running its computations. Sooner or later, it has to do some blocking operation: disk IO, network IO, block waiting on a mutex …

[Read more]
InnoDB Cluster: setting up Production… for disaster! (2/2)

Ok, so now we’re got our InnoDB Cluster a-clustering, MySQL Router a-routing, now we need some disaster to be a-disaster-recovering…

A foreword first.

If you’re looking to use Enterprise Backup to recover a single node and restore that node back into an existing InnoDB Cluster, LeFred takes you through that one nicely here.

Preparing for backup

On our single primary server, the one that allows write, which was ic2/10.0.0.12 in my case:

mysql -uroot -poracle << EOF 
SET sql_log_bin = OFF; 
 create user 'backup'@'%' identified by 'oracle';
 grant all on *.* to 'backup'@'%';
SET sql_log_bin = ON; 
EOF

Let’s create something to backup (if you haven’t already done so of course):

mysqlsh --uri …
[Read more]
Showing entries 91 to 100 of 1334
« 10 Newer Entries | 10 Older Entries »