If you want take several actions on tables? It is really very exciting
Dear all, our today’s topic is about finding out the cause of
MySQL crash and in depth examining issue for BUG reporting.
So what is exact mean of this article?
While i reported BUGs for MySQL, developers(experts) every time
ask for a core dump (with gdb) and full stack-trace. Yeap they
are right, finding an issue is only one step. You must also
provide all necessary information to MySQL developers if you
really interested in fixing bugs in open source. You have to help
to find the core of problem.
For this purpose you must have a DEBUG MySQL edition on your hand
to generate core dump and to see full stack-trace. Yes as you
think, we will install MySQL from source with DEBUG option and
will create core dump.
But first of all let to tell a few theory:
* There are several kinds of logging in MySQL:
1. General Log -> will log all kind of
database activity. Surely you will not enable it in …
What the MySQL team is doing with JSON (JavaScript Object Notation) in MySQL 5.7 is great! The MySQL Server Blog (Rick Hillegas and Dag Wanvik) published two key articles about new JSON functions. If you don’t follow these, let me highlight them as a set:
Most folks know how important JSON is to web development. I like the following visual that …
[Read more]
Secure connection? Today we will explore an interesting task
about activating and using SSL connection in MySQL.
We will provide all necessary scripts and commands to re-play all
steps.
So assume that we have CentOS 6.5 with OpenSSL and MySQL already installed:
[root@linuxsrv3 ~]# mysql --version mysql Ver 14.14 Distrib 5.6.17, for Linux (x86_64) using EditLine wrapper [root@linuxsrv3 ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.17-log MySQL Community Server (GPL) [root@linuxsrv3 ~]# openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 [root@linuxsrv3 ~]# rpm -qf `which openssl` openssl-1.0.1e-16.el6_5.7.x86_64
Our test host is a Virtual Machine with static ip address: 192.168.1.77.
The rest of contents of this article is quite straight just follow commands:
### Create Environment ### [root@linuxsrv3 ~]# …[Read more]
Taxonomy upgrade extras: logginggaleraclusterconflictdeadlockerror logerror
We typically suggest our customers to use our MySQL/Galera Cluster my.cnf configuration template to avoid MySQL configuration and performance problems.
And we are paranoid as well. Thus we enable all useful logging:
wsrep_log_conflicts = 1
…
Taxonomy upgrade extras: galeravmwaresnapshot
From time to time we see at Galera Cluster customer engagements the following, for me scary, warning in the MySQL error log:
[Warning] WSREP: last inactive check more than PT1.5S ago (PT7.06159S), skipping check
We mostly see this in VMware set-ups. Some further enquiry with the Galera developers did not give a satisfying answer:
This can be seen on bare metal as well - with poorly configured mysqld, O/S, or simply being overloaded. All it means is that this thread could not get CPU time for 7.1 seconds. You can imagine that access to resources in virtual machines is even harder (especially I/O) than on bare metal, so you will see this in …
[Read more]
After you install Ruby and build the Rails framework,
you need to create the mysql
gem. This blog post
shows you how to create the mysql
gem and how to
write a simple Ruby program that queries the MySQL database.
The first step creates the mysql
gem for Ruby
programming:
yum install mysql |
It should show you the following:
Fetching: mysql-2.9.1.gem (100%) Building native extensions. This could take a while... Successfully installed mysql-2.9.1 Parsing documentation for mysql-2.9.1 Installing ri documentation for mysql-2.9.1 Done installing documentation for mysql after 0 seconds 1 gem installed |
After you install the mysql
Ruby Gem, you can write
and …
The MySQL 5.7.7 JSON Lab release introduces a native JSON datatype. In part 1 of this blog post series, Rick Hillegas introduced the new functions for creating and manipulating JSON documents using the new native JSON data type. In this blog post we will be using some of the same sample tables and JSON documents as in part 1, so it will be helpful to read that blog post now, if you haven’t already.
Here we look closer at the functions provided to search through and peer into JSON documents to find values inside of them, and we’ll also cover a few utility functions as we go along. The functions described here are also summarized at the end of this blog for ease of reference.
Please note that the exact set of functions and their semantics may evolve …
[Read more]The MySQL 5.7.7 JSON Lab release introduces a native JSON datatype. See Knut Anders Hatlen’s blog post for more details on this new datatype. In this release we also introduced a number of functions for creating and querying JSON documents. In this post we’ll explore the following new functions related to manipulating JSON documents:
-
jsn_array()
-
jsn_object()
-
jsn_insert()
-
jsn_remove()
-
jsn_set()
-
jsn_replace()
-
jsn_append()
-
jsn_merge()
-
jsn_extract()
Dag Wanvik’s follow up blog …
[Read more]In the MySQL 5.7.7 JSON labs release, we have introduced a new data type for storing JSON data in MySQL tables. Now you can do this:
mysql> CREATE TABLE employees (data JSON); Query OK, 0 rows affected (0,01 sec) mysql> INSERT INTO employees VALUES ('{"id": 1, "name": "Jane"}'); Query OK, 1 row affected (0,00 sec) mysql> INSERT INTO employees VALUES ('{"id": 2, "name": "Joe"}'); Query OK, 1 row affected (0,00 sec) mysql> select * from employees; +---------------------------+ | data | +---------------------------+ | {"id": 1, "name": "Jane"} | | {"id": 2, "name": "Joe"} | +---------------------------+ 2 rows in set (0,00 sec)
Sure, you could always store JSON data in a TEXT or VARCHAR column, but having a native data type for JSON provides some major benefits over that approach:
-
Document Validation
Only …