Showing entries 9663 to 9672 of 44043
« 10 Newer Entries | 10 Older Entries »
MySQL 5.7.6: It is easier to switch master now!

Introduction

One of the primary objectives of MySQL replication is providing an easy failover process i.e. switching to a redundant system if the primary MySQL server fails. In MySQL this translates to switching to the most appropriate slave server in the eventuality of a failure of the master server.

The promotion of a candidate slave to become a new master is based on a lot of factors, undoubtedly the most important factor being that the chosen slave should be most up to date with the primary server (the old master) before we lost it! This blog explains how to use new features in MySQL 5.7.4 and later to make failover easier.

To find the most up to date slave server, a failover script looks at the set of transactions received by the slave and compares it with every other slave to find the one that has received the biggest set of transactions. There could be more sophisticated ways of doing this, for instance you …

[Read more]
Perl-MySQL Program

Configuring Perl to work with MySQL is the last part creating a complete Fedora Linux LAMP stack for my students. Perl is already installed on Fedora Linux.

I’ve also shown how to use PHP, Python, and Ruby languages to query a MySQL database on Linux. After installing this additional Perl DBI library, my students will have the opportunity to choose how they implement their LAMP solution.

You can find the Perl version with the following version.pl program:

1
2
3
4
#!/usr/bin/perl -w
 
# Print the version.
print "Perl ".$]."\n";
[Read more]
Python-MySQL Program

This post works through the Python configuration of Fedora instance, and continues the configuration of my LAMP VMware instance. It covers how you add the MySQL-python libraries to the Fedora instance, and provides the students with one more language opportunity for their capstone lab in the database class.

A standard Fedora Linux distribution installs Python 2.7 by default. Unfortunately, the MySQL-python library isn’t installed by default. You can verify the Python version by writing and running the following version.py program before installing the MySQL-python library:

1
2
3
4
5
# Import sys library.
import sys
 
# Print the Python version.
print sys.version

You can run the version.py program dynamically like this from the current working directory:

[Read more]
Community dinner @ Pedro’s

Folks, as usual Pythian is organizing the community dinner. After many years, food, (responsible) drinking and photos, this event has become an important moment for all of us, to know each other better, discuss and have fun.

This year is also the 20th year for MySQL so … YEAAAH let us celebrate, with more food, fun and responsible drinking.

If you had not done it yet … register yourself here: https://www.eventbrite.com/e/the-pythian-mysql-community-pay-your-own-way-dinner-tickets-15692805604

Info about the event:

When: Tuesday April 14, 2015 – 7:00 PM at Pedro’s (You are welcome to show up later, too!
Where: Pedro’s Restaurant and Cantina – 3935 Freedom Circle, Santa Clara, CA 95054

I know, I know … we are that kind of …

[Read more]
Change binary log and relay log location to /home? SELinux issue

Recently in my slave server there was a full disk error because of the huge size of binary logs.Which is lead to critical error and BUG report which is still stays as open:

http://bugs.mysql.com/bug.php?id=72437

So the issue was a partition problem which in partitioning stage haven’t been specified for “/” (root) filesystem. But in “/home” there were left enough space.
The quick decision was to change binary and relay log location(path) to “/home”.
But there was a great challenge to get real working slave again.

Now we will explore all steps in our test virtual machine.
Test conditions for me:

1. CentOS 6.5 (x86_64) (both master and slave)
2. MySQL 5.6.19 GA (from official yum repo) (both master and slave)

Master my.cnf:

# BINARY LOGGING #
server_id                      = …
[Read more]
JSON Labs Release: Overview

Summary

We’re very happy to announce that the MySQL JSON Labs release is now available on MySQL Labs!

With this work, MySQL continues to grow as a hybrid SQL/NoSQL DBMS, one that can offer the best of both worlds to application developers. Please stay tuned for additional news that ensures MySQL remains the most popular Open Source database for next-generation web, mobile, and Cloud based applications!

A big THANK YOU to everyone in the development team that made this happen!

What’s New?

This Lab release is MySQL 5.7.7 with patches for the following Worklogs applied:

[Read more]
Copying Tablespaces to Another Server (Transportable Tablespaces)

If you want take several actions on tables? It is really very exciting

Install MySQL from source with debugging option in Linux

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 …

[Read more]
MySQL JSON Functions

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]
Activate SSL connection in MySQL

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]
Showing entries 9663 to 9672 of 44043
« 10 Newer Entries | 10 Older Entries »