News

MySQL table Point-in-Time-Recovery from mysqldump backup

Shinguz - Sun, 2015-01-25 19:42

Sometimes we face the situation where we have a full MySQL database backup done with mysqldump and then we have to restore and recover just one single table out of our huge mysqldump file.
Further our mysqldump backup was taken hours ago so we want to recover all the changes on that table since our backup was taken up to the end.

In this blog article we cover all the steps needed to achieve this goal for MySQL and MariaDB.

Recommendation: It is recommended to do theses steps on a testing system and then …


Taxonomy upgrade extras:  Backup  Restore  Recovery  Mysqldump  Point-in-Time-Recovery  Pitr 

FromDual Backup and Recovery Manager for MySQL 1.2.1 has been released

FromDual.en - Thu, 2015-01-22 21:12

FromDual has the pleasure to announce the release of the new version 1.2.1 of the popular Backup and Recovery Manager for MySQL and MariaDB (fromdual_bman).

You can download the FromDual Backup and Recovery Manager from here.

In the inconceivable case that you find a bug in the Backup and Recovery Manager please report it to our Bugtracker.

Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.

Upgrade from 1.2.0 to 1.2.1

# cd ${HOME}/product
# tar xf …

Taxonomy upgrade extras:  Backup  Restore  Recovery  Pitr  Fromdual_brman  Release  Brman  Bman  Rman 

Later Findings ...

Oli Sennhauser - Wed, 2015-01-21 17:49

… show that this is expected behavior:

  • Galera will replicate a DDL statement first, before it gets executed locally.
  • Local execution will fail, because the "super" privilege is a global one, it cannot be granted for a specific database "db.*" but only for all of them "*.*"
  • Of course, execution on the other nodes will fail in the same way.
So: While it looks ugly, it is nothing to worry about.
Taxonomy upgrade extras: 

Introducing Myself: Jörg Brühe

Oli Sennhauser - Mon, 2015-01-19 20:56

For some time already, FromDual’s “Our Team” page lists me, and it even reveals that I joined in September, 2014. Also for some time, the list of FromDual blogs contains an entry “Jörg’s Blog”, but it doesn’t lead to any entries. It is high time to fix this and create entries, starting with an introduction of myself.

Often, in such introductions people use the phrase of “the new kid on the block”. I won’t. If I am to use those words, I will arrange …


Taxonomy upgrade extras: 

Impacts of max_allowed_packet size problems on your MySQL database

Shinguz - Sun, 2015-01-18 11:18

We recently run into some troubles with max_allowed_packet size problems during backups with the FromDual Backup/Recovery Manager and thus I investigated a bit more in the symptoms of such problems.

Read more about: max_allowed_packet.

A general rule for max_allowed_packet size to avoid problems is: All clients and the server should have set the same value for max_allowed_packet size!

I prepared some data for the test which looked as follows:

mysql> SELECT id, LEFT(data, 30), LENGTH(data), ts FROM test; …

Taxonomy upgrade extras:  Max_allowed_packet  Connection  Backup  Restore  Dump  Aborted_clients  Mysqldump  Mysql 

max_open_files

Shinguz - Sun, 2014-12-28 18:01

Hello oli,

every user/process on a UNIX system has some user limits. There are some soft (S) and hard (H) user limits. Soft limits a user can change himself up to the hard limits.

You can find you own user limits as follows:

shell> ulimit -aS | grep 'open'
open files                      (-n) 1024

shell> ulimit -aH | grep 'open'
open files                      (-n) 4096

and the user limits of an already running process as follows:

shell> cat /proc/`pidof mysqld`/limits | egrep 'Limit|open …

Taxonomy upgrade extras: 

skip_name_resolve

Shinguz - Sun, 2014-12-28 15:58

Hello oli,

it looks like you have enabled skip_name_resolve in your my.cnf.
This prevents MySQL to do (DNS) host lookups. If you have created some users with explicit host names MySQL wants to tell you now that you cannot use these users any more with this configuration. Example:

mysql> GRANT ALL ON *.* TO 'root'@'master';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> SHOW WARNINGS; …

Taxonomy upgrade extras: 

InnoDB Checkpoint age

Shinguz - Sat, 2014-12-27 15:56

Looking at Percona Server source code we can find the following:

storage/innobase/srv/srv0srv.cc

export_vars.innodb_checkpoint_age     = (log_sys->lsn - log_sys->last_checkpoint_lsn);
export_vars.innodb_checkpoint_max_age = log_sys->max_checkpoint_age;

Looking at the code we can see how output of SHOW ENGINE INNODB STATUS\G is produced:

storage/innobase/log/log0log.cc

void log_print(FILE* file)
{

 fprintf(file,
         "Log sequence number " LSN_PF "\n"
         "Log flushed up to   " …

Taxonomy upgrade extras: 

Avoid temporary disk tables with MySQL

Shinguz - Fri, 2014-12-19 07:38

For processing SELECT queries MySQL needs some times the help of temporary tables. These temporary tables can be created either in memory or on disk.

The number of creations of such temporary tables can be found with the following command:

mysql> SHOW GLOBAL STATUS LIKE 'created_tmp%tables';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| Created_tmp_disk_tables | 4     |
| Created_tmp_tables      | 36    |
+-------------------------+-------+ …

Taxonomy upgrade extras:  Temporary Table  Disk  Select  Query Tuning 

Making HAProxy High Available for MySQL Galera Cluster

Shinguz - Sun, 2014-12-14 18:37

After properly installing and testing a Galera Cluster we see that the set-up is not finished yet. It needs something in front of the Galera Cluster that balances the load over all nodes.
So we install a load balancer in front of the Galera Cluster. Typically nowadays HAProxy is chosen for this purpose. But then we find, that the whole Galera Cluster is still not high available in case the load balancer fails or dies. So we need a second load balancer for high availability.
But how should we properly …


Taxonomy upgrade extras:  Haproxy  Load Balancer  Galera Cluster  Vip  Virtual Ip  High Availability  Ha  Keepalived 

failed MySQL DDL commands and Galera replication

Shinguz - Tue, 2014-12-09 15:45

We have recently seen a case where the following command was executed on a Galera Cluster node:

SQL> GRANT SUPER ON userdb.* TO root@127.0.0.111;
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

2014-12-09 14:53:55 7457 [Warning] Did not write failed 'GRANT SUPER ON userdb.* TO root@127.0.0.111' into binary log while granting/revoking privileges in databases.
2014-12-09 14:53:55 7457 [ERROR] Slave SQL: Error 'Incorrect usage of DB GRANT and GLOBAL PRIVILEGES' on query. Default …

Taxonomy upgrade extras:  Galera  Replication  Ddl  Toi  Rsu 

How to recover deleted tablespace?

Oli Sennhauser - Fri, 2014-11-14 22:56

Sometimes, MySQL tablespace file(s) might be deleted by mistake, e.g. delete the shared tablespace (ibdata1) or an individual tablespace (table_name.ibd).

In this post I will show you how to recover those files (on Linux OS) having only one condition, MySQL service should still be running. If MySQL service stopped after deleting that file, this method will not work, so it is extremely important to act as quick as possible to avoid data loss.

The following is a simple table creation (innodb_file_per_table is …


Taxonomy upgrade extras:  Innodb  Tablespace  Ibdata1  General Query Log 

Things you should consider before using GTID

Oli Sennhauser - Fri, 2014-11-14 16:50

Global Transaction ID (GTID) is one of the major features that were introduced in MySQL 5.6 which provides a lot of benefits. I have talked about the GTID concept, implementation and possible troubleshooting at Percona Live London 2014, you can download the slides from our presentations repository or from my session at Percona Live.

On the other hand, there are some important things you should consider before deploying GTID in production, I’m going to list them here in this blog post.

Table of …


Taxonomy upgrade extras:  Gtid  Replication 

Galera Cluster and XA Transactions

Oli Sennhauser - Thu, 2014-10-23 23:47

A few weeks ago, we received an interesting Galera Cluster support case from one of our customers that the application is not working well and they face a lot of troubles in their Galera Cluster setup.

After some investigations, we found a lot of insert queries in state “query end” and lasting for long time without being completed. Also some other queries which were sleeping for long time having the info of “XA COMMIT”:

SQL> SHOW PROCESSLIST;

27  user    host:33214  foodmart …

Taxonomy upgrade extras: 

MySQL Environment MyEnv 1.1.2 has been released

FromDual.en - Thu, 2014-10-23 22:26

FromDual has the pleasure to announce the release of the new version 1.1.2 of its popular MySQL, Galera, MariaDB and Percona Server multi-instance environment MyEnv.

You can download MyEnv from here.

In the inconceivable case that you find a bug in MyEnv please report it to our Bugtracker.

Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.

Upgrade from 1.1.1 to 1.1.2

# cd ${HOME}/product
# tar xf /download/myenv-1.1.2.tar.gz
# rm -f myenv
# ln -s …

Taxonomy upgrade extras:  Myenv  Operation  Mysql Operations  Multi Instance  Consolidation  Backup  Catalog  Release 

Get rid of wrongly deleted InnoDB tables

Shinguz - Wed, 2014-10-22 22:10

Precaution: Before you try this out on your production system do a BACKUP first! FromDual Backup Manager can help you with this.

Situation

A MySQL user has delete its InnoDB table files for example like this:

shell> rm -f $datadir/test/test.*

Analysis

We do some analysis first:

mysql> DROP TABLE test;
ERROR 1051 (42S02): Unknown table 'test'

mysql> CREATE TABLE test (id INT) ENGINE = InnoDB;
ERROR 1050 (42S01): Table '`test`.`test`' already exists

The MySQL error log shows us the following …


Taxonomy upgrade extras:  Backup  Restore  Recovery  Innodb  Table 

GTID Replication talk at Percona Live London 2014

Oli Sennhauser - Tue, 2014-10-21 14:58

Percona Live London, November 3-4, 2014

Global Transaction ID (GTID) is a new feature coming with MySQL 5.6 which introduced a new MySQL replication method called Transaction-based Replication that is depend on GTID.

In a few weeks, I will be speaking at Percona Live London 2014 (November 3-4) about “Transaction-based REPLICATION (GTID) - IMPLEMENTATION AND TROUBLESHOOTING”. I’ll talk about how to implement GTID replication in different scenarios and how to troubleshoot most of the common issues in GTID replication.

Anyone …


Taxonomy upgrade extras: 

How to install multiple MySQL instances on a single host using MyEnv?

Oli Sennhauser - Thu, 2014-10-16 16:36

We have been asked several times by MySQL users about how to install multiple MySQL instances on a single host.
Typically, this is required when testing different MySQL versions or MySQL servers (MySQL server, Percona server and MariaDB server) while no available resources are available.
Sometimes, it is even required to install multiple MySQL instances on a single production server.

In this article, I’ll go through the steps needed to install multiple MySQL instances on a single host (using the tar …


Taxonomy upgrade extras:  Myenv  Environment  Virtualization  Consolidation  Multi Instance  Saas 

Migration between MySQL/Percona Server and MariaDB

Shinguz - Wed, 2014-10-08 21:40

This week, we did some migrations from MariaDB 10.0 to Percona Server 5.6 at the IT department of a big German bank.

We were perfectly aware that since version 10.0 the MariaDB code base started to diverge slightly away from the MySQL and Percona Server code base which are still pretty close to each other.

Because of the Percona Server option enforce_storage_engine we wanted to do this migration.

We stopped the MariaDB 10.0 server, replaced the binaries by the Percona Server 5.6 binaries, and started the …


Taxonomy upgrade extras:  Migration  Sidegrade  Upgrade  Mysql  Mariadb  Percona Server  Conversion  Compatibility  10.0  5.6 

MySQL Environment MyEnv 1.1.1 has been released

FromDual.en - Mon, 2014-09-08 08:29

FromDual has the pleasure to announce the release of the new version 1.1.1 of its popular MySQL, MariaDB and Percona Server multi-instance environment MyEnv.

The majority of improvements happened in the MySQL Backup Manager (mysql_bman) where we added a backup catalog.

You can download MyEnv from here.

In the inconceivable case that you find a bug in MyEnv please report it to our Bugtracker.

Any feedback, statements and testimonials are welcome as well! Please send them to feedback@fromdual.com.

Upgrade …


Taxonomy upgrade extras:  Myenv  Operation  Mysql Operations  Multi Instance  Consolidation  Backup  Catalog  Release 

Pages

Subscribe to FromDual aggregator - FromDual all (en)