Page 1 of 1

MySQL Client question

Posted: Mon Feb 05, 2007 5:27 pm
by RobertGonzalez
Ok, so I am trying my hand at getting MySQL 5 loaded on a new dedicated server running Fedora Core 4. I got that to work without incident, but the problem I am having now is that PHP is stll recognizing the old mysql client API version. I installed the MySQL-client-5.0.27.....rpm, and at the command line, mysql is running fine. But calling a stored proc from the database is throwing errors that I am almost certain are related to the client.

Is anyone apt enough to help me figure this out?

Code: Select all

[root@]# yum info MySQL-client
Setting up repositories
Reading repository metadata in from local files
Installed Packages
Name   : MySQL-client
Arch   : i386
Version: 5.0.27
Release: 0.glibc23
Size   : 9.3 M
Repo   : installed
Summary: MySQL - Client

Description:
 This package contains the standard MySQL clients and administration tools.

For a description of MySQL see the base MySQL RPM or http://www.mysql.com

Code: Select all

[root@]# yum info mysql
Setting up repositories
Reading repository metadata in from local files
Available Packages
Name   : mysql
Arch   : i386
Version: 4.1.20
Release: 1.FC4.1
Size   : 2.9 M
Repo   : updates-released
Summary: MySQL client programs and shared libraries.
Description:
 MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
client/server implementation consisting of a server daemon (mysqld)
and many different client programs and libraries. The base package
contains the MySQL client programs, the client shared libraries, and
generic MySQL files.

Posted: Mon Feb 05, 2007 8:10 pm
by Jenk
hmm.. did you completely remove the 'old' install?

It's not the "client authorization" error, is it? (http://dev.mysql.com/doc/refman/5.0/en/old-client.html)

Posted: Tue Feb 06, 2007 11:26 am
by RobertGonzalez
Jenk wrote:hmm.. did you completely remove the 'old' install?

It's not the "client authorization" error, is it? (http://dev.mysql.com/doc/refman/5.0/en/old-client.html)
No. But I think I know what I did. I installed the new server using the RPMs, but I yum'ed php_mysql, which I think loaded an old client from the yum repository. I will be messing with it today to confirm that I indeed screwed up.

Posted: Tue Feb 06, 2007 11:28 am
by Chris Corbyn
Check where it's running from:

Code: Select all

whereis mysql
If more than one place comes out it's installed two versions at two different locations.

Posted: Tue Feb 06, 2007 11:46 am
by RobertGonzalez

Code: Select all

[everah@ ~]$ whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
So this means that I have more than one installation?

Posted: Tue Feb 06, 2007 12:05 pm
by daedalus__
I think that Linux keeps different pieces of programs in different directories according to what piece it is.

I don't think there is more than one install.

Posted: Tue Feb 06, 2007 2:46 pm
by Chris Corbyn
No, you only have one ;) It's the mysql binary I was referring to :) Those other locations are libraries and header files.

Posted: Thu Feb 08, 2007 4:11 pm
by RobertGonzalez
Ok, I think I have narrowed this down a bit. What I have is an installation of PHP (from the original installation, which I believe used a RH RPM) that was originally built against MySQL 4.1. Since I destroyed MySQL 4.1 and installed MySQL 5.0.27, I figure I can use it. And for the most part I can. Except when it comes to things like returning data from stored procedures. The reason, I suspect, is that PHP still is associating itself with the MySQL Client API Version 4.1.

Now to my question... I have searched all over, and it appears that PHP needs be rebuilt so that it will attach itself to the MySQL 5.0.27 client API. But I only have an RPM. No make file, no configure file, etc... I tried to rpm -Uvh the current rpm that I have for PHP, but it says that there is nothing to update. So how do I rebuild PHP from an RPM so that it attaches itself to the new MySQL Client API so I can actually use MySQL through the web the way I want to?

Posted: Fri Feb 09, 2007 12:19 pm
by RobertGonzalez
Quick update:

I'm an idiot. Plain and simple.

What I needed to do was hit the database with MySQLi instead of MySQL. I am happy now and all works fine for now.