WebScaleSQL

WebScaleSQL is a collaboration among engineers from several companies that face similar challenges in running MySQL at scale, and seek greater performance from a database technology tailored for their needs. Those “several companies” are Facebook, Google, LinkedIn, and Twitter. And the collaboration mentioned is a true collaboration: For example, to introduce a code change, a …

Backup local MySQL Databases

Nice script by Xavez. Put it in a daily cronjob if you like, or extend it to copy the backup to another machine: #!/bin/bash # Path to where you want to backup mysql databases. opath=/Users/username/Sites/Backups/mysql/ # Local mysql details. Make a username with only read access. Allow SELECT, LOCK TABLES. mysqlhost=127.0.0.1 username=read_only_user password=read_only_password # Get …

node-orm2 — Node.js Object Relational Mapping

ORM Package for Node.js. Works with MySQL, PostgreSQL and SQLite. var orm = require(‘orm’); orm.connect("mysql://username:password@host/database", function (err, db) { if (err) throw err; var Person = db.define(‘person’, { name : String, surname : String, age : Number, male : Boolean, continent : [ ‘Europe’, ‘America’, ‘Asia’, ‘Africa’, ‘Australia’, ‘Antartica’ ], // ENUM type photo : …

MySQL: Get next AUTO_INCREMENT value from/for table

Note to self: To get the next auto_increment value from a table run this query: SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = "databaseName" AND TABLE_NAME = "tableName" Don’t forget it (again). Did this help you out? Like what you see?Consider donating. I don’t run ads on my blog nor do I do this for profit. …