Portable MariaDB is a small, portable binary distribution of the SQL server MariaDB (Monty's fork of MySQL) for Linux i386 (32-bit). Only the mysqld binary and a versatile init script are included. Portable MariaDB can be run by any user in any directory, it doesn't try to access any mysqld data or config files outside its directory. Portable MariaDB can coexist with regular mysqld (MySQL or MariaDB) and other instances of Portable MariaDB on a single machine, as long as they are not configured to listen on the same TCP port. The only dependency of Portable MariaDB is glibc 2.4 (available in Ubuntu Hardy or later).
Why use Portable MariaDB?
To run Portable MariaDB, you need a Linux system with glibc 2.4 (e.g. Ubuntu Hardy) or later. 32-bit and 64-bit systems are fine. For 64-bit systems you need the 32-bit compatibility libraries installed. You also need Perl.
$ cd /tmp # Or any other with write access. $ BASE=https://raw.githubusercontent.com/pts/portable-mariadb/master/release $ #OLD: wget -O portable-mariadb.tbz2 $BASE/portable-mariadb-5.2.9.tbz2 $ wget -O portable-mariadb.tbz2 $BASE/portable-mariadb-5.5.46.tbz2 $ (cd /tmp && tar xjvf /tmp/portable-mariadb.tbz2) $ chmod 700 /tmp/portable-mariadb # For security. $ /tmp/portable-mariadb/mariadb_init.pl stop-set-root-password
For security, don't do anything as root.
$ cd /tmp/portable-mariadb $ ./mariadb_init.pl restart Connect with: mysql --socket=/tmp/portable-mariadb/mysqld.sock --user=root --database=test --password Connect with: mysql --host=127.0.0.1 --user=root --database=test --password
Feel free to take a look at /tmp/portable-mariadb/my.cnf , make modifications, and restart mysqld so that the modifications take effect.
By default, connections are accepted from localhost (Unix domain socket and TCP) only, all MySQL users are refused (except if a password has been set for root above), and root has unrestricted access. Unix permissions (such as the chmod 700 above) are protecting against data theft and manipulation on the file level.
It is strongly recommended to change the password of root to a non-empty, strong password before populating the database.
Java clients with JDBC (MySQL Connector/J) are fully supported. Please note that Java doesn't support Unix doman socket, so make sure in my.cnf that mysqld listens on a TCP port. Please make sure you have ?characterEncoding=UTF8 specified in your JDBC connection URL, otherwise some non-ASCII, non-Latin-1 characters would be converted to ?.
Just as with MariaDB. All encodings and collations are supported. The latin1 encoding is the default, which can be changed in my.cnf.
All natural languages (of MariaDB) are supported for error messages. Set the `language' flag in my.cnf accordingly. English is the default.