Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a7a2100f
Commit
a7a2100f
authored
Feb 20, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc syntax highlighting.
parent
acdb808a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
doc/install/database_mysql.md
doc/install/database_mysql.md
+26
-26
No files found.
doc/install/database_mysql.md
View file @
a7a2100f
...
...
@@ -4,42 +4,42 @@ We do not recommend using MySQL due to various issues. For example, case [(in)se
## MySQL
# Install the database packages
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
# Install the database packages
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
# Pick a database root password (can be anything), type it and press enter
# Retype the database root password and press enter
# Pick a database root password (can be anything), type it and press enter
# Retype the database root password and press enter
# Secure your installation.
sudo mysql_secure_installation
# Secure your installation.
sudo mysql_secure_installation
# Login to MySQL
mysql -u root -p
# Login to MySQL
mysql -u root -p
# Type the database root password
# Type the database root password
# Create a user for GitLab
# do not type the 'mysql>', this is part of the prompt
# change $password in the command below to a real password you pick
mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password';
# Create a user for GitLab
# do not type the 'mysql>', this is part of the prompt
# change $password in the command below to a real password you pick
mysql> CREATE USER 'git'@'localhost' IDENTIFIED BY '$password';
# Create the GitLab production database
mysql> CREATE DATABASE IF NOT EXISTS
`gitlabhq_production`
DEFAULT CHARACTER SET
`utf8`
COLLATE
`utf8_unicode_ci`
;
# Create the GitLab production database
mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
# Grant the GitLab user necessary permissions on the table.
mysql> GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON
`gitlabhq_production`
.
*
TO 'git'@'localhost';
# Grant the GitLab user necessary permissions on the table.
mysql> GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'git'@'localhost';
# Quit the database session
mysql>
\q
# Quit the database session
mysql> \q
# Try connecting to the new database with the new user
sudo -u git -H mysql -u git -p -D gitlabhq_production
# Try connecting to the new database with the new user
sudo -u git -H mysql -u git -p -D gitlabhq_production
# Type the password you replaced $password with earlier
# Type the password you replaced $password with earlier
# You should now see a 'mysql>' prompt
# You should now see a 'mysql>' prompt
# Quit the database session
mysql>
\q
# Quit the database session
mysql> \q
# You are done installing the database and can go back to the rest of the installation.
# You are done installing the database and can go back to the rest of the installation.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment