• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 591
  • Last Modified:

Mysql database configuration for Bugzilla

Hi,
I am getting the error while running checksetup.pl for a bugzilla installation.



Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
DBI connect(';localhost;3306','mysql',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at ./checksetup.pl line 1434
Can't connect to the mysql database. Is the database installed and
up and running?  Do you have the correct username and password selected in
localconfig?


The script uses a file localconfig to login the mysql database and perform some tests.

The username/password given in the config file are mysql/mysql.

But if I use mysql -u mysql -p
password:mysql
I can login the database.

How can I rectify the error.

--Walter
0
wfaleiro
Asked:
wfaleiro
  • 15
  • 11
1 Solution
 
db2inst1Commented:
/tmp/mysql.sock might be the problem for you. You will have to change the mysql.sock to point to correct one.

Do a ps -ef | grep -i mysql

That should give you the correct mysql.sock, enter that path in the config.

Also, is that a semicolon localhost;3306 ?
0
 
wfaleiroAuthor Commented:
the correct mysql.sock file is presend in /var/lib/mysql.

so do i use the following setting
$db_sock = '/var/lib/mysql/mysql.sock';

--W
0
 
db2inst1Commented:
yes
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
wfaleiroAuthor Commented:
And yes

DBI connect(';localhost;3306','mysql',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at ./checksetup.pl line 1434


Looks like there is a semicolon.

Regards,
--Walter
0
 
db2inst1Commented:
First try with the mysql.sock change and then replace the semicolon with localhost:3306 change and re-try it.
0
 
wfaleiroAuthor Commented:
Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
DBI connect(';localhost;3306;mysql_socket=/var/lib/mysql/mysql.sock','mysql',...) failed: Client does not support authentication protocol requested by server; consider upgrading MySQL client at ./checksetup.pl line 1434
Can't connect to the mysql database. Is the database installed and
up and running?  Do you have the correct username and password selected in
localconfig?

0
 
wfaleiroAuthor Commented:
And these are the settings, which I dont think need a change

#
# How to access the SQL database:
#
$db_host = "localhost";         # where is the database?
$db_port = 3306;                # which port to use
$db_name = "mysql";              # name of the MySQL database
$db_user = "mysql";              # user to attach to the MySQL database

0
 
db2inst1Commented:
Just leave these setting alone and just have the mysql.sock file path changed and try connecting through bugzilla
0
 
db2inst1Commented:
Sorry i read the error messages now. What is the version of the client & server you have looks like you might have to upgrade it.

0
 
wfaleiroAuthor Commented:
MySQL-shared-standard-5.0.26-0.rhel4
MySQL-client-standard-5.0.26-0.rhel4
MySQL-server-standard-5.0.26-0.rhel4
MySQL-devel-standard-5.0.26-0.rhel4



And the database is tarred/untarred from

mysql-server-3.23.58-13
mysql-3.23.58-13
mysql-devel-3.23.58-13
mysql-bench-3.23.58-13

maybe I need to use mysqldump and restore. But the very fact that i can use mysql -u mysql -p  and login to the database makes me think otherwise.

--W
0
 
wfaleiroAuthor Commented:
If I try to connect via bugzilla I get the same error

DBI connect('host=localhost;database=mysql;port=3306;mysql_socket=/var/lib/mysql/mysql.sock','mysql',...) failed: Client doe
s not support authentication protocol requested by server; consider upgrading MySQL client at /usr/local/bugzilla/bugzilla-2
.18/lib/perl5/site_perl/5.6.2/i686-linux/DBI.pm line 597
        DBI::__ANON__(undef, undef) called at /usr/local/bugzilla/bugzilla-2.18/lib/perl5/site_perl/5.6.2/i686-linux/DBI.pm
line 648
        DBI::connect('DBI', 'DBI:mysql:host=localhost;database=mysql;port=3306;mysql_socket=/...', '', '', 'HASH(0x987b6c4)'
) called at Bugzilla/DB.pm line 146
        Bugzilla::DB::_connect('DBI:mysql:host=localhost;database=mysql;port=3306;mysql_socket=/...') called at Bugzilla/DB.
0
 
wfaleiroAuthor Commented:
think i need to upgrade the perl dbi
0
 
wfaleiroAuthor Commented:
or rather DBI:mysql
0
 
wfaleiroAuthor Commented:
Actually looking at the error

DBI connect('host=localhost;database=mysql;port=3306;mysql_socket=/var/lib/mysql/mysql.sock','mysql',...) failed: Client doe
s not support authentication protocol requested by server; consider upgrading MySQL client at /usr/local/bugzilla/bugzilla-2
.18/lib/perl5/site_perl/5.6.2/i686-linux/DBI.pm line 597

It's asking to upgrade MySQL client, at DBI.pm, what client is it referring too?

--Walter
0
 
wfaleiroAuthor Commented:
The checksetup.pl script is failing at

 my $dbh = DBI->connect($dsn, $my_db_user, $my_db_pass)
0
 
db2inst1Commented:
I am not sure about this one,

Try upgrading the perl-DBD-MySQL-2.1021-3

Does the bugs databases already exist?

From what i read from this link

http://www.softwaretesting.de/article/view/33/1/8/parent/40/

bugzilla needs to have a username "bugs" any other username doesn;t work. Look at the Bugzilla readme and see if there is a specific requirement for mysql
0
 
wfaleiroAuthor Commented:
This is the original server

 rpm -qa | grep perl-DBD
perl-DBD-MySQL-2.9003-5
perl-DBD-Pg-1.31-6
rpm -qa | grep mysql

mysql-server-3.23.58-13
mysql-3.23.58-13
libdbi-dbd-mysql-0.6.5-9
mysql-devel-3.23.58-13
mod_auth_mysql-20030510-5
php-mysql-4.3.9-3
mysql-bench-3.23.58-13


And this is the new server
rpm -qa | grep MySQL
MySQL-shared-standard-5.0.26-0.rhel4
MySQL-server-standard-5.0.26-0.rhel4
MySQL-devel-standard-5.0.26-0.rhel4
MySQL-client-standard-5.0.26-0.rhel4
rpm -qa | grep perl-DBD
#

When I try to install
yum install perl-DBD-MySQL-2.1021-3
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: perl-DBD-MySQL-2.1021-3
Nothing to do


But this one works

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 perl-DBD-MySQL          i386       2.9004-3.1       base              111 k
Installing for dependencies:
 mysql                   i386       4.1.20-1.RHEL4.1  base              2.9 M


here it will instal mysql 4.1 and uninstall my current mysql which is not what i want.

any suggestions?

--W




0
 
wfaleiroAuthor Commented:
Hi,
I have done the bugzilla installation anew, loaded the DBD::myql module.
Now I need help in restoring all the database of bugs to the new installation. I have already tarred/untarre the database under /var/lib/mysql

--Walter
0
 
db2inst1Commented:
how did you backup?

from what you are saying it looks like you have compressed the data directory and uncompressed it the in new server. A mysql restart would be good at this point.

That would be consistent backup only if no one was using the db/you flushed the tables & locked it. mysqldump/mysqlhotcopy would be best
0
 
wfaleiroAuthor Commented:
I did a tar and untar as suggested.


# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9 to server version: 5.0.26-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| bugs               |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.00 sec)


mysql> use mysql ;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| help_topic                |
| host                      |
| user                      |
+---------------------------+

I am stuck at reflecting the database in bugzilla. As when I search the bugzilla page for bugs, I get zero bugs found for all searches .

-Walter
0
 
db2inst1Commented:
Do this to backup & restore

on source server to backup.

mysqldump –-useruser –-password=password bugs > bugs.sql

on target/new server to restore

mysql -umysql -pmysql bugs < bugs.sql
0
 
wfaleiroAuthor Commented:
Hi,
I used
mysqldump -u root -p --all-databases > bugs.pl

Now when I try to restore it on the new server I get this option

 mysql < bugs.pl
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
0
 
db2inst1Commented:
mysql -uroot -ppassword bugs < bugs.pl

You do know the password for root right?
0
 
wfaleiroAuthor Commented:
Yup Thanks, I got that working. Ran ./checksetup.pl and bugzilla is displaying fine. But the users are complaining they cannot login with the username and passwords to the site. Do I need to reset the same in the mysql database?

--W
0
 
db2inst1Commented:
You can just created them if its only few users.

You can query the table mysql.user in your old server and export only the records that you need and load it into the new server. Can't think of a better way.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 15
  • 11
Tackle projects and never again get stuck behind a technical roadblock.
Join Now