MySQLdb is a Python wrapper around _mysql written by Andy
Dustman. This wrapper makes it possible to interact with a MySQL
Server performing all sorts of DDL and DML statements. I began my
Python journey recently and stumbled at the installation of the
MySQLdb module install. I was keen not to jump at an apt/yum
installation as we have servers that have no outbound connections
I decided I wanted to build the module from source.
You can download the MySQLdb files from SourceForge (70kb)
When downloaded you need to prep before your system is ready to
build the file. Here are some prerequisites that will
make life easier for you. I performed this particular install
using an Ubuntu 10.04 64bit OS.
Before you start ensure you have the following installed (MySQL
isn't actually required but for local Python development …
If you need to work with LVM in your scripts but haven’t found a good method to access details about Logical Volume Groups, here’s a simple Python script that will print the details about any volumes on your system. This could be useful for writing a partition check script for your MySQL data directory (if you’re not using a standard monitoring system like Nagios).
import sys
import os
import commands
import subprocess
import select
def lvm():
print ""
LVM_PATH = "/sbin"
LVM_BIN = os.path.join(LVM_PATH, 'lvm')
argv = list()
argv.append(LVM_BIN)
argv.append("lvs")
argv.append("--nosuffix")
argv.append("--noheadings")
argv.append("--units")
argv.append("b")
argv.append("--separator")
argv.append(";")
argv.append("-o")
argv.append("lv_name,vg_name,lv_size")
process = subprocess.Popen(argv, stdout=subprocess.PIPE)
output = ""
out = process.stdout.readline()
output += out
lines = …[Read more]
Here’s a simple answer to a simple question. “How do I run a backup of MySQL to another machine without writing to the local server’s filesystem?” – this is especially useful if you are running out of space on the local server and cannot write a temporary file to the filesystem during backups.
Method one – this writes a remote file.
mysqldump [options] [db_name|--all-databases]| gzip -c |
ssh user@host.com "cat > /path/to/new/file.sql.gz"
Method two – this writes directly into a remote mysql
server
mysqldump [options] [db_name|--all-databases]| mysql
--host=[remote host] –user=root –password=[pass] [db_name]
There are many questions that arise out of Oracle’s copyright and patent infringement complaint against Google regarding its use of Java in Android. There are several things that make the suit significant to the entire industry: it centers not just on software copyright, but also software patents (an increasingly and hotly debated issue), the quickly-expanding smartphone market and open source software. The first question is: what is Oracle doing?
Many are speculating that this is simply an effort to further and more effectively monetize Java, a storied program language that has move more toward openness and survived several supposed death sentences as newer languages arrived. Still, with all of the open source parts — GlassFish application server, MySQL database, OpenOffice.org suite — is Java the most significant to Oracle? It may be, but regardless of what Oracle is doing, its legal moves here may certainly have an impact on the …
[Read more]As a continuation to a previous blog post last week and inspired by Kedar I have created a small script to export tables, stored procedures, functions and views into their respective file. It works for multiple databases where you can specify a list of databases too and although things like events, triggers and such are still missing they are easily added.
It is especially useful to dump stored procedures separately since it is a lacking functionality in mysqldump.
I placed the script in mysql forge for anybody to use, provide feedback and possibly enhancements to it.
Compliance. Funding. Financial results. Copyright assignment. And more.
Follow 451 CAOS Links live @caostheory on Twitter and
Identi.ca
“Tracking the open source news wires, so you don’t have
to.”
Compliance
# The Linux Foundation launched the Open Compliance Program, including
tools, training, and consulting.
Funding
# VentureBeat reported that Joyent has raised $7m in a
second round of funding.
# Basho Technologies secured $2m from angel investors in a Series C preferred equity financing.
# …
[Read more]Stephen O’Grady and Simon Phipps have both recently published interesting posts on the current state of open source, with Stephen pondering the relative growth of open source and Simon wondering whether the “commercial open source” bubble has burst.
What they are describing, I believe, is the culmination of the trends we predicted at the beginning of 2009 for commercial open source business strategies – specifically the arrival of the fourth stage of commercial open source.
What is the fourth stage of commercial open source? In short: a return to a focus on collaboration and …
[Read more]I'm in the process of setting up Redmine (version 1.0-stable) on an Ubuntu 8.04 virtual machine. Getting a recent enough gem and rails is less fun than you might imagine, but the big issue I came across was a bug in the database model, which makes MySQL 5.1 (MariaDB 5.1 in my case) barf on installation.
There is a fix, but I am running from a git clone didn't want to download and apply a diff file to that repository. A quick google found what I need: the git cherry-pick command. It allows you to grab a single commit and apply its changes to your branch. In my case:
git cherry-pick …[Read more]
We’re happy to announce the release of MySQL Workbench 5.2.26. This is the first maintenance release for 5.2 GA (Generally Available). We have fixed a number of bugs and made some improvements under the hood. We hope you will make MySQL Workbench your preferred tool for Design, Development, and Administration of your MySQL database applications.
We want to thank everyone for the great feedback we have received. This helps us to continuously improve and extend the functionality and stability of MySQL Workbench – please keep up on approaching us with any ideas to develop our product even further.
MySQL Workbench 5.2 GA
- Data Modeling
- Query (replaces the old MySQL Query
- Administration (replaces the old MySQL Administrator)
Please get your copy from our Download site. Sources and binary packages are available for several platforms, including Windows, Mac OS X and Linux. …
[Read more]
I have not written an article in a while, I partially blame it on
the World Cup and my day job. The time has come to share some of
my recent experiences with a neat project to provide several
teams internally with current MySQL backups.
When faced with these types of challenges is my first step is to
look into OSS packages and how can they be combined into an
actual solution. It helps me understand the underlying
technologies and challenges.
ZRM BackupI have reviewed Zmanda's
Recovery Manager for MySQL Community Edition in the Fall 2008
issue of MySQL magazine. It remains one of my favorite
backup tools for MySQL since it greatly simplifies the task and
configuration of MySQL backups taking care of most of the
details. Its flexible reporting capabilities came in handy for
this project as …