Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
5880669d
Commit
5880669d
authored
Jul 08, 2016
by
Dylan William Hardison
Committed by
GitHub
Jul 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 542507 - [PostgreSQL] The db_user sometimes cannot connect to the "template1" database
parent
c0cf9b11
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
DB.pm
Bugzilla/DB.pm
+0
-1
Pg.pm
Bugzilla/DB/Pg.pm
+0
-5
postgresql.rst
docs/en/rst/installing/postgresql.rst
+10
-4
strings.txt.pl
template/en/default/setup/strings.txt.pl
+1
-0
No files found.
Bugzilla/DB.pm
View file @
5880669d
...
...
@@ -247,7 +247,6 @@ sub _get_no_db_connection {
my
(
$sql_server
)
=
@_
;
my
$dbh
;
my
%
connect_params
=
%
{
Bugzilla
->
localconfig
};
$connect_params
{
db_name
}
=
''
;
my
$conn_success
=
eval
{
$dbh
=
_connect
(
\%
connect_params
);
};
...
...
Bugzilla/DB/Pg.pm
View file @
5880669d
...
...
@@ -39,11 +39,6 @@ sub new {
my
(
$user
,
$pass
,
$host
,
$dbname
,
$port
)
=
@$params
{
qw(db_user db_pass db_host db_name db_port)
};
# The default database name for PostgreSQL. We have
# to connect to SOME database, even if we have
# no $dbname parameter.
$dbname
||=
'template1'
;
# construct the DSN from the parameters we got
my
$dsn
=
"dbi:Pg:dbname=$dbname"
;
$dsn
.=
";host=$host"
if
$host
;
...
...
docs/en/rst/installing/postgresql.rst
View file @
5880669d
...
...
@@ -14,8 +14,8 @@ server is started when the machine boots.
.. _posgresql-add-user:
Add a User
==========
Add a User
and Create a DB
==========
================
You need to add a new user to PostgreSQL for the Bugzilla
application to use when accessing the database. The following instructions
...
...
@@ -29,12 +29,18 @@ then switch to being the postgres (Unix) user:
As the postgres user, you then need to create a new user:
:command:`createuser -U postgres -
d
RSP bugs`
:command:`createuser -U postgres -
D
RSP bugs`
When asked for a password, provide one and write it down for later reference.
The created user will not be a superuser (-S) and will not be able to create
new users (-R). He will only have the ability to create databases (-d).
new users (-R) or create databases (-D).
Next we will create a database for bugzilla to use
:command:`createdb -U postgress -O bugs bugs`
This will create a database named `bugs` that is owned (-O) by the `bugs` user.
.. _postgresql-access:
...
...
template/en/default/setup/strings.txt.pl
View file @
5880669d
...
...
@@ -141,6 +141,7 @@ END
localconfig_db_name
=>
<<
'END'
,
The
name
of
the
database
.
For
Oracle
,
this
is
the
database
's SID. For
SQLite, this is a name (or path) for the DB file.
For postgres, this database must already exist and be writable by $db_user.
END
localconfig_db_pass => <<'
END
',
Enter your database password here. It'
s
normally
advisable
to
specify
...
...
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