Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Previous 30 Newer Entries Showing entries 61 to 90 of 840 Next 30 Older Entries

Displaying posts with tag: Uncategorized (reset)

MySQL Enterprise Backup: PITR Partial Online Recovery
Employee +3 Vote Up -0Vote Down

Here’s a look at using MySQL Enterprise Backup in a specific example:

Consider a Backup Policy

– Full Backup of the environment. – Complemental Incremental backups & online BinLogs. And the Restore: – Logical Restore. – Online, Zero impact. – Partial, single database, group of tables.

The Backup

A working environment, with 4 databases, of which 2 will require restoration. Full backup with MySQL Enterprise Backup:
mysqlbackup --user=root --socket=/tmp/mysql.sock \
  --backup-dir=/home/mysql/voju5/backup/ \
  --with-timestamp backup

Test preparation

Create 4 different databases, where the structure & content is the same.
create database v5_1; use v5_1; create table `voju5` (
  `ID` int(7) NOT NULL AUTO_INCREMENT,
  `Name` char(20) NOT NULL DEFAULT '‘,
  [Read more...]
MySQL Enterprise Backup: PITR Partial Online Recovery
Employee +0 Vote Up -0Vote Down

Here’s a look at using MySQL Enterprise Backup in a specific example:

Consider a Backup Policy

– Full Backup of the environment. – Complemental Incremental backups & online BinLogs. And the Restore: – Logical Restore. – Online, Zero impact. – Partial, single database, group of tables.

The Backup

A working environment, with 4 databases, of which 2 will require restoration. Full backup with MySQL Enterprise Backup:
mysqlbackup --user=root --socket=/tmp/mysql.sock \
  --backup-dir=/home/mysql/voju5/backup/ \
  --with-timestamp backup

Test preparation

Create 4 different databases, where the structure & content is the same.
create database v5_1; use v5_1; create table `voju5` (
  `ID` int(7) NOT NULL AUTO_INCREMENT,
  `Name` char(20) NOT NULL DEFAULT '‘,
  [Read more...]
Oracle MySQL LAMP Stack event Tomorrow in London with Zend – Free Food! ;-)
Employee +0 Vote Up -0Vote Down

So folks, bit short notice I know, but i’ll be talking at LAMP stack event tomorrow in London. Loads of interesting stuff about MySQL and the other pieces of the LAMP Stack. You can register here:

http://www.oracle.com/us/dm/17128-emeafm13045970mpp005-oem-1989140.html

Agenda is below..

Agenda 09:00 Registration and welcome coffee 09:30 Welcome and Introduction
Simon Deighton, MySQL Sales Manager, Oracle 09:45 Features and news around Oracle Linux and Oracle VM
Wayne Lewis, Principal Sales Consultant – Oracle Linux & Virtualisation, Oracle 10:30 Coffee Break

  [Read more...]
Madrid MySQL User Group
Employee +0 Vote Up -0Vote Down

Ayer por la tarde se hizo la 2ª reunión de Madrid MySQL User Group. Para todos los que están en Madrid o cerca, os animo a ir, a compartir experiencias, dudas, cuestiones, etc. alrededor del tema “MySQL”. No tengais miedo!

Si os apetece apuntaros al siguiente (fecha pendiente por ahora), mirad a ver http://www.meetup.com/Madrid-MySQL-users-group/.

Ánimo.


Madrid MySQL User Group
Employee +0 Vote Up -0Vote Down

Ayer por la tarde se hizo la 2ª reunión de Madrid MySQL User Group. Para todos los que están en Madrid o cerca, os animo a ir, a compartir experiencias, dudas, cuestiones, etc. alrededor del tema “MySQL”. No tengais miedo!

Si os apetece apuntaros al siguiente (fecha pendiente por ahora), mirad a ver http://www.meetup.com/Madrid-MySQL-users-group/.

Ánimo.


What do Wikipedia, Facebook and ZEDGE have in common?
Employee_Team +0 Vote Up -0Vote Down

On Tuesday Sept.10 I went to PHP TechTalks with Rasmus Lerdorf, Sebastian Bergmann, and Stig Bakken. Great initiative by Stig Bakken @ Zedge. The TechTalks focused on new features and best practices and for PHP 5.4 and 5.5.
Great feeling of going to the roots of LAMP and MySQL. Thanks for the invite Stig!

(For more have a look at https://zedgetechtalksphp.eventbrite.com/).

Running a Java Application To Demo The Cluster
Employee +3 Vote Up -0Vote Down

So it’s all well and good having a nice MySQL cluster running on some tiny hardware, but what can you do with it?

Well in order to demo the software at some upcoming techtours my colleague put together a little Java application to showcase what can be done.

I want to run my raspberry pi’s headless so in order to get this to work I needed to install a vncserver

sudo apt-get install tightvncserver

Once this is installed make a note of the display you set up and check you can connect to it via a vnc client.

Install the java application

configure the config file for the MySQL credentials

Run the java application in a shell window on the remote VNC session making sure the screen variable has been set accordingly

export DISPLAY=1:4

When you have it all working it should look like

  [Read more...]
Monitoring The Cluster Using the LCD Panel
Employee +1 Vote Up -0Vote Down

I thought it would be nice to have a display on pi1 (the primary node) so found an LCD kit that hopefully I could write a little script to hack around to display the status of each data node.

So I purchased the Adafruit Char 16×2 LCD Plate from:

https://www.modmypi.com/raspberry-pi-expansion-boards/raspberry-pi-blue-and-white-16×2-LCD-kit

Then set about soldering it all up

tada!

  [Read more...]
Testing your shiny New MySQL Pi-Cluster
Employee +1 Vote Up -0Vote Down

So you’ve done all the hard work, now what?

We need to test that everything is working. Ie:

  • That the Management Daemon can see the NDB instances.
  • That the NDB instances are running on the two cluster nodes
  • The MySQL client can connect and talk to the NDB presented tables

start the MySQL client

and execute the following command to show available NDB nodes:

 

show global status like 'ndb_number_of%';

 

mysql -uroot -p[password you set when first running mysql]

root@cgepi1:/var/lib/mysql-cluster# mysql -uroot -phelpdesk
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.25a-ndb-7.3.0-log Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is
  [Read more...]
Starting The MySQL Cluster services
Employee +0 Vote Up -0Vote Down

Starting the services

MySQL Cluster Management Daemon (ndb_mgmd)

I prefer to start stuff manually for demos as my poor little brain likes to know what is running and how they started.

Starting the management Daemon

ndb_mgmd -f /var/lib/mysql-cluster/config.ini –configdir=/var/lib/mysql-cluster  –ndb-nodeid=1


Should give you an output similar to:

MySQL Cluster Management Server mysql-5.5.25 ndb-7.3.0

You can check its running with a ps -aux | grep mysql and check for the ndb_mgmd process

root     16868  3.2  0.6  30692  2804 ?        Ssl  13:17   0:03 ndb_mgmd -f /var/lib/mysql-cluster/config.ini --configdir=/var/lib/mysql-cluster --ndb-nodeid=1

MySQL NDB Service

As root or sudo

sudo

  [Read more...]
Configuring MySQL Cluster (Data + Management Nodes)
Employee +0 Vote Up -0Vote Down

 

Ok so before we go any further I guess I should draw a little picture (I hate using visio so he’s my best drawing)

 

So on ‘pi1′ we’ll be configuring the following services:

 

ndb_mgmd (MySQL Management Service Daemon) – monitors the MySQL Cluster

ndbd (Network Database Daemon) – The Network database storage engine

mysqld (MySQL client) – The client allowing you to query the database.

 

On pi2 we are just running the NDBD Daemon

 

So we need to configure

  [Read more...]
Getting MySQL Cluster compiled & Installed
Employee +0 Vote Up -0Vote Down
So there are a few prerequisite’s to install first Update everything
apt-get update
Install libncurses and openjdk
apt-get install cmake libncurses5-dev openjdk-7-jdk
Set the swap size to 2GB sudo dphys-swapfile swapoff sudo vi /etc/dphys-swapfile  =>>  CONF_SWAPSIZE=2048 sudo dphys-swapfile setup sudo dphys-swapfile swapon

Install mysql cluster (get source from http://dev.mysql.com/downloads/cluster/7.3.html#downloads)

cd /usr/local/src
tar xzfv /home/pi/mysql-cluster-gpl-7.3.0.tar.gz
cd mysql-cluster-gpl-7.3.0
Patch MySQL to workaround a pointer type bug with ARM chipsets (get patch

  [Read more...]
Raspberry Pi – Running MySQL Cluster
Employee +0 Vote Up -0Vote Down

So my colleague Andrew Morgan did this a year or so ago, but I wanted to repeat his experiment and add a few features in order to make it a live demo. It should show how MySQL Cluster (CGE) can run even on very modest hardware..

 

The hardware has been purchased

2x Raspberry Pi’s (model b)

1x Adafruit LCD Pi Plate (16×2 LCD)

USB Hub for power

HDMI -> DVI adaptor

Netgear 100/Mbs Switch

 
Watch this space

 


So what is this all about?
Employee +0 Vote Up -0Vote Down

So the purpose of this blog is just to share with the world for those who are interested on what i’m working on in my role of Sales Consultant for Oracle MySQL in the Uk.


MySQL force user change password
+0 Vote Up -0Vote Down
Send to Kindle

Since version 5.6.6 MySQL has introduced the capability to force an user to change their password.
You can archive that by issue ALTER USER PASSWORD EXPIRE statement.

ALTER USER 'marcelo'@'localhost' PASSWORD EXPIRE;

Next time marcelo tries to login from localhost it will block all statements rather then SET PASSWORD;

mysql> \s
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

To remove this block, just issue an :

SET PASSWORD = PASSWORD('pwd');
#Or use the hash received from SELECT PASSWORD('pwd');
SET PASSWORD = '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD';

But be careful, if you expire the password for an


  [Read more...]
MEM in WB
Employee_Team +0 Vote Up -0Vote Down

In the new Workbench, click on the "Planet MySQL" shortcut, then search for my feed and find this post.

MEM

Big Data from Space: the “Herschel” telescope.
+0 Vote Up -0Vote Down
” One of the biggest challenges with any project of such a long duration is coping with change. There are many aspects to coping with change, including changes in requirements, changes in technology, vendor stability, changes in staffing and so on”–Jon Brumfitt. On May 14, 2009, the European Space Agency launched an Arianne 5 rocket [...]
“Duplicate Entry” error for key PRIMARY on UPDATE query (RBR + Triggers)
+0 Vote Up -0Vote Down
Recently, I have faced one interesting issue with Master(Active)-Master(Passive) replication (RBR + Triggers). Passive master was stopped due to “Duplicate Entry” error with update statement. It was something like this. Last_Error: Error ‘Duplicate entry ’29014131′ for key ‘PRIMARY” on query. Continue reading →   [Read more...]
EXPLAIN FORMAT=JSON vs regular EXPLAIN
+1 Vote Up -0Vote Down

Valeriy has mentioned that MySQL manual has no documentation about EXPLAIN FORMAT=JSON feature. There was a bug filed for this since September, 2012. I had spent some time looking at EXPLAIN FORMAT=JSON, so I thought I would share my findings.

The first blog post about EXPLAIN FORMAT=JSON was made by Sheeri. She listed these features of FORMAT=JSON:

  • attached_condition and implicit casts
  • used_key_parts field

In addition to those, I was able to find

  • Pushed index condition information
  • More information about sorting/grouping
  • Subquery attachment points
  [Read more...]
Creating and restoring database backups with mysqldump and MySQL Enterprise Backup – Part 1 of 2
+1 Vote Up -0Vote Down

Be sure to check out my other two posts on mysqldump:
- Scripting Backups of MySQL with Perl via mysqldump
- Splitting a MySQL Dump File Into Smaller Files Via Perl

Part 1 of 2: (part two)
If you have used MySQL for a while, you have probably used mysqldump to backup your



  [Read more...]
MySQL 5.6, InnoDB statistics, and testcases for optimizer
+1 Vote Up -1Vote Down

One of the new features in MySQL 5.6 is persistent table statistics. The word “persistent” makes you think that table statistics will be very stable from now on.
This is generally true, but there are some exceptions. There is a particular case where InnoDB statistics may change with no warning, even when there is no user activity on the server. Consider the following pattern (which nearly all bug or feature testcases follow):

CREATE TABLE t1 (...) ENGINE=INNODB;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
EXPLAIN SELECT * FROM t1;
EXPLAIN SELECT * FROM t1;

With MySQL 5.6, the following is possible

  • the first EXPLAIN will show that the optimizer expects table t1 to have 6 rows
  • the second EXPLAIN will show that the optimizer expects table t1 to have 5 rows

For me, this was a big surprise. After all, table t1 never had 6 rows. If there was some


  [Read more...]
What the Mean Really Means
+0 Vote Up -0Vote Down

When analyzing response time, or latency, you need much more information than an average provides. The average, commonly the arithmetic mean, shows the index of central tendency. But, as I found in earlier posts, the tendency is often not central, but may be skewed by outliers, or split by multiple modes. How often these factors occur was determined quantitatively, using tests and a survey of hundreds of production servers and different types of latency: over 95% had six-sigma outliers, and

  [Read more...]
On Oracle NoSQL Database –Interview with Dave Segleau.
+0 Vote Up -0Vote Down
“We went down the path of building Oracle NoSQL database because of explicit request from some of our largest Oracle Berkeley DB installations that wanted to move away from maintaining home grown sharding implementations and very much wanted an out of box technology that can replicate the robustness of what they had built “out of [...]
The MySQL Man Pages ARE Available under the GPL
Employee +12 Vote Up -1Vote Down

Due to a bug in our release packaging scripts, the wrong version of the man pages, with the wrong license text, were copied into the MySQL Server GPL packages. The MySQL Man Pages continue to be available under GPL. The MySQL Server GPL packages will be corrected ASAP. You can read and follow the public bug here.

We apologize for the confusion this has caused. As always, please feel free to contact us, to ask about changes that you are wondering about.  Reporting a bug is always a good way to communicate with us.

Have a Happy GPL Midsummer, Tomas

MySQL man pages are no longer GPL (UPDATED)
+8 Vote Up -4Vote Down
Hat tip to Colin Charles at MariaDB for this: http://blog.mariadb.org/mysql-man-pages-silently-relicensed-away-from-gpl Why is this important?  The MySQL documentation already has a restrictive license.  This means that it’s illegal to redistribute the MySQL documentation.  As a counterexample, the PHP documentation is licensed under a Creative Commons Attribution license, and there are many mirrors of it.  If one [...]
Replication : Be careful while executing DCL with replicate-ignore-db=mysql
+0 Vote Up -0Vote Down
Replication : Be careful while executing DCL with replicate-ignore-db=mysql. Normally in mysql replication Data Control Language (DCL) statements won’t replicate into slave if we are configuring replication with replicate-ignore-db=mysql. But if we are executing DCL statements from different database schema (other than mysql schema) in master, the event will replicate to slave. slave configuration mysql> show slave status\G [...]
MySQL updates, openSUSE 13.1 and default configuration
+3 Vote Up -0Vote Down

Recently I had some time to do some clenaups/changes/updates in server:database repo regarding MySQL (and MariaDB). Nothing too big. Well actually, there are few little things that I want to talk about and that is the reason for this blog post, but still, nothing really important…

MySQL 5.5, 5.6 and 5.7

MySQL 5.6 is stable for some time already, so it’s time to put it in the action. So I sent the request to include it in Factory and therefore in openSUSE 13.1. There is off course a list of

  [Read more...]
Hint of the day: noatime and relatime in fstab
+1 Vote Up -0Vote Down

It’s been written about everywhere, but since we keep spotting installations in the wild where people don’t know about it, it probably deserves another mention.

By default, Linux uses the atime option on a disk mount, which means it writes a timestamp (e.g. a write to the drive) every time it reads anything. So in this case, reads cause writes – and also disk seeks, because a read from a file will then trigger having to write to the directory that contains the file. This even occurs if a file is read from the file system’s page cache (reading from the machine’s memory rather than the drive).

Unless you require an audit trail of users reading files, you generally you don’t want this. Thus, you want to add the noatime option to the disk mount in /etc/fstab. If you have just the defaults in there, you just make it

  [Read more...]
(Slides) DIY – A distributed database cluster, or: MySQL Cluster
Employee +2 Vote Up -0Vote Down

Ever wondered how a database cluster ticks? Here’s how! During my talk at the International PHP Conference (#ipc13) I tried to build a cluster. I brought a soldering iron, sold, pink, orange and brown cables with me. Then, I tried to sold the thick (reliable, high throughput) brown cable at my company notebook (video coming). Eventually, I failed. Probably, I lacked the theoretical background?! Luckily, I got very theoretical slides with me…

DIY: A distributed database cluster, or: MySQL Cluster from Ulf Wendel

  [Read more...]
Using XtraBackup to backup a remote machine
+0 Vote Up -0Vote Down

I love Percona’s XtraBackup utility.  It’s basically a GPL answer to Oracle’s proprietary (and expensive) MySQL Enterprise Backup.  Percona claims that it has even more features that Enterprise Backup.  I do not have access to Oracle’s product, though, so I cannot evaluate that claim.

I have my backups set up in a particular way, for convenience and security.  I have a backup machine that has ssh access to the backup user on other machines.  It has terrabytes of spare disk space, and runs a script that uses rsync and other utilities to take backups of my other servers.

Since my backup server is where all backup scripts are run, I have previously used mysqldump to

  [Read more...]
Previous 30 Newer Entries Showing entries 61 to 90 of 840 Next 30 Older Entries

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.