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 91 to 120 of 860 Next 30 Older Entries

Displaying posts with tag: Uncategorized (reset)

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 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



  [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...]
How to Back Up Selected MySQL Databases
Employee +3 Vote Up -0Vote Down

I recently had to do a backup of a 30 very large databases within a MySQL instance that had a total of 60+ databases.  I did NOT want to back up the other databases. In fact, the other databases had very large tables in them and I had very little disk space, so I could not afford to back them up. In this post I will share what I learned.

I’ve simplified the problem to illustrate the idea.  My goal in this post is to backup one database when an instance has many, with mixed InnoDB and MyIsam tables.

  • I have 3 databases called dbtest1, dbtest2, and dbtest3, in one instance of MySQL .  I only want to back up  the tables in database dbtest2

  [Read more...]
On PostgreSQL. Interview with Tom Kincaid.
+0 Vote Up -1Vote Down
“Application designers need to start by thinking about what level of data integrity they need, rather than what they want, and then design their technology stack around that reality. Everyone would like a database that guarantees perfect availability, perfect consistency, instantaneous response times, and infinite throughput, but it´s not possible to create a product with [...]
Temporary Tables and Replication
+2 Vote Up -0Vote Down

I recently wrote about non-deterministic queries in the replication stream. That’s resolved by using either MIXED or ROW based replication rather than STATEMENT based.

Another thing that’s not fully handled by STATEMENT based replication is temporary tables. Imagine the following:

  • Master: CREATE TEMPORARY TABLE rpltmpbreak (i INT);
  • Wait for slave to replicate this statement, then stop and start mysqld (not just STOP/START SLAVE)
  • Master: INSERT INTO rpltmpbreak VALUES (1);
  • Slave: SHOW SLAVE STATUS \G
  • If for any reason a slave server shuts down and restarts after the temp table creation, replication will break because the temporary table will no longer exist on the restarted slave server. It’s obvious when you think about it, but

      [Read more...]
    Non-Deterministic Query in Replication Stream
    +0 Vote Up -0Vote Down

    You might find a warning like the below in your error log:

    130522 17:54:18 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
    Statement: INSERT INTO tbl2 SELECT * FROM tbl1 WHERE col IN (417,523)

    What do MariaDB and MySQL mean with this warning? The server can’t guarantee that this exact query, with STATEMENT based replication, will always yield identical results on the slave.

    Does that mean that you have to use ROW based (or MIXED) replication? Possibly, but not


      [Read more...]
    MyISAM’s "table lock" problem, and how InnoDB solves it
    +0 Vote Up -0Vote Down

    Most serious users of MySQL have moved their tables to InnoDB years ago.  For those who haven’t, let’s discuss why InnoDB is a more scalable solution than MyISAM.

    MyISAM was designed to be very fast for read queries.  It does not handle higher loads of writes very well.  It also suffers a more serious flaw: it isn’t crash-safe.  In other words, you better have frequent backups.

    MyISAM tables have a read queue and a write queue.  Queries are placed into one of those two queues to be processed.  The write queue has higher priority than the read queue, but the table can only process one write query at a time.  Multiple read queries can occur at once, so the read queue will often be empty.

      [Read more...]
    LEVENSHTEIN MySQL stored function
    +0 Vote Up -0Vote Down

    At Open Query we steer clear of code development for clients. We sometimes advise on code, but as a company we don’t want to be in the programmer role. Naturally we do write scripts and other necessities to do our job.

    Assisting with an Open Source project, I encountered three old UDFs. User Defined Functions are native functions that are compiled and then loaded by the server similar to a plugin. As with plugins, compiling can be a pest as it requires some of the server MySQL header files and matching build switches to the server it’s going to be loaded in. Consequentially, binaries cannot be considered safely portable and that means that you don’t really want to have a project rely on UDFs as it can hinder adoption quite severely.

    Since MySQL 5.0 we can

      [Read more...]
    MySQL Community Team at PHPTek, Drupalcon, Texas Linux Fest, SELF, Redhat Summit, and Lonestar PHP
    Employee +2 Vote Up -0Vote Down

    This is the start of the heavy travel season for the MySQL Community Team. So if you are attending PHPTek, Drupalcon, Texas LinuxFest, SELF, Redhat Summit, or Lonestar PHP please make sure to say ‘hi’ while you are in Chicago, Portland, Austin, Charlotte, Boston, or Addison. This group of trips is starting with a swag bag full of MySQL stickers, thumb drives, and ‘boogie bots’

    MySQL Boogie Bots

      Talks

    • PHPTek – Ten Things to Make Your MySQL Servers Faster and Happier — May 16th, 2:45p – 3:45p
    • Texas Linuxfest – The Proper Care and Feeding of a MySQL Database for Linux Administrators — May 31st, 11:25a – 12:20p
    • SELF – Two full
      [Read more...]
    Keeping your Drupal from Drooping — part 1
    Employee +2 Vote Up -0Vote Down

    This is the first screen after a sucessful Drupal 7.22 install.

    Drupal is a content management system that runs at least 2.1% of all websites(1). It is easy to use, extensable with over 20,000 add-ons, and runs beautifully with a LAMP stack.

    At the heart of most Drupal sites is a MySQL database with, as of Version 7.22, 76 tables. Recently I was asked what needs to be done to a ‘generic’ Drupal to get it running on MySQL 5.6. It is a very easy update that provides better performance, security, and allows access to the newest MySQL 5.6 updates.

    For this example, the generic box is a two CPU Dell x86_64 box running Centos 6.4. This is fairly typical of what a

      [Read more...]
    Slides from Percona Live talks: optimizer tutorial and Cassandra Storage Engine
    +1 Vote Up -0Vote Down

    I’ve put online the slides for the two talks that I сo-presented at the Percona Live conference:

    The tutorial tries to cover most areas of the optimizer, with focus

      [Read more...]
    Fedora 19 – MariaDB Test Day 2013-04-30
    +1 Vote Up -1Vote Down

    From https://fedoraproject.org/wiki/Test_Day:2013-04-30_MariaDB, this installment of Fedora’s Test Day focuses on the replacement of MySQL with MariaDB. If you’re a Fedora (or RHEL or CentOS user), do take a peek at the page and see if you can pitch in – it might be a little bit of work for you, but with great benefits in terms of getting the MariaDB performance and features, and specifically on the day the Fedora crowd have extra people on the case to track and address issues you might find, so it’s an ideal opportunity to upgrade on a development or test-prod environment!

    Previous 30 Newer Entries Showing entries 91 to 120 of 860 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.