diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-05 12:57:54 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-05 12:57:54 +0000 |
commit | 9f039661bc61de67e47f189a041c1e28f7266820 (patch) | |
tree | 4d0d556c4c127268590ef454cf052031d3aac06a | |
parent | 24f3eb9c135655bc1c5a244f0a50ccfcdcfd2cef (diff) | |
parent | a5a59f2fdb3d9985c384e790078223c95d3291fd (diff) | |
download | gitlab-ce-9f039661bc61de67e47f189a041c1e28f7266820.tar.gz |
Merge branch 'cherry-pick-4e287630' into '8-9-stable'
Merge branch 'doc-mysql-priv' into 'master'
## What does this MR do?
Update missing mysql user permissions.
## Why was this MR needed?
This should also be in the `8-9-stable` branch.
See merge request !5086
-rw-r--r-- | doc/install/database_mysql.md | 2 | ||||
-rw-r--r-- | doc/update/8.8-to-8.9.md | 24 |
2 files changed, 21 insertions, 5 deletions
diff --git a/doc/install/database_mysql.md b/doc/install/database_mysql.md index e51ff5a5de2..e8093f0b257 100644 --- a/doc/install/database_mysql.md +++ b/doc/install/database_mysql.md @@ -36,7 +36,7 @@ We do not recommend using MySQL due to various issues. For example, case [(in)se mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`; # Grant the GitLab user necessary permissions on the database - mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, CREATE TEMPORARY TABLES, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost'; + mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, CREATE TEMPORARY TABLES, DROP, INDEX, ALTER, LOCK TABLES, REFERENCES ON `gitlabhq_production`.* TO 'git'@'localhost'; # Quit the database session mysql> \q diff --git a/doc/update/8.8-to-8.9.md b/doc/update/8.8-to-8.9.md index f14046bb4be..987470e66e4 100644 --- a/doc/update/8.8-to-8.9.md +++ b/doc/update/8.8-to-8.9.md @@ -62,7 +62,23 @@ sudo -u git -H git checkout v0.7.5 sudo -u git -H make ``` -### 6. Install libs, migrations, etc. +### 6. Update MySQL permissions + +If you are using MySQL you need to grant the GitLab user the necessary +permissions on the database: + +```bash +# Login to MySQL +mysql -u root -p + +# Grant the GitLab user the REFERENCES permission on the database +GRANT REFERENCES ON `gitlabhq_production`.* TO 'git'@'localhost'; + +# Quit the database session +mysql> \q +``` + +### 7. Install libs, migrations, etc. ```bash cd /home/git/gitlab @@ -84,7 +100,7 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS ``` -### 7. Update configuration files +### 8. Update configuration files #### New configuration options for `gitlab.yml` @@ -128,12 +144,12 @@ Ensure you're still up-to-date with the latest init script changes: sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab -### 8. Start application +### 9. Start application sudo service gitlab start sudo service nginx restart -### 9. Check application status +### 10. Check application status Check if GitLab and its environment are configured correctly: |