|
The JDBC drivers for MySQL Enterprise Server are not bundled with Stash (due to licensing restrictions). You need to download and install the driver yourself.
<Stash installation directory>/lib directory (create the lib/ directory if it doesn't already exist).If you are migrating your data from the internal Stash database, back up the Stash home directory.
If you are migrating your Stash data from another external database, back up that database by following the instructions provided by the database vendor before proceeding with these instructions.
See Data recovery and backups.
Before you can use Stash with MySQL, you must set up MySQL as follows:
utf8 character set encoding utf8_bin collation (ensures case sensitivity)Here is an example of how to do that. When Stash and MySQL run on the same physical computer (accessible through localhost), run the following commands (replacing stashuser and password with your own values):
mysql> SET GLOBAL storage_engine = 'InnoDB'; mysql> CREATE DATABASE stash CHARACTER SET utf8 COLLATE utf8_bin; mysql> GRANT ALL PRIVILEGES ON stash.* TO 'stashuser'@'localhost' IDENTIFIED BY 'password'; mysql> FLUSH PRIVILEGES; mysql> QUIT |
This creates an empty MySQL database with the name stash, and a user that can log in from the host that Stash is running on who has full access to the newly created database. In particular, the user should be allowed to create and drop tables, indexes and other constraints.
If the MySQL database and Stash servers are on the same physical computer, you can use localhost and not set a password by omitting IDENTIFIED BY 'password' from the 2nd MySQL statement above (if you trust the security within this computer).
If the MySQL database and Stash servers are on different computers, just replace the localhost part of the GRANT ALL statement above with the hostname of the machine that Stash is running on. See the documentation at http://dev.mysql.com/doc/refman/5.1/en/account-names.html.
Note that Stash will generally require about 25–30 connections to the database.
You can now connect Stash to the MySQL database, either:
When running the Setup Wizard at install time:
When migrating to MySQL:
|