Showing entries 7353 to 7362 of 44070
« 10 Newer Entries | 10 Older Entries »
Command line QPS (Queries Per Second) Quick and Dirty

Ever wanted to just look at QPS in real time while logged into your server?

Well here’s a little command line hackery to do it quick and dirty.

[user@yourserver ~] $ LASTVAL=0; while true; do CURVAL=`mysql --batch -N -e "show status like 'Quer%';" | awk '{print $2}'`; QPS=`expr $CURVAL - $LASTVAL`; if [ $LASTVAL -ne 0 ]; then echo "$CURVAL $QPS"; fi; LASTVAL=$CURVAL; sleep 1; done

The output looks like this:

65549603430 2439
65549605421 1991
65549606912 1491
65549611219 4307
65549614186 2967
65549618048 3862
65549620853 2805

The first column is just the Query counter value. The second column is the QPS.

This script requires a .my.cnf to exist in your home directory (or that you do something nastily insecure and supply -u user -ppassword to the mysql command in the example above).

Fetch CSV of MySQL table size vs .ibd container size

This only works if you’re using innodb_file_per_table.

Purpose: import this csv quickly into google sheets (or other spreadsheet) and compare MySQL’s internal data size to the container size on disk to determine tables needing to be optimized (or “null altered”) to reclaim disk space and maybe increase performance due to defragmentation. Rule of thumb is probably something like >=10% difference may warrant action.

I wrote this loop as a one-liner dynamically / ad-hoc on the command line a couple weeks ago but made it into a configurable, yet quick-and-dirty shell script, below.

Add -u and -p arguments to MySQL CLI command if you need to, or just place a .my.cnf in your home directory and use the script as-is.

#!/bin/bash

DATADIR="/path/to/datadir" # ex: /var/lib/mysql
SCHEMANAME="yourschema"

for x in `mysql --batch -n -e "select concat(concat(table_name,'.ibd'),',',(data_length + index_length)) as …
[Read more]
Shinguz: Beware of large MySQL max_sort_length parameter

Today we had a very interesting phenomena at a customer. He complained that MySQL always get some errors of the following type:

[ERROR] mysqld: Sort aborted: Error writing file '/tmp/MYGbBrpA' (Errcode: 28 - No space left on device)


After a first investigation we found that df -h /tmp shows from time to time a full disk but we could not see any file with ls -la /tmp/MY*.

After some more investigation we found even the query from the Slow Query Log which was producing the same problem. It looked similar to this query:

SELECT * FROM test ORDER BY field5, field4, field3, field2, field1;


Now we were capable to simulate the problem at will with the following table:

CREATE TABLE `test` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `data` varchar(64) DEFAULT NULL,
  `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE …
[Read more]
MySQL Group Replication Docker Images

The MySQL development team recently made a new labs release of the Group Replication plugin for MySQL Server. This is a preview of a new plugin that adds virtually synchronous replication with support for multi-master or active/active update-anywhere replication groups to the already strong lineup of native replication options in MySQL. Docker is a great […]

HowTo: Starting with MySQL EF Core provider and Connector/Net 7.0.4

This article shows the essential parts of the configuration for a quick console application using the .NET Core command-line (CLI) tool. The application will show how to create an EF Core model and some basic operations that can easily be done in Windows, Linux or OSx.

1. Requirements

Install the sdk, framework and tools:

Windows:
Install
– .NET Core SDK for Windows direct link here
– Visual Studio 2015 Update 3* here’s the publication page with more information about the update.
– .NET Core 1.0 tooling for Visual Studio direct link here

Linux:
An …

[Read more]
Percona’s Clustercheck Script for MySQL Galera

Learn how to set up and use Percona's clustercheck script in a MySQL Galera Cluster.

The post Percona’s Clustercheck Script for MySQL Galera appeared first on Datavail.

MySQL @ OpenWorld

Want to easily find out about the MySQL sessions taking place at Oracle OpenWorld? Check out our Focus on MySQL @ OpenWorld page. Conference sessions, Tutorials, Hands-on Labs, Birds-of-a- Feather as well as the MySQL General Session are listed with their time and location.


Not registered for Oracle OpenWorld yet? Do it Now! You'll learn about the latest MySQL developments and plans, meet the engineers and get all your questions answered. You'll get the chance to network with you peers and learn best practices from MySQL power users. And, you'll get access to the extensive Oracle OpenWorld content and programs. Don't miss this once a year …

[Read more]
Fired for supporting open source

I have been fired for speaking out about the GPL and MariaDB actions that have caused great harm to our ecosystem.

It has been pointed out that I have a non-compete agreement. None of my tools compete with MariaDB and I have no non-public knowledge of MariaDB technology. GPLScale remains free software under the GNU GPL license and it is my right to fork a github repo. I am not paid to work on GPLScale and I don't intend to get paid to maintain it by anyone. All my projects are labors of love.


Who wants to hire me? I'm dedicated, honest, open, and I have integrity. I'm willing to risk everything for what I believe in.

Email me at:
greenlion at gmail dot com


----


I have been a proponent of GPL for a long time, and I don't need publicity.

[Read more]
Fired for supporting open source

I have been fired for speaking out about the GPL and MariaDB actions that have caused great harm to our ecosystem.

It has been pointed out that I have a non-compete agreement. None of my tools compete with MariaDB and I have no non-public knowledge of MariaDB technology. GPLScale remains free software under the GNU GPL license and it is my right to fork a github repo. I am not paid to work on GPLScale and I don't intend to get paid to maintain it by anyone. All my projects are labors of love.


Who wants to hire me? I'm dedicated, honest, open, and I have integrity. I'm willing to risk everything for what I believe in.

Email me at:
greenlion at gmail dot com


----


I have been a proponent of GPL for a long time, and I don't need publicity.

[Read more]
A look at Unicode with bash on Windows

When I wrote this blog about “bash on Windows” a few days ago I omitted one issue, that I already knew about. This is because it needs some elaboration that did not ‘fit in’ the previous blog. So I will do it here.

It is about Unicode. Unicode always was a pain in “cmd” and with the arrival of “bash” in Windows, this has become more significant and important. Actually on any recent *nix platform user will not do anything to make Unicode work ‘out of the box’ in the console and display all or almost all scripts (though I have noticed that the completeness of the ‘monospace’ font mostly used in the Linux console varies between Linux distros – with …

[Read more]
Showing entries 7353 to 7362 of 44070
« 10 Newer Entries | 10 Older Entries »