diff --git a/doc/update/5.0-to-5.1.md b/doc/update/5.0-to-5.1.md
index 708d33ecb6fee77365c79d87408df46015166799..b827d8689263f737a92e9fba1b2f474ea396452b 100644
--- a/doc/update/5.0-to-5.1.md
+++ b/doc/update/5.0-to-5.1.md
@@ -29,8 +29,17 @@ sudo -u git -H git checkout v1.3.0
 cd /home/git/gitlab
 sudo rm tmp/sockets/gitlab.socket
 sudo -u git -H cp config/puma.rb.example config/puma.rb
-
+```
+If you are using MySQL:
+```
 sudo -u git -H bundle install --without development test postgres --deployment
+```
+If you are using PostgreSQL:
+```
+sudo -u git -H bundle install --without development test mysql --deployment
+```
+
+```
 sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
 sudo -u git -H bundle exec rake migrate_merge_requests RAILS_ENV=production
 ```
@@ -44,9 +53,9 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-rec
 sudo chmod +x /etc/init.d/gitlab
 ```
 
-### 6. Mysql grant privileges
+### 6. MySQL grant privileges
 
-Only if you are using mysql:
+Only if you are using MySQL:
 
 ```bash
 mysql -u root -p