Page MenuHomePhabricator
Paste P3939

steps to create a Gerrit DB backend instance in labs
ActivePublic

Authored by Paladox on Aug 29 2016, 5:40 PM.
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
under [mysqld]
look for
bind-address
you will need to change the ip in bind-address to the one of gerrit host
(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'@'10.68.23.148' IDENTIFIED BY 'l5uCkoYX+zYtH';
(Note where it says 10.68.23.148 please use your gerrit instance ip there instead)
(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'@'10.68.23.148';
(Note where it says 10.68.23.148 please use your gerrit instance ip there instead)
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

Event Timeline

Paladox created this paste.Aug 29 2016, 5:40 PM
Dzahn edited the content of this paste. (Show Details)Aug 31 2016, 5:28 PM
Paladox edited the content of this paste. (Show Details)Aug 31 2016, 5:29 PM
Dzahn edited the content of this paste. (Show Details)Aug 31 2016, 5:34 PM
Paladox edited the content of this paste. (Show Details)Aug 31 2016, 5:34 PM
Paladox edited the content of this paste. (Show Details)
Paladox edited the content of this paste. (Show Details)Aug 31 2016, 5:49 PM
Dzahn edited the content of this paste. (Show Details)Aug 31 2016, 6:03 PM
Dzahn changed the title of this paste from mysql gerrit checklist to steps to create a Gerrit DB backend instance in labs.
Dzahn edited the content of this paste. (Show Details)Aug 31 2016, 6:07 PM
Paladox edited the content of this paste. (Show Details)Aug 31 2016, 9:41 PM
Paladox edited the content of this paste. (Show Details)
Paladox edited the content of this paste. (Show Details)Aug 31 2016, 9:44 PM
Paladox edited the content of this paste. (Show Details)Aug 31 2016, 9:54 PM
Paladox edited the content of this paste. (Show Details)Aug 31 2016, 9:57 PM
Paladox edited the content of this paste. (Show Details)Aug 31 2016, 10:35 PM
Paladox edited the content of this paste. (Show Details)Sep 1 2016, 9:43 PM