How to connect to bugzilla mysql database from any other tool

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to connect to bugzilla mysql database from any other tool

mehrotrashobhit
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
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: How to connect to bugzilla mysql database from any other tool

Thorsten Schöning
Guten Tag [hidden email],
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:[hidden email]
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

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: How to connect to bugzilla mysql database from any other tool

mehrotrashobhit
In reply to this post by mehrotrashobhit
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.        

On Wednesday, March 13, 2013 1:27:14 PM UTC+5:30, [hidden email] wrote:

> 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

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: How to connect to bugzilla mysql database from any other tool

mehrotrashobhit
In reply to this post by mehrotrashobhit
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.


>
> 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:[hidden email]
>
> 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
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: How to connect to bugzilla mysql database from any other tool

Thorsten Schöning
In reply to this post by mehrotrashobhit
Guten Tag [hidden email],
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

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail:[hidden email]
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

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: How to connect to bugzilla mysql database from any other tool

cthoong
This post was updated on .
In reply to this post by mehrotrashobhit
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.
mysql> select * from mysql.user;

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