Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
0
Merge Requests
0
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
Guillaume Hervier
slapos-caddy
Commits
3000a0a5
Commit
3000a0a5
authored
Oct 18, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5: escape database name and user when initializing MariaDB
parent
96ca850f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+1
-1
stack/erp5/mariadb_initial_setup.sql.in
stack/erp5/mariadb_initial_setup.sql.in
+3
-3
No files found.
stack/erp5/buildout.cfg
View file @
3000a0a5
...
@@ -183,7 +183,7 @@ md5sum = dd779e54d22105702aa72cadc994d957
...
@@ -183,7 +183,7 @@ md5sum = dd779e54d22105702aa72cadc994d957
[template-mariadb-initial-setup]
[template-mariadb-initial-setup]
<= download-base
<= download-base
filename = mariadb_initial_setup.sql.in
filename = mariadb_initial_setup.sql.in
md5sum =
b8d2d9af0c4cab45c8337aeac28d5fae
md5sum =
6465212fdc7fe9076a0c929d9f14da14
[template-create-erp5-site]
[template-create-erp5-site]
<= download-base
<= download-base
...
...
stack/erp5/mariadb_initial_setup.sql.in
View file @
3000a0a5
...
@@ -6,10 +6,10 @@ DROP FUNCTION IF EXISTS sphinx_snippets;
...
@@ -6,10 +6,10 @@ DROP FUNCTION IF EXISTS sphinx_snippets;
#CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'ha_sphinx.so';
#CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'ha_sphinx.so';
{% macro database(name, user, password) -%}
{% macro database(name, user, password) -%}
CREATE DATABASE IF NOT EXISTS
{{ name }}
;
CREATE DATABASE IF NOT EXISTS
`{{ name }}`
;
{% if user -%}
{% if user -%}
GRANT ALL PRIVILEGES ON
{{ name }}.* TO {{ user }}@'%'
IDENTIFIED BY '{{ password }}';
GRANT ALL PRIVILEGES ON
`{{ name }}`.* TO `{{ user }}`@`%`
IDENTIFIED BY '{{ password }}';
GRANT ALL PRIVILEGES ON
{{ name }}.* TO {{ user }}@'localhost'
IDENTIFIED BY '{{ password }}';
GRANT ALL PRIVILEGES ON
`{{ name }}`.* TO `{{ user }}`@localhost
IDENTIFIED BY '{{ password }}';
{%- endif %}
{%- endif %}
{% endmacro -%}
{% endmacro -%}
...
...
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