Reputation: 626
Is a portable version of MySQL for Linux available?
Upvotes: 5
Views: 7133
Reputation: 3647
To have a Portable Version of MySQL in linux, you can compile it to a Generic location
./configure --prefix=/myworkspace/installs/mysql --exec-prefix=/myworkspace/installs/mysql
Then usual
make
make install
this will install mysql on /myworkspace/installs/mysql. Then you can zip the whole mysql folder and can take it anywhere except you can run it from the same directory structure you have installed. Compiling mysql requires some dependencies, check it out here http://dev.mysql.com/doc/refman/5.6/en/source-installation.html . If you install these dependencies also in /myworkspace/installs/mysqldepends/ , then your mysql is totally portable.
Upvotes: 4
Reputation: 63538
You don't need to "install" mysql. Its binaries will run from any directory (given appropriate search paths etc), and its configuration can be specified entirely on the command-line, if necessary, bypassing the likes of /etc/my.cnf, or by specifying an alternative config file with arbitrary path.
Some engines can work with a readonly data directory (MyISAM, Archive), others may require a read/write data directory (Innodb) but that could be a temporary area or ramdisc.
There's nothing "un-portable" about MySQL.
Upvotes: 6