# Upgrade mysql-client-5.1.52 to mysql-client-5.5.7



## Hanno (Dec 27, 2010)

I'm trying to upgrade mysql-client-5.1.52 to mysql-client-5.5.7 with portupgrade with:

`portupgrade -o databases/mysql55-client -f mysql-client-\*`

I get:


```
===>  mysql-client-5.5.7 conflicts with installed package(s):
      mysql-client-5.1.52

      They install files into the same place.
      Please remove them first with pkg_delete(1).
*** Error code 1
```

Then I try:

`pkg_delete mysql-client-5.1.52`

which results in:


```
pkg_delete: package 'mysql-client-5.1.52' is required by these other packages
and may not be deinstalled:
apache-2.2.17_1
apr-ipv6-devrandom-gdbm-db42-mysql51-pgsql82-sqlite3-1.4.2.1.3.10
```

Do I need to uninstall apache to get this upgrade to work?  Any help would be appreciated.

Thanks,

Hanno


----------



## UNIXgod (Dec 27, 2010)

why not just `portupgrade -r mysql`?


----------



## Hanno (Dec 27, 2010)

UNIXgod said:
			
		

> why not just portupgrade -r mysql?



That doesn't seem to do anything.  No output at all.


----------



## SirDice (Dec 27, 2010)

If you don't have any particular reason to run 5.5 just stick to 5.1.


----------



## Hanno (Dec 27, 2010)

SirDice said:
			
		

> If you don't have any particular reason to run 5.5 just stick to 5.1.



I want to run mysql-server 5.5.7, which requires the 5.5.7 client.


----------



## wblock@ (Dec 27, 2010)

See the -f option for pkg_delete(1) and the -r and -f options for portupgrade(1).  It may be easier to delete the existing packages than to try to force portupgrade to switch them to different versions in-place.


----------



## vand777 (Dec 29, 2010)

5.5.8 release is out. Be carefully with the update. It broke on my machine but I fixed problems within 5-10 minutes and made it working.


----------



## Mwh65 (Dec 30, 2010)

vand777 said:
			
		

> 5.5.8 release is out. Be carefully with the update. It broke on my machine but I fixed problems within 5-10 minutes and made it working.


Since I upgraded to 5.5.8 I have had nothing but a nightmare getting things working again.

Firstly the update to 5.5.8 gave me blank PHP pages (PHP 5.3.4).

My friend had to install PHP 5.2.16 to get it working again which it did but my twice hourly CRONJOB refuses to run correctly (sits in the processes list and every half hour creates a new one. There were 18 sitting in processes this morning consuming 18% CPU).

If I run the PHP file from the command line it throws a 
	
	



```
Can't initialize character set latin1 (path: /usr/local/share/mysql/charsets/) [2019]
```
 However the PHP file works correctly when run in a browser (IE8) and my website is running fine with mysql.

I'm at my wits end with this, not helped by the fact I know only a little about FreeBSD.

Any help would be appreciated.


----------



## vand777 (Dec 30, 2010)

Mwh65 said:
			
		

> Firstly the update to 5.5.8 gave me blank PHP pages (PHP 5.3.4).



This was the only problem I had. I solved it by recompiling php5-mysql* on all jails where I use php and mysql:

```
portmaster php5-mysql
```

And then I restarted Apache.

Also I made sure that I use 5.5.8 everywhere. All clients and servers should have this version.


----------



## Mwh65 (Dec 30, 2010)

Now I wish I had posted a topic here before rolling back PHP.

Can I get back to PHP 5.3.4 somehow ?


----------



## vand777 (Dec 30, 2010)

These upgrade notes are taken from /usr/ports/UPDATING:

```
* 2010-04-09

      Affects: users of lang/php5

      Author: ale@FreeBSD.org

      Reason: 
        As of PHP 5.3, a few extensions were removed from or included into the core
        PHP5 package.  Follow the steps below to update your installation.

        1) Delete the following packages (if installed):

           - php5-dbase
           - php5-ncurses
           - php5-pcre
           - php5-spl
           - php5-ming
           - php5-mhash

        2) Rebuild lang/php5 and all ports that depend on it.
```


----------



## Mwh65 (Dec 30, 2010)

portupgrade won't upgrade the installed version of PHP from 5.2.16 to 5.3.4. Ran portupgrade php5 and it did nothing.

I notice in /usr/ports/lang I have the following directories. Is this correct ...


```
php5
php5-extensions
php52
php52-extensions
```

Can you talk me through upgrading back to 5.3.4 ?


----------



## SirDice (Dec 30, 2010)

Yes, delete all the 'old' php packages, then install the 'new' php.


----------



## rghq (Dec 31, 2010)

Mwh65 said:
			
		

> If I run the PHP file from the command line it throws a
> 
> 
> 
> ...



I'm running into exactly the same problem with Dovecot, Postfix and Pure-Ftpd - all ports have been recompiled after the mysql ports have been updated from 5.1 to 5.5
Running MySQL from command line and giving it a:

`SHOW CHARACTER SET;`

latin1 is shown.


----------



## junt (Jan 5, 2011)

Hello I have the same problem with postfix.
Postfix cannot query the virtual domains tables now.

Is there a solution for the issue?

Thanks


----------



## SirDice (Jan 5, 2011)

Guess why I advised to stick to 5.1 in post #4.


----------



## junt (Jan 5, 2011)

I had no problem with 5.5.7, the problems were with the update to 5.5.8

I don't want to go back to 5.5.7, if I can..


----------



## junt (Jan 5, 2011)

http://groups.google.com/group/muc....se_thread/thread/013508a08a4d59ba?fwc=1&pli=1

seems that if I downgrade mysql-client I will solve the problem..
but I cannot find mysql-client 5.5.7 with portdowngrade tool


----------



## vand777 (Jan 6, 2011)

SirDice said:
			
		

> Guess why I advised to stick to 5.1 in post #4.



People say that 5.5 is better than 5.1 from performance point of view. At my company we use 5.5 for this reason. I personally do not know. Just saying what other people told me.


----------

