Showing entries 241 to 250 of 809
« 10 Newer Entries | 10 Older Entries »
MySQL's JSON Functions Verses PHP's JSON Functions

The MySQL JSON data type only accepts valid JSON documents. PHP has a handful of JSON functions but sadly json_encode does not provide what the database server wants. Lets start with a simple array.


$alpha = array('a' => 1, 'b' => 2, 'c' => 3);

This is a very simple associative array that we want to turn into a JSON doc with there elements, where 'a' is equal to 1 etcetera. This would look like this:


{"a": 1, "b": 2, "c": 3}

Using the built in PHP function json_encode we get this:


{"a":1,"b":2,"c":3}

Fantastic. We should be able to feed that into query, send it to the server, and be good to go. But when we try to feed that into MySQL it will return a syntax error. MySQL can be fussy about sending data in quotes, especially unescaped, in a query. So the associate array has to be serialized (fancy way to saw written out to a string) in a format …

[Read more]
MySQL's JSON Data Type

MySQL 5.7 features a native JSON datatype. So just like a INT, CHAR, or other data type, you can now store valid JSON documents in a MySQL database. Previously you could put JSON formatted data into a CHAR, a TEXT, or similar data type. But it was a real pain to search this JSON data for items contained in them. But now you can store the JSON and there is a list functions to allow full access to this data in the column.


shell$ mysql -u root -p test
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.7.9 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. …
[Read more]
PHP and MySQL 5.7 JSON

I have been presenting on MySQL 5.7 and the new JSON data type to PHP Programmers at several shows and the one big request has been MORE EXAMPLES!!!!!!

Part of my presentation includes the big differences between PHP’s json_encode and the various MySQL supplied functions like JSON_ARRAY and JSON_OBJECT.  In my preliminary test I found the native PHP function did not always encode the information in a way that the MySQL server found palatable. The MySQL server wants properly valid JSON docs and unfortunately we have an impedance mismatch here.

Lets start with a simple associative array 
$alpha = array('a' => 1, 'b' …

[Read more]
MySQL Enterprise Monitor 3.1.2 has been released

We are pleased to announce that MySQL Enterprise Monitor 3.1.2 is now available for download on the My Oracle Support (MOS) web site. It will also be available via the Oracle Software Delivery Cloud in a few weeks. This is a maintenance release that includes a few new features and fixes a number of bugs. You can find more information on the contents of this release in the change log.

You will find binaries for the new release on My Oracle Support. Choose the "Patches & Updates" tab, and then choose the "Product or Family (Advanced Search)" side tab in the "Patch Search" portlet.

You will also find the binaries on the Oracle Software Delivery Cloud in a few weeks. Choose "MySQL Database" as the Product Pack and you …

[Read more]
Korean MySQL User Group meeting - Feb 17, 2016

We are pleased to announce another MUG meeting happening on February 17, 2016. Please find more details below:

  • MUG Korea 1st Off meeting
  • Date: February 17, 2016
  • Time: 7:00-9:00 pm
  • Venue: Oracle Korea Office
  • Proposed agenda:
    • Session 1 : About MySQL TDE - Ryusuke Kajiyama (MySQL Japan&APAC SC mananger) 
    • Session 2 : MySQL Tech Talk - Min Cho (MySQL Support Engineer) 

Please find more information and registration at Korean MUG Facebook page.

MySQL 5.7 European Tour: Learn and Have Fun at User Groups!

Want to learn about MySQL 5.7 & JSON and get all your questions answered? Morgan Tocker is currently visiting many European cities and talking at user groups. Morgan was previously Community Manager and recently joined the MySQL Product Management team at Oracle. He’s got a very busy schedule and was last night in Helsinki after a weekend at Fosdem in Brussels and a user group meeting the following day in Amsterdam (hosted by Booking.com).

Thanks much to Solinor for hosting the meeting last night in Helsinki! Great atmosphere, good discussions, pizza and beer…


Here is Morgan's schedule for the upcoming days, join him if you can!

  • Wed, Feb 3 - DOAG in Munich - Oracle CVC office, @5:30pm
  • Thu, Feb 4 - …
[Read more]
Growing the MySQL Community

I will the first speaker at the FOSDEM MySQL and Friends Devroom and unlike the other speakers I will not be presenting on new technical developments, better ways to run MySQL, or anything technical. But it may be the most important talk of the day. How can we grow the MySQL Community?

How do we attract new developers and database administrators and then guide them through the steps to a ‘journeyman’ level before showing them the way to becoming seniors in their fields? There is a shortage of talent and this cuts two ways. First hiring managers get frustrated in their searches for talent and then they reduce the scope of what they want out of their database. Second the same hiring manager later will assume there is still no talent for them to hire and alter their demand accordingly. I want to bring in as many people as …

[Read more]
The Most Popular MySQL 5.7 Features

Three events into the new year and I have been getting a lot of feedback from you all on MySQL 5.7. So far there are some changes in 5.7 that are very popular.

The change in username name length from sixteen to thirty two characters seems to be universally loved. Yea!!!

The new JSON data type has caught a lot of attention. A few of you think that data should be normalized as Codd intended and find that simple shoving a document into a column is an no-no. But the vast majority love this new feature. Many ISPs are going to have to upgrade to get to 5.7 to meet demand for this new data type.

Generated columns seem to be a hot spot for several of you. Usually you do not see a lot of business logic in MySQL databases compared to, say, an Oracle database. And if there is some sort of business logic then it is implemented with a trigger. I have had some intense discussions with some folks who are going to be doing very …

[Read more]
San Diegans — learn about MySQL’s New JSON Data Type Tonight

I will be speaking at the San Diego PHP Meetup tonight January 19th at 7pm. The location is Business.com Media, 1900 Wright Place in Carlsbad (33.122360, -117.28909) and the topic will be MySQL’s JSON Data Type. I hope to see you there!


FOSDEM 2016 & MySQL 5.7 KickOff Tour

It's our pleasure to announce that as usual MySQL is part of the upcoming FOSDEM 2016 and this time it's followed by MySQL 5.7 KickOff Tour with Morgan Tocker as speaker!

At FOSDEM 2016: The MySQL & Friends devroom has been again approved & opened for all MySQLers to hear news from MySQL world. This year the MySQL day is Saturday, January 30, please see the whole schedule.

Do not miss to hear news about MySQL 5.7 and even more... also do not forget to stop at our booth in the expo area, this time you will be able to find also Java guys at the booth.

As follow up to the FOSDEM we have scheduled 9 afternoon/evening meetings with PHP / MySQL User Groups in the biggest European cities talking about news in MySQL 5.7. Here is the approved schedule with places which Morgan will visit (we are still waiting for some …

[Read more]
Showing entries 241 to 250 of 809
« 10 Newer Entries | 10 Older Entries »