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

How to connect to bugzilla mysql database from any other tool

1,319 views
Skip to first unread message

mehrotr...@gmail.com

unread,
Mar 13, 2013, 3:57:14 AM3/13/13
to
Hello,
I am BugZilla admin and is trying to configure and schedule automatic BugZilla MySQL database backup.

For this I have a software which could connect to any MySQL database instance running on any Windows machine using mysql database username and password and then can take period backups of mySQL database.

When I am using this software and trying to connect to the BugZilla MySQL database instance it could not connect although I am supplying the correct BugZilla MySQL database credentials. It says "Failed to connect to MySQL server..."

Please help. Thanks in advance.

Thanks

Thorsten Schöning

unread,
Mar 13, 2013, 4:11:53 AM3/13/13
to support-...@lists.mozilla.org
Guten Tag mehrotr...@gmail.com,
am Mittwoch, 13. März 2013 um 08:57 schrieben Sie:

> When I am using this software and trying to connect to the BugZilla
> MySQL database instance it could not connect although I am supplying
> the correct BugZilla MySQL database credentials. It says "Failed to connect to MySQL server..."

From the error message it sounds like your MySQL server is simply not
accessible because it just listens on localhost or stuff like that,
have a look at the Bugzilla configuration in localconfig file in the
Bugzilla root directory. Whatever is configured there should work for
any tool, if there's only localhost mentioned for db_host it's likely
MySQL just listens on localhost and needs to be reconfigured to work
with your tool.

Bugzilla does nothing special here, every problem is between your tool
and MySQL only, Bugzilla isn't involved.

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

mehrotr...@gmail.com

unread,
Mar 13, 2013, 5:15:26 AM3/13/13
to
Hello Thorsten Schöning,
Thanks for your quick response. Yes, I checked, in the localconfig "db_host" = localhost is set. What should I set here instead so that my Bugzilla also continues to run normally and I also able to connect to BugZilla MySQL instance using the tool.

Thanks in advance.
Message has been deleted

Thorsten Schöning

unread,
Mar 13, 2013, 5:49:00 AM3/13/13
to support-...@lists.mozilla.org
Guten Tag mehrotr...@gmail.com,
am Mittwoch, 13. März 2013 um 10:15 schrieben Sie:

> Yes, I checked, in the localconfig
> "db_host" = localhost is set. What should I set here instead so that
> my Bugzilla also continues to run normally and I also able to
> connect to BugZilla MySQL instance using the tool.

db_host is not your problem, it's MySQL, check on which addresses it
is listening, at least localhost as Bugzilla works, and change it to
whatever fits your needs and works with your tool in your environment.
That's nothing I can know, it's something you need to decide for your
MySQL installation. Look in your MySQL configuration, there's a
bind-address statement somewhere and that needs to be changed.

There are a lot of hits for "mysql bind-address" in the search engine
of your choice.

http://serverfault.com/questions/139323/mysql-bind-to-more-than-one-ip-address

cthoong

unread,
May 17, 2013, 12:25:25 AM5/17/13
to support-...@lists.mozilla.org
Assume your bugzilla is running on linux system. 2 things could be blocking
the access.

1. iptables


a. check your bugzilla server security settings to ensure it allowed remote
access through mysql port 3306.
service iptables status

-------------------
Chain INPUT (policy ACCEPT)
....
5 ACCEPT tcp -- 192.168.0.12 0.0.0.0/0 tcp dpt:3306
-------------------

If not such rule, you need to add it and restart the iptables.

b. You can stop the iptables service to see if iptables blocking remote
access or not. Remember to start it back or this will risks bugzilla.

2. In mysql, grant the remote access to bugzilla DB "bugs" through the
bugzilla account in mysql.


a. Login to mysql as root, then grant the remote access right.

mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK
TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON <DB>.* TO <ID>@'<IP
Address>' IDENTIFIED BY '<password>';

<DB> name of bugzilla DB
<ID> ID to be use/grant for remote login to mysql
<IP Address> Your backup PC's IP Address 192.168.0.12, can put a wildcard %
to allow a subnet 192.168.0.%
<Password> password to be use/grant for remote login to mysql

E.g.
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK
TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* TO
bugs_id@'192.168.0.%' IDENTIFIED BY 'bug_pw';

b. Apply the settings
mysql> FLUSH PRIVILEGES;

c. check to ensure the grant success.
select * from mysql.user;

-----------------------------------------------------
You should able to remote access to mysql now.



--
View this message in context: http://mozilla.6506.n7.nabble.com/How-to-connect-to-bugzilla-mysql-database-from-any-other-tool-tp274721p280038.html
Sent from the Bugzilla - Users mailing list archive at Nabble.com.

cthoong

unread,
May 17, 2013, 12:20:44 AM5/17/13
to support-...@lists.mozilla.org
0 new messages