-
The community helping customers restore faster with mysqldump
A big thanks to Xiaobin Lin for taking the time to submit and the related patch for bug #64248. It could be available in MySQL 5.5.20. I was mistaken. The patch is based on 5.5.20 This should help users to restore their database faster thanks to fast index creation. More information is available via the bugs page. I have heard that this is just one of several patches he has contributed. Contributions such as this, help MySQL to continue to deliver an always improving product. So a big “Thank You” from the MySQL team.
-
XtraBackup Manager - Job Control, Better Debugging and some little fixes...
Hi Everyone,Just a quick note to let you know that I've just finished up adding some new features to XtraBackup Manager.You can now get better visibility into what is going on inside XtraBackup Manager with the "xbm status" command.It will allow you to see which backup jobs are running and also those which may be waiting to start, due to the maximum number of concurrent backup tasks already running.It looks/works as follows:[xbm@localhost ~]$ xbm statusXtraBackup Manager v0.8 - Copyright 2011-2012 Marin SoftwareCurrently Running Backups:+--------+-----------+-------------+---------------------+-------------------+------+| Job ID | Host | Backup Name | Start Time | Status | PID |+--------+-----------+-------------+---------------------+-------------------+------+| 14 | localhost | test-backup | 2012-02-07 14:19:19 | Performing Backup | 2525 |+--------+-----------+-------------+---------------------+-------------------+------+Note: I have to thank a tiny little BSD-licensed project I found on Google Code called PHP text table for saving me the need to reinvent the wheel in providing this very mysql command-line client-styled table output.In addition to seeing which jobs are running/queued, if there is a backup job you would like to abort for some reason, then you can now simply use the "xbm kill" command with a Job ID taken from the "xbm status" output:[xbm@localhost ~]$ xbm kill 14XtraBackup Manager v0.8 - Copyright 2011-2012 Marin SoftwareAction: Backup Job ID 14 was killed.The backup job itself will log an event at the ERROR level, like:2012-02-07 14:19:30 -0800 [ERROR] : [ The backup job was killed by an administrator. Aborting... ]2012-02-07 14:19:30 -0800 [INFO] : [ Cleaning up files... ]2012-02-07 14:19:30 -0800 [INFO] : [ Released lock on port 10000. ]2012-02-07 14:19:31 -0800 [ERROR] : [ Exiting after the backup job was killed... ]I'm still not 100% on whether an aborted backup message should be considered an "Error" level event or an "Info" level event. My thinking is that I'd prefer to know if a job was aborted, so I figure putting it at the ERROR level will ensure it is always logged.Now speaking quickly of the log levels -- it is now useful to increase your logging level in config.php from INFO to DEBUG.You will see the exact commands used for running backups by XtraBackup Manager, which can be useful when troubleshooting XBM-related issues.It will enable logging like the below -- Note: The password is _actually_ masked when writing the command to the log. You're welcome ;-)2012-02-07 14:19:19 -0800 [INFO] : [ Staging an INCREMENTAL xtrabackup snapshot of /var/lib/mysql via ssh: mysql@localhost to /tmp/xbm-3592510/deltas... ]2012-02-07 14:19:19 -0800 [DEBUG] : [ Attempting to run the incremental backup with command:ssh -o StrictHostKeyChecking=no -p 22 mysql@localhost 'cd /tmp/xbm-3592510 ; innobackupex --ibbackup=xtrabackup --slave-info --incremental-lsn=2325647 /tmp/xbm-3592510/deltas --user=root --safe-slave-backup --password=XXXXXXX --no-timestamp --incremental --throttle=0 1>&2 ' ]Aside from the above, some other small fixes were made, including ensuring that all temporary files created on the database host that you're backing up are created in the defined "staging_tmpdir" -- This is a parameter that is set at the host level in XtraBackup Manager.eg. shell> xbm host edit hostname staging_tmpdir /path/to/useI encourage you to check out the XtraBackup Manager Project and open issues with any problems you encounter or other feedback.Cheers,Lachlan
-
Announcing the SkySQL & MariaDB Solutions Day for the MySQL® Database: Free Training for Developers, DBAs, & IT Architects
SkySQL and MariaDB are delighted to announce that we’ll be co-hosting our first Solutions Day for the MySQL® Database on 13 April, 2012, at the Hyatt Regency Santa Clara.
During this one day event, attendees will receive free, hands-on training on MySQL database solutions from the experts at SkySQL, MariaDB, Continuent, ScaleDB, Severalnines, Sphinx, and Webyog, among others.
As well, SkySQL and MariaDB will bring together industry visionaries, including Michael (Monty) Widenius and David Axmark, the original authors of the MySQL database, to share their insights on current and future trends pertaining to the world’s most popular open source database.
Register Now!
Benefits of Attending:
Obtain free training and hands-on experience that will help you optimize, scale, and enhance your MySQL database deployments
Learn how to integrate your applications with popular MySQL solutions from Sphinx, ScaleDB, among others
Learn how to create a high availability (HA) environment for your MySQL databases using the latest HA solutions
Gain valuable insights into how to adapt your MySQL solutions to the Cloud
Hear from industry leaders about current and future trends surrounding the MySQL database and technology ecosystem
Network with and learn from your peers in the MySQL Community
Who Should Attend:
MySQL Database Administrators
Application Developers building solutions on MySQL
Development/Engineering Management
IT Architects
Cost of Attending:
The SkySQL & MariaDB: Solutions Day for the MySQL Database – featuring keynotes from industry visionaries, six intensive tutorials, and lunch – is absolutely free to attendees.
To learn more, take a look at our event schedule, featured speakers, the venue. As well, follow our discussions on Twitter @skysql #mysqlday, and on Facebook.
Register Now!
-
LOAD DATA INFILE to resolve locks
In relation to this MPB post, there is a command to output data into a file and then to load it back into MySQL to resolve locks. (An example of a really big reporting query that could be quite heavy, can be found here.)
There is an issue with outputting data into a file through MySQL if the file already exists. For example:
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed mysql> select * from user into outfile '/tmp/user.sql';
Query OK, 10 rows affected (0.00 sec) mysql> select * from user into outfile '/tmp/user.sql';
ERROR 1086 (HY000): File '/tmp/user.sql' already exists
So to resolve this, I played around with the \! command (which lets you run commands on your OS):
mysql> \! rm -rf /tmp/user.sql
mysql> select * from user into outfile '/tmp/user.sql';
Query OK, 10 rows affected (0.00 sec) mysql> \! rm -rf /tmp/user.sql
mysql> select * from user into outfile '/tmp/user.sql';
Query OK, 10 rows affected (0.00 sec)This seemed to have worked.
Apart from security issues and OS specific commands, anyone see anything wrong with this approach?Perhaps I should wrap it around in a stored procedure..
-
Meet The MySQL Experts Podcast: MySQL & PHP
The latest episode of our “Meet The MySQL Experts”
podcast focuses on MySQL & PHP! Andrey Hristov and Johannes Schlüter
from the MySQL Connectors Team talk about various ways PHP developers can use
MySQL, and also how they can leverage the MySQL Query Analyzer to optimize
queries.
Enjoy the podcast!
For additional information about MySQL & PHP, check out our
last special
edition newsletter.
|