Page MenuHomePhabricator

steps to create a Gerrit DB backend instance in labs

Authored By
Dzahn
Aug 31 2016, 6:07 PM
Size
1 KB
Referenced Files
None
Subscribers
None

steps to create a Gerrit DB backend instance in labs

1. create an instance that you will be hosting MySQL on.
2. ssh into your MySQL instance you just created
3. install mysql: apt-get install MySQL-server-5.5 (note it will ask you to create a password, set to something random or leave this blank for testing purposes, there is no private data in labs and users who have access to the instance will be able to reset it anyways)
4. vim /etc/mysql/my.cnf
(add these under [mysqld_safe], [mysqld] and [mysqldump])
character-set-server=utf8
collation-server=utf8_unicode_ci
(press esc and then :wq and enter)
5. mysql -p (enter the password if you have one. If you created the password use the one you just used in the mysql setup)
(press enter again if you haven't a password otherwise enter your password)
6. CREATE USER 'gerrit'@'localhost' IDENTIFIED BY 'l5uCkoYX+zYtH';
(This is the puppetized Gerrit application password, in labs it comes from the public so called "labs/private" repo, in prod it's obviously different and comes from an actually private repo.)
7. CREATE DATABASE reviewdb;
8. GRANT ALL ON reviewdb.* TO 'gerrit'@'localhost';
9. FLUSH PRIVILEGES; (not really needed but Gerrit docs claim it is :p)
10. type exit, done. continue setting up a seperate Gerrit instance as described in https://phabricator.wikimedia.org/P3637

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3949618
Default Alt Text
steps to create a Gerrit DB backend instance in labs (1 KB)

Event Timeline