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

Bugzilla not using password from localconfig

3,051 views
Skip to first unread message

gangsterss

unread,
Sep 8, 2011, 9:01:43 AM9/8/11
to
I apologize in advance if this error message has already been posted
and answered. I tried to find it but couldn't.

We have a working Bugzilla on a server VD1 for more than 6 months now.
Never had any issues. But VD1 got restarted over the weekend and now
whenever I try to login to Bugzilla i am getting the following error:
----
Software error:
Can't connect to the database.
Error: Access denied for user 'bugs'@'localhost' (using password: YES)
Is your database installed and up and running?
Do you have the correct username and password selected in
localconfig?

For help, please send mail to the webmaster
-----

I am able to login to MySQL DB via command line using the password
specified in the localconfig (the $db_pass is NOT 'YES'). But how do i
make Bugzilla to use that password instead of YES?

Any help is appreciated.

Thanks,
Shashank.

Terry Carmen

unread,
Sep 8, 2011, 12:16:19 PM9/8/11
to support-...@lists.mozilla.org
Quoting gangsterss <crazy...@gmail.com>:

> I apologize in advance if this error message has already been posted
> and answered. I tried to find it but couldn't.
>
> We have a working Bugzilla on a server VD1 for more than 6 months now.
> Never had any issues. But VD1 got restarted over the weekend and now
> whenever I try to login to Bugzilla i am getting the following error:
> ----
> Software error:
> Can't connect to the database.
> Error: Access denied for user 'bugs'@'localhost' (using password: YES)
>  Is your database installed and up and running?
>  Do you have the correct username and password selected in
> localconfig?
>

What's in your /localconfig file?

It should look something like this:

$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugzilla';
$db_user = 'bz_user_name';
$db_pass = 'bz_password';
$db_port = 0;
$db_sock = '';
$db_check = 1;

If you have db_port=0  or db_port=3306, make sure your /etc/my.cnf file contains "port=3306". I beleive the default for a new MySQL install is disable listening on it's port.

db_port=0 means to listen on the default port of 3306.

Terry

Steve Wendt

unread,
Sep 8, 2011, 2:04:41 PM9/8/11
to
On 9/8/2011 6:01 AM, gangsterss wrote:

> Error: Access denied for user 'bugs'@'localhost' (using password: YES)
>
> I am able to login to MySQL DB via command line using the password
> specified in the localconfig (the $db_pass is NOT 'YES'). But how do i
> make Bugzilla to use that password instead of YES?

It's not literally using the password 'YES' - that means it is using a
password, as opposed to using a login that does not require one.

gangsterss

unread,
Sep 13, 2011, 7:42:40 AM9/13/11
to
On Sep 8, 12:16 pm, Terry Carmen <te...@cnysupport.com> wrote:
Terry,
My /localconfig looks like this:
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = '<MySQL Password>';
$db_port = 0;
$db_sock = '';
$db_check = 1;

But i do not have the folder or the file /etc/my.cnf. Do i need to add
it?
How do i check if the port 3306 is enabled?

thanks,

gangsterss

unread,
Sep 13, 2011, 7:43:13 AM9/13/11
to
Thanks Steve for the explanation.

Terry Carmen

unread,
Sep 13, 2011, 8:25:59 AM9/13/11
to support-...@lists.mozilla.org
Quoting gangsterss <crazy...@gmail.com>:

> On Sep 8, 12:16&nbsp;pm, Terry Carmen <te...@cnysupport.com> wrote:
>> Quoting gangsterss <crazydi...@gmail.com>:
>>
>> > I apologize in advance if this error message has already been
posted
>> > and answered. I tried to find it but couldn't.
>>
>> > We have a working Bugzilla on a server VD1 for more than 6
months now.
>> > Never had any issues. But VD1 got restarted over the weekend and
now
>> > whenever I try to login to Bugzilla i am getting the following
error:
>> > ----
>> > Software error:
>> > Can't connect to the database.
>> > Error: Access denied for user 'bugs'@'localhost' (using
password: YES)
>> >&nbsp; Is your database installed and up and running?
>> >&nbsp; Do you have the correct username and password selected in
>> > localconfig?
>>
>> What's in your /localconfig file?
>>
>> It should look something like this:
>>
>> $db_driver = 'mysql';
>> $db_host = 'localhost';
>> $db_name = 'bugzilla';
>> $db_user = 'bz_user_name';
>> $db_pass = 'bz_password';
>> $db_port = 0;
>> $db_sock = '';
>> $db_check = 1;
>>
>> If you have db_port=0&nbsp; or db_port=3306, make sure your
/etc/my.cnf
>> file contains "port=3306". I&nbsp;beleive the default for a new
>> MySQL install is disable listening on it's port.
>>
>> db_port=0 means to listen on the default port of 3306.
>>
>> Terry
>
> Terry,
> My /localconfig looks like this:
> $db_driver = 'mysql';
> $db_host = 'localhost';
> $db_name = 'bugs';
> $db_user = 'bugs';
> $db_pass = '<MySQL Password>';
> $db_port = 0;
> $db_sock = '';
> $db_check = 1;
>
> But i do not have the folder or the file /etc/my.cnf. Do i need to
add
> it?
> How do i check if the port 3306 is enabled?

Open a console session (local or ssh) on the machine that's running
MySQL

At the command prompt, type:

telnet localhost 3306

You should see something like:

------------------

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
4
5.0.77�g>#/d-P-0, GVX7HE_2w$J'

------------------

Then press ctrl-c, and type "exit" (no quotes).

If that doesn't work, then MySQL isn't listening on it's port for some
reason and you'll need to find out why.

If it *is* running, but BZ is on a different machine, you can go to
the machine running Bugzilla, and see if you can access MySQL from
there, by typing:

telnet mysql_IP_Address 3306

You should see the same response as above. If you don't, there's
something blocking the connection, such as a firewall rule on the
mysql machine.

Terry




Terry Carmen

unread,
Sep 13, 2011, 8:34:45 AM9/13/11
to support-...@lists.mozilla.org
> Error: Access denied for user 'bugs'@'localhost' (using password: YES)

Sorry,

I missed that part of your message.

This means that the user "bugs" does not have permission to access the database "bugs" when logging from the localhost machine, using the password supplied, or that there was no password supplied and one is required.

Try:

mysql -u bugs -p

>From the local console.

It will then prompt for a password, and you should type it in and be connected.

Then at the "mysql> " prompt type "show databases" and hit enter. You should see "bugs" in the list.

Then type "use bugs;" and hit enter, and it should say "database changed";

If it doesn't do this, there's something wrong with your access information or the way the database was setup (or not setup).

Terry

gangsterss

unread,
Sep 13, 2011, 8:33:56 AM9/13/11
to
Guys - thanks a lot. I reran the Checksetup.pl which set up all the
permissions and privileges again. Now i am able to access Bugzilla.

Thanks for all your help,
-Shashank.

vani...@gmail.com

unread,
Jul 21, 2014, 12:57:31 AM7/21/14
to
Hi ,
With your answers i have tried to solve the problem which Gangsterss mentioned earlier....but i couldn't....

I have installed perl,perl commands,apache ,mysql successfully...while configuring bugzilla,when i try to execute perl checksetup.pl command showing that
"There was an error connecting to database. Access denied for user 'bugs'@'localhost' (using password: YES) This might have several reasons etc etc..." in my /localconfig file?

$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = 'admin';
$db_port = 0; (initially this was 0,but i have changed to 8080(i have given this port number while installing mysql))
$db_sock = '';
$db_check = 1;
To check if the port 8080 is enabled?

I have Open a console session (local or ssh) on the machine that's running
MySQL

At the command prompt, type:

telnet localhost 3306

It was showing something like:

------------------

Trying 127.0.0.1...
Connecting to localhost.
J
5.0.77�g>#/d-P-0, GVX7HE_2w$J'mysql_native _password
Connection to host lost
(note: same problem with port 3306 also)

Whats the problem in my database..how can i solve this..waiting for your valuable answers.....

Thanks..
vani.K

Thorsten Schöning

unread,
Jul 21, 2014, 1:58:50 AM7/21/14
to support-...@lists.mozilla.org
Guten Tag vani...@gmail.com,
am Montag, 21. Juli 2014 um 06:57 schrieben Sie:

> "There was an error connecting to database. Access denied for user
> 'bugs'@'localhost' (using password: YES) This might have several
> reasons etc etc..." in my /localconfig file?

The error message is pretty clear, you either didn't create the
configured user or didn't gave it the needed permissions.

http://dev.mysql.com/doc/refman/5.1/en/create-user.html
http://dev.mysql.com/doc/refman/5.1/en/account-names.html

> $db_port = 0; (initially this was 0,but i have changed to 8080(i
> have given this port number while installing mysql))

8080 is very uncommon for MySQL, instead it's common for Apache
Tomcat, and there shouldn't be the need to change the MySQL port
during installation at all. Especially I wouldn't not suggest to
change it additionally to 8080 besides 3306, which seems to be used as
well, else you wouldn't be able to connect to 3306 using telnet like
in your example below.

So, change it back to 3306 and use only that port, especially if you
have problems getting everything working.

> telnet localhost 3306
[...]
> Trying 127.0.0.1...
> Connecting to localhost.
> J
5.0.77�g>>#/d-P-0, GVX7HE_2w$J'mysql_native _password
> Connection to host lost
> (note: same problem with port 3306 also)

That doesn't tell anything, you can't expect connecting to a MySQL
server using telnet, sending some raw data and get a useful answer.
You need to at least talk the correct protocol, that's why MySQL comes
with a special client to connect to the server. Simply ignore this,
MySQL is already telling what your problem is: You need to create a
user with proper permissions in the correct syntax.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning E-Mail:Thorsten....@AM-SoFT.de
AM-SoFT IT-Systeme http://www.AM-SoFT.de/

Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

vani...@gmail.com

unread,
Jul 21, 2014, 4:19:38 AM7/21/14
to

@ Thorsten Schöning, I have created database,and created user also grant privileges to the user"bugs" already, but still that Perl checksetup.pl command showing the same error.
"There was an error connecting to database. Access denied for user
> 'bugs'@'localhost' (using password: YES) This might have several
> reasons etc etc..."


I have used following commands:
mysql>Create database bugs;
mysql>create user 'bugs '@' localhost';
mysql>GRANT ALL PRIVILEGES ON bugs.* TO 'bugs'@'localhost' IDENTIFIED BY
'bugs_password';
Thanks for your reply...

vani...@gmail.com

unread,
Jul 21, 2014, 4:21:24 AM7/21/14
to
I have changed the port number from 8080 to 3306.

Thorsten Schöning

unread,
Jul 21, 2014, 4:47:49 AM7/21/14
to support-...@lists.mozilla.org
Guten Tag vani...@gmail.com,
am Montag, 21. Juli 2014 um 10:19 schrieben Sie:

mysql>>create user 'bugs '@' localhost';
mysql>>GRANT ALL PRIVILEGES ON bugs.* TO 'bugs'@'localhost' IDENTIFIED BY 'bugs_password';

The first line contains surely unwanted spaces in user name and host
and misses a password, the second may create an additional user
automatically with a maybe wrong password, depending on what you
specified. You may have a look in the user and user_privileges table
to se what has been created.

vani...@gmail.com

unread,
Jul 21, 2014, 6:29:54 AM7/21/14
to

@Thorsten Schöning Thanks alot it works for me....now i can able to run the checksetup.pl command with no issues.Thanks for your valuable replies...



Regards
Vani.K

vani...@gmail.com

unread,
Jul 25, 2014, 2:25:32 AM7/25/14
to
Hi,Thorsten Schöning

Again got a problem at the end....
when i type localhost in my browser showing "Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@----.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log." and when i type localhost/bugzilla showing "Forbidden

You don't have permission to access /bugzilla on this server."

How can i get out from this error ... (still my apache is working fine)

Thorsten Schöning

unread,
Jul 25, 2014, 2:45:53 AM7/25/14
to support-...@lists.mozilla.org
Guten Tag vani...@gmail.com,
am Freitag, 25. Juli 2014 um 08:25 schrieben Sie:

> Again got a problem at the end....

Please always start new threads for unrelated problems and regarding
the subject, this is unrelated. :-)

> Internal Server Error
[...]
> Forbidden

Your web server is not configured properly.

http://www.bugzilla.org/docs/4.4/en/html/configuration.html#http

shwet...@gmail.com

unread,
Sep 4, 2014, 8:21:20 AM9/4/14
to
Hi I installed it correctly.
But when I hit the URL. the web page doesn't show anything....
Please help ....

Thorsten Schöning

unread,
Sep 4, 2014, 8:32:48 AM9/4/14
to support-...@lists.mozilla.org
Guten Tag shwet...@gmail.com,
am Donnerstag, 4. September 2014 um 14:21 schrieben Sie:

> Hi

Please don't just answer to old threads with unrelated problems.
Instead start you own by exactly describing your problem, what you
have done before etc.

> I installed it correctly.
> But when I hit the URL. the web page doesn't show anything....

Then you obviously didn't install correctly.

http://www.bugzilla.org/docs/4.4/en/html/installing-bugzilla.html
0 new messages