Solved

Mysql database configuration for Bugzilla

Posted on 2006-10-30
26
563 Views
Last Modified: 2008-01-09
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
Comment
Question by:wfaleiro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 15
  • 11
26 Comments
 
LVL 7

Expert Comment

by:db2inst1
ID: 17836798
/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
 
LVL 1

Author Comment

by:wfaleiro
ID: 17836857
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
 
LVL 7

Expert Comment

by:db2inst1
ID: 17836871
yes
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 1

Author Comment

by:wfaleiro
ID: 17836883
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
 
LVL 7

Expert Comment

by:db2inst1
ID: 17836893
First try with the mysql.sock change and then replace the semicolon with localhost:3306 change and re-try it.
0
 
LVL 1

Author Comment

by:wfaleiro
ID: 17836942
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
 
LVL 1

Author Comment

by:wfaleiro
ID: 17836948
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
 
LVL 7

Expert Comment

by:db2inst1
ID: 17836953
Just leave these setting alone and just have the mysql.sock file path changed and try connecting through bugzilla
0
 
LVL 7

Expert Comment

by:db2inst1
ID: 17836991
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
 
LVL 7

Expert Comment

by:db2inst1
ID: 17837013
0
 
LVL 1

Author Comment

by:wfaleiro
ID: 17837031
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
 
LVL 1

Author Comment

by:wfaleiro
ID: 17837040
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
 
LVL 1

Author Comment

by:wfaleiro
ID: 17837073
think i need to upgrade the perl dbi
0
 
LVL 1

Author Comment

by:wfaleiro
ID: 17837095
or rather DBI:mysql
0
 
LVL 1

Author Comment

by:wfaleiro
ID: 17837190
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
 
LVL 1

Author Comment

by:wfaleiro
ID: 17837233
The checksetup.pl script is failing at

 my $dbh = DBI->connect($dsn, $my_db_user, $my_db_pass)
0
 
LVL 7

Expert Comment

by:db2inst1
ID: 17837283
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
 
LVL 1

Author Comment

by:wfaleiro
ID: 17837466
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
 
LVL 1

Author Comment

by:wfaleiro
ID: 17837978
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
 
LVL 7

Expert Comment

by:db2inst1
ID: 17838039
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
 
LVL 1

Author Comment

by:wfaleiro
ID: 17838350
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
 
LVL 7

Expert Comment

by:db2inst1
ID: 17838375
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
 
LVL 1

Author Comment

by:wfaleiro
ID: 17843235
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
 
LVL 7

Expert Comment

by:db2inst1
ID: 17843387
mysql -uroot -ppassword bugs < bugs.pl

You do know the password for root right?
0
 
LVL 1

Author Comment

by:wfaleiro
ID: 17843567
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
 
LVL 7

Accepted Solution

by:
db2inst1 earned 160 total points
ID: 17843989
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question