| Previous 30 Newer Entries | Showing entries 61 to 90 of 535 | Next 30 Older Entries |
I was digging through some old project code and found this script. Sometimes one finds oneself in an odd situation and needs to convert regular SQL, say from a MySQL database dump, into SQLite3 format. There’s not too much else to say, but here is a script that helps with the process. It can likely be improved but this handles the items that came up during conversion on initial runs.
#!/bin/sh #### # NAME: convert-mysql-to-sqlite3.sh # AUTHOR: Matt Reid # DATE: 2011-03-22 # LICENSE: BSD #### if [ "x$1" == "x" ]; then echo "Usage: $0 " exit fi cat $1 | grep -v ' KEY "' | grep -v ' UNIQUE KEY "' | grep -v ' PRIMARY KEY ' | sed '/^SET/d' | sed 's/ unsigned / /g' | sed 's/ auto_increment/ primary key autoincrement/g' | sed 's/ smallint([0-9]*) / integer /g' | sed 's/ tinyint([0-9]*) / integer /g' | sed 's/ int([0-9]*) / integer /g' | sed 's/[Read more...]
"Pinterest has learned about scaling the way most popular sites do — the architecture works until one day it doesn’t"Pinterest found out that "the architecture" is not scalable and they turned to development of a Scale Out mechanism also called Sharding.
Advanced Weblob operations help to use Weblobs most effectively.
In an earlier post I introduced Weblobs. Weblob is a new data type that is supported by the Cloud Storage Engine for MySQL (ClouSE). To a database developer, a WEBLOB behaves (almost) like a regular BLOB. However, in addition to the regular BLOB functionality, Weblobs can be downloaded directly from Amazon S3 by HTTP URLs.
In MySQL, a Weblob is expressed via a pair of BLOB fields that have a special naming convention: field_name$wblob and field_name$wblob_info. The latter field is what provides the Weblob functionality. It can be used to retrieve the direct Amazon S3 URL for the BLOB
[Read more...]We’re delighted to share the news that our friends at MariaDB today announced the availability of MariaDB Galera Cluster!
We’ve been talking a good bit about MariaDB in the past few months and it’s great to see the MariaDB & Codership partnership result in today’s announcement.
I got a few questions like the ones below that I’d like to address to avoid further confusion.
How exactly secure is ClouSE for MySQL, the first secure database in the cloud? Am I protected against standard application level security attacks or even accidental admin mistakes?
With the help of ClouSE I get instantaneous backup for my database on the highly durable cloud storage. But how would I protect my data in case a malicious attack or an accident did occur?
Re: security
I’ve got a comment pointing out that data encryption on the storage level doesn’t protect from SQL injections. Of course, data encryption does not protect from SQL injections (as long as there is SQL involved, there will be a risk of a SQL
[Read more...]With its distributed, shared-nothing, real-time design, MySQL Cluster (http://www.mysql.com/products/cluster/) has attracted a lot of attention from developers who need to scale both read and write traffic with ultra-low latency and fault-tolerance, using commodity hardware. With many proven deployments (http://www.mysql.com/customers/cluster/) in web, gaming, telecoms and mobile use-cases, MySQL Cluster is certainly able to meet these sorts of requirements.
But, as a distributed database, developers do need to think a little differently about data access patterns along with schema and query optimisations in order to get the best possible performance.
Sharing best practices developed by working with MySQL Cluster's largest users, we recently ran a Performance Essentials webinar
[Read more...]This past week I attended OSCon, the annual conference for open source’s true believers. And there was a religous fervor in the air, particularly from the point of view of someone more accustomed to Oracle conferences.
And if open source is the religion, proprietary closed-source companies are the devil. That having been said, I was surprised how virtually all large companies were demonized. Even long-time defenders of open source like IBM were ignored at best. That didn’t prevent the from coming though, with Microsoft and HP in particular with high-profile sponsorships and PR offensives that didn’t seem to have much influence with the crowd.
The companies generating buzz were the small companies built around development of their own open source products. There are a surprising number of them out
[Read more...]Meet The SkySQL Team At OSCON 2012!
“I remember my first OSCON in 2001 and the passionate debates we had on the impact the open source movement was going to make …”
This is a quote from a conversation that some SkySQLers were having this week in Paris, where we met to discuss the future - ours and that of the MariaDB & MySQL databases as well as open source technologies in general!
That’s the thing about SkySQLers: we like discussions and meeting people; a tradition inherited from the good ol’ MySQL AB times that we’re happy to carry on in today’s and tomorrow’s world of open source technologies.
And next week there will be no
[Read more...]"Why the days are numbered for Hadoop as we know it"I know GigaOM like to provoke scandals sometimes, we all remember some other unforgettable piece, but there is something behind it...
Can OLTP database workloads use Amazon S3 as primary storage? Now they can, thanks to the Cloud Storage Engine (ClouSE), but the question is: how fast?
To answer the question about performance, we decided to run db_STRESS benchmark on a MySQL database in Amazon EC2. We compared 3 configurations:
What do you think of this piece of C code?
void foo(long v) {
unsigned long u;
unsigned sign;
if (v < 0) {
u = -v;
sign = 1;
} else {
u = v;
sign = 0;
}
...
Seems pretty simple, right? Then what do you think of this output from MySQL:
mysql> create table t1 (a bigint) as select '-9223372036854775807.5' as a; mysql> select * from t1; +----------------------+ | a | +----------------------+ | -'..--).0-*(+,))+(0( | +----------------------+Yes, that is authentic output from older versions of MySQL. Not just the wrong number, the output is complete garbage! This is my all-time favorite MySQL bug#31799. It was caused by code like the above C snippet.
So can you spot what is wrong with the code? Looks pretty simple, does it
[Read more...]
I’ve been working on a data archival project over the last couple weeks and thought it would be interesting to discuss something a bit counter-intuitive. Absolutes are never true, but when getting rid of data, it’s usually more efficient to insert the data being kept into a new table rather than deleting the old data from the existing table.
Here is our example table from the IMDB database.
mysql> show create table title\G
*************************** 1. row ***************************
Table: title
Create Table: CREATE TABLE `title` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` text NOT NULL,
`imdb_index` varchar(12) DEFAULT NULL,
`kind_id` int(11) NOT NULL,
`production_year` int(11) DEFAULT NULL,
`imdb_id` int(11) DEFAULT NULL,
`phonetic_code` [Read more...]
New quick-start guide for MySQL DBAs: SkySQL™ Enterprise Monitor makes managing your MySQL & MariaDB databases that much easier
We’ve just published a new Quick Start Guide to SkySQL™ Enterprise Monitor for all MySQL & MariaDB DBAs out there, who are looking for ways to manage their databases more easily.
SkySQL™ Enterprise Monitor (SSEM) is an efficient and easy to use monitoring tool used by thousands of Database Administrators (DBAs) to analyze their MySQL® Databases every day.
In other words, you get to spend less time on routine-tasks and more time on
[Read more...]There are mistakes that drive you crazy when you try to understand what went wrong.
One of the most annoying and hard to catch was this, apparently harmless line:
tungsten-sandbox -m 5.5.24 --topology all-masters -n 2 -p 7300 -l 12300 -r 10300 –t $HOME/mm -d tsb-mm
The person reporting the error told me that the installation directory (indicated by "-t") was not taken into account.
I usually debug by examples, so I copied the line, and pasted it into one of my servers. Sure enough, the application did not take trat option into account. The installation kept happening in the default directory.
I knew that I had done a good job at making the application configurable, but I checked the code nonetheless. The only place where the default directory is mentioned is when the related variable is initialized. Throughout the code, there are no
[Read more...]As I reported via Twitter late last week, we encountered an issue that got some of our mail delivery delayed by about a day and a half. I’ll explain more about what happened as I believe in openness on these matters, and also the experience has educational content for others.
Our mail server doesn’t have direct external interaction, it’s shielded by two relays that handle both the inbound MX and the outbound queue. This setup works remarkably well in terms of exposure to spam and other malicious activity. As previously discussed, it appears that it’s more difficult to make mail server infra more resilient without expending lots more time/effort and infrastructure expenditure. Just because of the way the common tools for mail delivery and imap are built, having two or more of each in a semi-active setup gets quite complex. Complexity is in itself a risk so it has to
[Read more...]Over the past few days extensive conversations around a new security vulnerability in MariaDB and MySQL have taken place.
It all started as a chain reaction when Monty Program publicly disclosed information about the flaw they had found and about how to make sure your MariaDB and MySQL installations can be fixed. The initial information got assigned the security vulnerabitlity identifier CVE-2012-2122 and the contents can be seen e.g. here http://seclists.org/oss-sec/2012/q2/493 .
The bug was found two months ago on April 4th.
Before disclosing the information publicly, given the seriousness of this bug and considering the millions of MySQL and MariaDB installations deployed worldwide, Monty Program informed the biggest distributors of MySQL and
[Read more...]Cloud-powered BLOB type provides ACID guarantees and fast direct access to blobs via Web URLs.
Typically unstructured data (such as pictures, media files, documents)
a) Is either stored on the file system, unlike the related with it relational data which is stored in the database. This is well known, “convenient” practice that allows fast access to files but offers no transactional story and no unified data management (for db and filesystem)
b) Or is stored in BLOBs. This ensures transactional consistency and reduces management complexities, but is really bad for performance and scalability.
We took advantage of the cloud, and came up with an upgrade to the BLOB – a solution that combines the benefits of the two.
Weblob is a new data type that is
[Read more...]Retrouvez SkySQL et ses partenaires sur le stand C21 du Salon Solutions Linux 2012 au CNIT à Paris du 19 au 21 juin
Cette année, le Salon Solutions Linux à Paris coincide avec la Fête de la Musique. C’est donc avec enthousiasme que nous nous préparons pour cet évènement annuel incontournable dédié aux logiciels libres et à l’Open Source.
Le salon
Nous avons pu le constater en 2011, le salon Solutions Linux/Open Source est un salon qui ne ressemble à aucun autre. Nous serons donc de nouveau présent lors de l’édition 2012 en collaboration avec notre
I found time to continue my previous work on group commit for the binary log in MariaDB.
In current code, a (group) commit to InnoDB does not less than three fsync()
calls:
"Dell announced a prototype low-power server with ARM processors, following a growing demand by Web companies for custom-built servers that can scale performance while reducing financial overhead on data centers"In short, ARM (see Wikipedia definition here) is an architecture standard for processors. ARM processors are slower compared to good old x86 processors from Intel and AMD, but have power-efficiency, density and price attributes that intrigue [Read more...]
1. Percona Toolkit
Percona Toolkit (aka Maatkit and Aspersa) is must have collection of advanced command-line tools which helps in performing tasks that are too difficult or complex to perform manually.
2. Mydumper
Mydumper is a high-performance multi-threaded backup/restore tool for MySQL. It’s up to 10x faster compared to mysqldump, can take consistent snapshots and provides File compression on-the-fly. Though it’s still under active development but is well tested/used in production on some large installations.
3. MySQL Master HA
This tool helps to maintain your Master-Slave
| Previous 30 Newer Entries | Showing entries 61 to 90 of 535 | Next 30 Older Entries |