MySQL Client question

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

MySQL Client question

Post 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.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post 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)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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?
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
Post Reply