Showing entries 1 to 6
Displaying posts with tag: Mac OS (reset)
Building XtraBackup for Mac OS

Percona XtraBackup is free and open source backup tool for MySQL. Percona distributes XtraBackup via package repositories for RedHat and Debian.

Unfortunately there are no packages for Mac OS. In this post I will describe how to build XtraBackup for Mac OS.

Dependencies

To build and use XtraBackup on Mac OS you need to install some additional packages. I will use MacPorts to install the dependencies.

# port install cmake p5.16-dbd-mysql

Building XtraBackup for Mac OS

Download the source code from …

[Read more]
Setting up Jenkins Continuous Integration for a PHP project on a Mac Mini Server

With one of my previous post I have run through the steps involve in setting up Jenkins and today I’m going to discuss about the how to get a PHP project integrated with Jenkins on a Mac Mini server(It’s a pain in the ass compared to a Linux box when it comes to setting up […]

Recovering a MySQL `root` password – Three solutions

Three ways to recover a root user password:

The order of solutions here under gets more creative on the way down :)

1. obviously, before starting messing around check my.cnf or scripts for passwords entries, then try home directories for password files
2. secondly – can you restart mysql? if yes, restart with –skip-grant-tables, log into mysql, change your password and restart without –skip-grant-tables
3. third option – (on linux / unix ONLY)
If you haven’t found the password anywhere and can’t afford to restart your mysql.

cd data/mysql
cp -rp user.MYD bck_user.MYD_`date +%Y%m%d`
cp -rp user.MYD /tmp/user.MYD
vi /tmp/user.MYD #(edit the hashed passwords next to root*)
cp -rp /tmp/user.MYD user.MYD
sudo kill -HUP `pidof mysqld`

Note that the latter method of recovering a root password CAN be easily used maliciously leaving no trace! The only way to avoid such an attack is to make the …

[Read more]
mysqldump each object separately

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.

Circular Replication Implementation / Testing using MySQL Sandbox

This is a simple mysql circular replication implementation on a single machine (just a proof of concept) which can easily be done on a broader scale. Just be aware of the cons of circular replication which mainly gets down to: once a node freaks out or stops for one reason or the other, it’s a bitch and you need to take care of IMMEDIATELY.

Download Sandbox from https://launchpad.net/mysql-sandbox/+download
Download MySQL from http://dev.mysql.com/downloads

Copy the downloaded software onto the your *nix box onto any folder of your preference called $BASEDIR

run:

cd /$BASEDIR

gunzip mysql_sandbox_X.X.XX.tar.gz
tar -xf mysql_sandbox_X.X.XX.tar

ln -s mysql_sandbox_X.X.XX sandbox

time /$BASEDIR/sandbox/make_replication_sandbox –circular=4 –topology=circular /$BASEDIR/mysql-5.1.30-linux-x86_64-glibc23.tar.gz


user@hostname $ time …

[Read more]
MySQL Installing: Binary tarball (.tar.gz) *nix based platforms

Installing MySQL is quite an easy thing to do, especially when done using pkgs, dmgs or exes. It gets just a tad more time consuming and brain intensive when installing a .tar.gz binary package. It is when you’re compiling MySQL source directly that you’ll need some planning and playing, but the latter is only done in particular cases such as when you’ll need a particular engine not shipped with a pre-compiled package etc.

Today we’re going through the steps required for a typical MySQL installation from a .tar.gz package on a *nix based platform, including the download, installation, configuration and securing.

Steps involved:
1. Download MySQL binary tarball from mysql.com
2. Create a folder structure where the installation will be held.
3. Install the package
4. Secure the installation

Step 1: Download MySQL

Go to http://dev.mysql.com/downloads/ and choose the particular …

[Read more]
Showing entries 1 to 6