Skip to content
Snippets Groups Projects
Unverified Commit 23a91cd7 authored by Balasankar C's avatar Balasankar C
Browse files

Remove bundled MySQL client and related docs

parent 97246c75
No related branches found
No related tags found
No related merge requests found
---
title: Remove bundled MySQL client and related docs
merge_request: 3382
author:
type: deprecated
Loading
Loading
@@ -53,7 +53,6 @@ dependency 'graphicsmagick'
dependency 'exiftool'
 
if EE
dependency 'mysql-client'
dependency 'pgbouncer'
dependency 'repmgr'
dependency 'repmgr_pg_10'
Loading
Loading
#
# Copyright:: Copyright (c) 2013 Robby Dyer
# Copyright:: Copyright (c) 2014 GitLab.com
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name 'mysql-client'
default_version '5.5.56'
license 'GPL-2.0'
license_file 'COPYING'
skip_transitive_dependency_licensing true
# Runtime dependecies
dependency 'openssl'
dependency 'zlib'
dependency 'ncurses'
source url: "http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-#{version}.tar.gz",
md5: '76a393f1aee0d57bf71e1a7414200233'
relative_path "mysql-#{version}"
env = with_standard_compiler_flags(with_embedded_path)
env['CXXFLAGS'] = "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include"
env['CPPFLAGS'] = "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include"
# Force CentOS-5 to use gcc/g++ v4.4
if ohai['platform'] =~ /centos/ && ohai['platform_version'] =~ /^5/
env['CC'] = 'gcc44'
env['CXX'] = 'g++44'
end
if ohai['platform'] =~ /ubuntu/ && ohai['platform_version'] =~ /^18\.04/
env['CC'] = '/usr/bin/gcc-6'
env['CXX'] = '/usr/bin/g++-6'
end
build do
command [
'cmake',
'-DCMAKE_SKIP_RPATH=YES',
"-DCMAKE_INSTALL_PREFIX=#{install_dir}/embedded",
'-DWITH_SSL=system',
'-DWITH_READLINE=1',
"-DOPENSSL_INCLUDE_DIR:PATH=#{install_dir}/embedded/include",
"-DOPENSSL_LIBRARIES:FILEPATH=#{install_dir}/embedded/lib/libssl.so",
'-DWITH_ZLIB=system',
"-DZLIB_INCLUDE_DIR:PATH=#{install_dir}/embedded/include",
"-DZLIB_LIBRARY:FILEPATH=#{install_dir}/embedded/lib/libz.so",
"-DCRYPTO_LIBRARY:FILEPATH=#{install_dir}/embedded/lib/libcrypto.so",
'.'
].join(' '), env: env
%w(libmysql client include).each do |target|
command "make -j #{workers} install", env: env, cwd: "#{project_dir}/#{target}"
end
end
Loading
Loading
@@ -4,20 +4,12 @@
Omnibus GitLab has a bundled PostgreSQL server and PostgreSQL is the preferred
database for GitLab.
 
GitLab supports the following database management systems:
GitLab supports only PostgreSQL database management system.
 
- PostgreSQL
- MySQL/MariaDB
Thus you have three options for database servers to use with Omnibus GitLab:
Thus you have two options for database servers to use with Omnibus GitLab:
 
- Use the packaged PostgreSQL server included with GitLab Omnibus (no configuration required, recommended)
- Use an [external PostgreSQL server](#using-a-non-packaged-postgresql-database-management-server)
- Use an [external MySQL server with Enterprise Edition package](#using-a-mysql-database-management-server-enterprise-edition-only) (not supported in 12.1+)
If you are planning to use MySQL/MariaDB, make sure to read the [introductory
paragraph](#using-a-mysql-database-management-server-enterprise-edition-only)
before proceeding, as it contains some useful information.
 
## Configuring SSL
 
Loading
Loading
@@ -354,59 +346,6 @@ To change the location of the PostgreSQL data
1. Run `gitlab-ctl reconfigure`.
1. Start GitLab `gitlab-ctl start`.
 
## Using a MySQL database management server (Enterprise Edition only)
>**Note:**
GitLab 12.0 is the last version with support for MySQL (and MariaDB). Users will
need to [migrate][mysql-migrate] to PostgreSQL in order to utilize future versions.
The MySQL server itself is _not_ shipped with Omnibus ([PostgresSQL is](#database-settings)), you will have to install
it on your own or use an existing one. Omnibus ships only the MySQL client.
Make sure that GitLab's MySQL database collation is UTF-8, otherwise you could
hit [collation issues][ee-245]. See
[Set MySQL collation to UTF-8](#set-mysql-collation-to-utf-8) to fix any
relevant errors.
---
The following guide assumes that you want to use MySQL or MariaDB and are using
the **GitLab Enterprise Edition packages**.
>**Important note:**
If you are connecting Omnibus GitLab to an existing GitLab database you should
[create a backup][rake-backup] before attempting this procedure.
1. First, set up your database server according to the [upstream GitLab
instructions][mysql-install]. If you want to keep using an existing GitLab
database you can skip this step.
1. Next, add the following settings to `/etc/gitlab/gitlab.rb`:
```ruby
# Disable the built-in Postgres
postgresql['enable'] = false
# Fill in the values for database.yml
gitlab_rails['db_adapter'] = 'mysql2'
gitlab_rails['db_encoding'] = 'utf8'
gitlab_rails['db_host'] = '127.0.0.1'
gitlab_rails['db_port'] = 3306
gitlab_rails['db_username'] = 'USERNAME'
gitlab_rails['db_password'] = 'PASSWORD'
```
`db_adapter` and `db_encoding` should be like the example above. Change
all other settings according to your MySQL setup.
>**Note:**
`/etc/gitlab/gitlab.rb` should have file permissions `0600` because it contains
plain-text passwords.
1. [Reconfigure GitLab][] for the changes to take effect.
1. (Optionally) [Seed the database](#seed-the-database-fresh-installs-only).
## Seed the database (fresh installs only)
 
**This is a destructive command; do not run it on an existing database!**
Loading
Loading
Loading
Loading
@@ -19,7 +19,6 @@ module License
'libtool', # GPL Mere Aggregate Exception - https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation
'logrotate', # GPL Mere Aggregate Exception - https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation
'rsync', # GPL Mere Aggregate Exception - https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation
'mysql-client', # GPL Mere Aggregate Exception - https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation
'repmgr', # GPL Mere Aggregate Exception - https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation
'repmgr_pg_10', # GPL Mere Aggregate Exception - https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation
'blob', # MIT Licensed - https://github.com/webmodules/blob/blob/master/LICENSE
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment