Showing entries 15383 to 15392 of 44105
« 10 Newer Entries | 10 Older Entries »
Shinguz: Resize XFS file system for MySQL

Important: Before you start any operation mentioned below do a proper file system backup of your XFS file system you want to resize. If MySQL is running on this mount point do this with a stopped mysqld. Alternatively you can also use mysqldump to do the MySQL backup but test the restore time before continuing to not experience ugly surprises...

All these operations have to be performed as the root user. First we want to see what mount points are available:

shell> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             485M   77M  383M  17% /
/dev/sdb1             496M  314M  157M  67% /var/lib/mysql


Our MySQL data are located on /dev/sdb1.

After the file system backup unmount /dev/sdb1 and resize the disk, partition or volume (works for VMware, NetApp filer and similar equipment, for LVM …

[Read more]
Comment on MySQL search database | MySQL search all tables by Sam

Is there simply an sql query or a complex combination of them to search a string..

Converting Timezone-Specific Times in MySQL

Twice last week, a developer wanted to convert the existing datetime values in a database to UTC. The datetime values were the default for the server, which was the US/Pacific time zone, which is subject to Daylight Saving Time changes. Both developers for both applications wanted to convert all the times to UTC, so there would not be any changes due to Daylight Saving Time, and asked me for an easy query to know which times should be changed by adding 7 hours and which times should have 8 hours added to them.
The good news is that MySQL has some built-in functionality to make this easier. You may know about the CONVERT_TZ() function in MySQL, and that you can use it in a query to convert times like this:
mysql> SELECT CONVERT_TZ(NOW(),'-8:00','-0:00');
+-----------------------------------+
| …

[Read more]
Converting Timezone-Specific Times in MySQL

Twice last week, a developer wanted to convert the existing datetime values in a database to UTC. The datetime values were the default for the server, which was the US/Pacific time zone, which is subject to Daylight Saving Time changes. Both developers for both applications wanted to convert all the times to UTC, so there would not be any changes due to Daylight Saving Time, and asked me for an easy query to know which times should be changed by adding 7 hours and which times should have 8 hours added to them.

The good news is that MySQL has some built-in functionality to make this easier. You may know about the CONVERT_TZ() function in MySQL, and that you can use it in a query to convert times like this:

mysql> SELECT CONVERT_TZ(NOW(),'-8:00','-0:00');
+-----------------------------------+
| …

[Read more]
Is MySQLdb hard to install?

The short answer is: No. The longer answer is: It depends. With the latest version, most of the time, you can run:

pip install MySQL-python

and you're done... if you have the prerequisites. That's where it gets sticky.
The dreaded prerequisitesSince MySQLdb uses a C module to link against MySQL's client library, you will need:

  • A C compiler and associated toolchain
  • Python development headers and libraries
  • MySQL development headers and libraries

LinuxMySQLdb was originally developed specifically for use on Linux, as it was the only platform I cared about at the time. Over time, several Linux distributions (Red Hat, Debian, Ubuntu, etc.) picked it up, created their own packages, and distributed them. If you are a Linux user, I recommend you use your distributions packages. But what if you can't, and you really do need to build your own? Install using pip. …

[Read more]
Question of the week: Maximum number of tables per MySQL instance.

I’ve got the great response to my two previous polls (1,2) so lets continue learning about how we all use MySQL. The question of this week is What is the maximum number of tables per MySQL instance do you use ?

Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.

Thank you for participating!

MySQL Performance: InnoDB vs MyISAM in 5.6

Since the latest changes made recently within InnoDB code (MySQL 5.6) to improve OLTP Read-Only performance + support of full text search (FTS), I was curious to compare it now with MyISAM..

While there was no doubt that using MyISAM as a storage engine for a heavy RW workloads may become very quickly problematic due its table locking on write design, the Read-Only workloads were still remaining favorable for MyISAM due it's extreme simplicity in data management (no transaction read views overhead, etc.), and specially when FTS was required, where MyISAM until now was the only MySQL engine capable to cover this need.. But then FTS came into InnoDB, and the open question for me is now: is there still any reason to use MyISAM for RO OLTP or FTS wokloads from performance point of view, or InnoDB may now cover this stuff as well..

For my test I will use:

  • Sysbench for OLTP RO workloads
[Read more]
Log Buffer #295, A Carnival of the Vanities for DBAs

Horizon is getting cloudier. But these low hanging clouds are not darker or ominuous in any way. These are the clouds of enabling technologies providing mortals, drops of technologies according to their wishes. Behind this seamless information troposphere, databases are floating, again on demand. This Log Buffer Edition showers the droplets of blogs from databases...

Percona Toolkit version 2.1.6 released

The Percona Toolkit team is happy to announce the release of Percona Toolkit version 2.1.6. This is the sixth stable release in the 2.1 series, and primarily a bug-fix release; We suggest that users upgrade to the latest version of the tools.

The complete list of changes is on the Launchpad milestone for 2.1.6, but here are some highlights the release:

  • pt-online-schema-change can now handle column renames
  • pt-online-schema-change’s DELETE trigger no longer fails when altering a primary key
  • pt-stalk got a plugin hook interface
  • pt-show-grant support for column-level grants
  • pt-table-checksum will warn if slaves have a differing binlog_format

Remember that if you need help with Percona Toolkit, we provide flat-fee, unlimited support services with rapid 24×7 response on a …

[Read more]
InnoDB now works with read-only media

With a handful of exceptions, few people deliberately choose to deploy MySQL on read-only media – but there are cases where being able to access InnoDB data that way comes in handy.  As it happened, I had exactly this need a few months back, and the excellent InnoDB development team at Oracle has recently implemented this feature in MySQL 5.6.

First, some background.  We had a need to migrate  legacy systems from a 3rd party data center into new corporate data centers.  These systems were redundant, but we wanted to retain access to the data for archival purposes.  All went well, except one small detail:  Because the machines were originally housed outside the new data center, we weren’t allowed to stand up the servers inside the new data center – except in read-only mode.

Therein was the problem – we had many GB worth of data stored in MySQL using InnoDB, and we could access the data files – …

[Read more]
Showing entries 15383 to 15392 of 44105
« 10 Newer Entries | 10 Older Entries »