Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 1431 to 1440 of 5700 « Previous | Next »
Searching For: gp update (reset)
Getting Microsoft SQL server data into MariaDB with the CONNECT storage engine

Thu, 2016-04-28 10:03Michaël DeGroot

MariaDB works with many clients to migrate Microsoft SQL and Oracle to MariaDB. With the CONNECT storage engine we can access any ODBC data source in MariaDB. Here's a small HOWTO for those who want to give it a quick try. In this example we use MSSQL, though the same principle should be possible with Oracle ODBC servers.

We start with a clean MariaDB installation, no ODBC drivers installed yet. In this example we used CentOS7. It's important to start at a point where unixODBC is not yet installed, because the Microsoft installation package wants to install its own unixODBC.

Step 1

Microsoft is kind enough to supply us with an ODBC driver for Linux. We download it and unpack it.

Step 2 …

[Read more]
Writing SQL that works on PostgreSQL, MySQL and SQLite

I am one of those crazy people who attempts to write SQL that works on SQlite, MySQL and PostgreSQL. First I should explain why:

This is all for my project sabre/dav. sabre/dav is a server for CalDAV, CardDAV and WebDAV. One of the big design goals is that it this project has to be a library first, and should be easily integratable into existing applications.

To do this effectively, it’s important that it’s largely agnostic to the host platform, and one of the best ways (in my opinion) to achieve that is to have as little dependencies as possible. Adding dependencies such as Doctrine is a great idea for applications or more opinionated frameworks, but for …

[Read more]
MariaDB MaxScale 1.4.2 GA is available for download

Thu, 2016-04-28 08:23Johan WikmanURGENT UPDATE: Do not take 1.4.2 into use. We have found a problem and will provide a 1.4.3 release shortly.

We are pleased to announce that MariaDB MaxScale 1.4.2 GA is now available for download!

If MariaDB MaxScale is new to you, we recommend reading this page first.

1.4.2 is a bugfix release, not bringing any new features but fixing certain issues found in 1.4.1.

MariaDB MaxScale 1.4 brings:

  1. The Firewall Filter has been extended and can now be used for either black-listing or white-listing queries. In addition it …
[Read more]
Upgrading to MySQL 5.7, focusing on temporal types

In this post, we’ll discuss how MySQL 5.7 handles the old temporal types during an upgrade.

MySQL changed the temporal types in MySQL 5.6.4, and it introduced a new feature: microseconds resolution in the TIME, TIMESTAMP and DATETIME types. Now these parameters can be set down to microsecond granularity. Obviously, this means format changes, but why is this important?

Are they converted automatically to the new format?

If we had tables in MySQL 5.5 that used TIME, TIMESTAMP or DATETIME are these fields are going to be converted to the new format when upgrading to 5.6? The answer is “NO.” Even if we …

[Read more]
What happens when you create a MySQL Document Store

The MySQL Document Store introduced with version 5.7.12 allows developers to create document collections without have to know Structured Query Language. The new feature also comes with a new set of terminology. So let us create a collection and see what it in it (basically creating a table for us SQL speakin' old timers).

So start the mysqlsh program, connect to the server, change to the world-x schema (database) switch to Python mode, a create a collection (table).

What did the server do for us? Switching to SQL mode, we can use describe to see what the server has done for us.

We have a two column …

[Read more]
The new MySQL X DevAPI Protocol and what it means for PHP

The relational database world just changed and you didn't notice, did you? Rather than speaking SQL to your data, what if you could talk to it in PHP directly? No longer do you have to struggle to remember arcane structured query language syntax and just grab data with PHP. You can still write bad queries full of N+1 errors and a whole host of other problems. But you are speaking PHP to your data. And this started with MySQL 5.7.12 and its new Document Store Functionality.

The Document Store functionality expands on the new JSON data type in MySQL 5.7 with a new server plugin, a new API, and a suite of new components designed to make MySQL accessible for users who are not familiar with the SQL language or prefer to use a schemaless data store. This MySQL Server plugin enables communication using the X Protocol. And clients that implement X DevAPI and enables using MySQL as a document store easily. So you can talk to your data in the language …

[Read more]
MySQL 5.7 Introduces a JSON Data Type

There's a new JSON data type available in MySQL 5.7 that I've been playing with. I wanted to share some examples of when it's useful to have JSON data in your MySQL database and how to work with the new data types (not least so I can refer back to them later!)

MySQL isn't the first database to offer JSON storage; the document databases (such as MongoDB, CouchDB) work on a JSON or JSON-ish basis by design, and other platforms including PostgreSQL, Oracle and SQL Server also have varying degress of JSON support. With such wide adoption as MySQL has, the JSON features are now reaching a new tribe of developers.

Why JSON Is Awesome

Traditional database structures have us design table-shaped ways of storing all our data. As long as all your records (or "rows") are the same shape and have the same sorts of data in approximately the same quantities, this works brilliantly well. There are some common problems that aren't a good …

[Read more]
(MySQL) Performance Monitoring with Prometheus [UPDATE]

In my last I was looking for a way to do performance monitoring and I stumbled upon Prometheus. Prometheus is much more than monitoring a single node service. Anyway let’s get the idea of gathering metrics using MySQL as example.

This how a simple configuration of Prometheus could look like:

global: 
  scrape_interval: 1m
  scrape_timeout: 10s
  evaluation_interval: 1m

scrape_configs:
  - job_name: mysql
    scheme: http
    target_groups:
    - targets: 
        - '10.17.148.31:9104'
      labels:
        zone: mysql

Every minute Prometheus accesses 172.17.148.31:9104/metrics (/metrics is a Prometheus convention) and labels the result with zone=mysql. Querying the data you can use the labels.

This is a simple configuration. The fun of Prometheus is to have a lot of targets/jobs.

Let’s have a look at our specific endpoint: …

[Read more]
MariaDB 10.2 Window Functions

Today the first MariaDB 10.2 alpha popped up and for the first time there is support for window functions.

I'll describe what's been announced, what's been expected, comparisons to other DBMSs, problems (including crashes and wrong answers), how to prepare, what you can use as a substitute while you wait.

I assume some knowledge of what window functions are. If you'd prefer an introductory tutorial, I'd suggest reading articles like this one by Joe Celko before you continue reading this post.

What's been announced

The MariaDB sources are:

The release notes

The source code trees -- the feature tree up till now has been …

[Read more]
Creating Geo-Enabled applications with MongoDB, GeoJSON and MySQL

This blog post will discuss creating geo-enabled applications with MongoDB, GeoJSON and MySQL.

Introduction

Recently I published a blog post about the new GIS features in MySQL 5.7. Today I’ve looked into how to use MongoDB (I’ve tested with 3.0 and 3.2, with 3.2 being much faster) for the same purpose. I will also talk about GIS in MySQL and MongoDB at Percona Live next week (together with my colleague …

[Read more]