Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Connecting Bugzilla to MySQL Database - Can't connect to the database

551 views
Skip to first unread message

A. M. P.

unread,
Sep 25, 2017, 2:59:26 PM9/25/17
to
I have recently installed Bugzilla v5.0.3 on RedHat 7.1. I have been following this set of instructions, which, while 7 years old, has largely proven very useful. http://www.thegeekstuff.com/2010/05/install-bugzilla-on-linux/

However I keep running into errors at step #13, creating the bugzilla database. I get this message:

Can't connect to the database.
Error: Unknown database 'bugs'
Is your database installed and up and running?
Do you have the correct username and password selected in localconfig?

I am fairly certain that the database is up and running. Based on these results:

[root@LoadGen bugzilla-5.0.3]# systemctl status | grep sql
│ └─14127 grep --color=auto sql
├─mysqld.service
│ └─8446 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

and I am fairly certain I have entered the correct user name and password. I have them defined in my ./localconfig file as such:

# 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.
$db_name = 'bugs';

# Who we connect to the database as.
$db_user = 'bugs';

# Enter your database password here. It's normally advisable to specify
# a password for your bugzilla database user.
# If you use apostrophe (') or a backslash (\) in your password, you'll
# need to escape it by preceding it with a '\' character. (\') or (\)
# (It is far simpler to just not use those characters.)
$db_pass = 'hunter2';


Perhaps I need to specify somewhere else which password and user name I want to use when trying to connect to the database? Is there a good way to double check that I have them correct? Should I reset the username + password to make sure it is the same as what I put in ./localconfig?

Emmanuel Seyman

unread,
Sep 25, 2017, 3:57:12 PM9/25/17
to support-...@lists.mozilla.org
* A. M. P. [25/09/2017 11:59] :
>
> and I am fairly certain I have entered the correct user name and password.
> I have them defined in my ./localconfig file as such:

Once you've edited localconfig, you need to run checksetup.pl which will
populate the bugs database with its schema and initial data.

Have you done this? What was the result?

Emmanuel

A. M. P.

unread,
Sep 25, 2017, 4:10:31 PM9/25/17
to
Yes, I have. That is the command which is giving this error (sorry, I should have specified that).

The full output is this:



[root@LoadGen bugzilla-5.0.3]# ./checksetup.pl
* This is Bugzilla 5.0.3 on perl 5.16.3
* Running on Linux 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015

Checking perl modules...
Checking for CGI.pm (v3.51) ok: found v3.63
Checking for Digest-SHA (any) ok: found v5.85
Checking for TimeDate (v2.23) ok: found v2.24
Checking for DateTime (v0.75) ok: found v1.04
Checking for DateTime-TimeZone (v1.64) ok: found v2.13
Checking for DBI (v1.614) ok: found v1.627
Checking for Template-Toolkit (v2.24) ok: found v2.24
Checking for Email-Sender (v1.300011) ok: found v1.300031
Checking for Email-MIME (v1.904) ok: found v1.946
Checking for URI (v1.55) ok: found v1.60
Checking for List-MoreUtils (v0.32) ok: found v0.33
Checking for Math-Random-ISAAC (v1.0.1) ok: found v1.004
Checking for File-Slurp (v9999.13) ok: found v9999.19
Checking for JSON-XS (v2.01) ok: found v3.04

Checking available perl DBD modules...
Checking for DBD-Pg (v2.7.0) not found
Checking for DBD-mysql (v4.001) ok: found v4.043
Checking for DBD-SQLite (v1.29) ok: found v1.54
Checking for DBD-Oracle (v1.19) not found

The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.49
Checking for Chart (v2.4.1) ok: found v2.4.10
Checking for Template-GD (any) ok: found v1.56
Checking for GDTextUtil (any) ok: found v0.86
Checking for GDGraph (any) ok: found v1.54
Checking for MIME-tools (v5.406) ok: found v5.509
Checking for libwww-perl (any) ok: found v6.05
Checking for XML-Twig (any) ok: found v3.44
Checking for PatchReader (v0.9.6) ok: found v0.9.6
Checking for perl-ldap (any) ok: found v0.56
Checking for Authen-SASL (any) ok: found v2.15
Checking for Net-SMTP-SSL (v1.01) ok: found v1.01
Checking for RadiusPerl (any) ok: found v0.26
Checking for SOAP-Lite (v0.712) ok: found v1.22
Checking for XMLRPC-Lite (v0.712) ok: found v0.717
Checking for JSON-RPC (any) ok: found v1.06
Checking for Test-Taint (v1.06) ok: found v1.06
Checking for HTML-Parser (v3.67) ok: found v3.71
Checking for HTML-Scrubber (any) ok: found v0.17
Checking for Encode (v2.21) ok: found v2.92
Checking for Encode-Detect (any) ok: found v1.01
Checking for Email-Reply (any) ok: found v1.204
Checking for HTML-FormatText-WithLinks (v0.13) ok: found v0.14
Checking for TheSchwartz (v1.07) ok: found v1.12
Checking for Daemon-Generic (any) ok: found v0.85
Checking for mod_perl (v1.999022) ok: found v2.000010
Checking for Apache-SizeLimit (v0.96) not found
Checking for File-MimeInfo (any) ok: found v0.28
Checking for IO-stringy (any) ok: found v2.110
Checking for Cache-Memcached (any) ok: found v1.30
Checking for File-Copy-Recursive (any) ok: found v0.38
Checking for File-Which (any) ok: found v1.09
Checking for mod_env (any) ok
Checking for mod_expires (any) ok
Checking for mod_headers (any) ok
Checking for mod_rewrite (any) ok
Checking for mod_version (any) ok
***********************************************************************
* OPTIONAL MODULES *
***********************************************************************
* Certain Perl modules are not required by Bugzilla, but by *
* installing the latest version you gain access to additional *
* features. *
* *
* The optional modules you do not have installed are listed below, *
* with the name of the feature they enable. Below that table are the *
* commands to install each module. *
***********************************************************************
* MODULE NAME * ENABLES FEATURE(S) *
***********************************************************************
* Apache-SizeLimit * mod_perl *
***********************************************************************
COMMANDS TO INSTALL OPTIONAL MODULES:

Apache-SizeLimit: /usr/bin/perl install-module.pl Apache2::SizeLimit


To attempt an automatic install of every required and optional module
with one command, do:

/usr/bin/perl install-module.pl --all

Reading ./localconfig...
Checking for DBD-mysql (v4.001) ok: found v4.043
Message has been deleted

Andre Klapper

unread,
Sep 25, 2017, 5:46:33 PM9/25/17
to support-...@lists.mozilla.org
On Mon, 2017-09-25 at 13:14 -0700, A. M. P. wrote:
> Can't connect to the database.
> Error: Unknown database 'bugs'

Didn't check that random 3rd party web page you linked, but have you
checked in MariaDB/MySQL itself if that database actually does exist?

See http://bugzilla.readthedocs.io/en/5.0/installing/index.html for
supported official steps.

andre
--
Andre Klapper | ak...@gmx.net
http://blogs.gnome.org/aklapper/

A. M. P.

unread,
Sep 25, 2017, 6:55:41 PM9/25/17
to
Yup. That was it. I figured the database would be created automatically by one of the earlier setup commands, but it was not.

I just entered the SQL command "CREATE DATABASE IF NOT EXISTS Bugs;" while logged into MySQL as root, and then ran ./checksetup.pl again and it looks like it works!
0 new messages