Koozali.org: home of the SME Server

Looking for HowTo install MySQL 5.x and PHP 5.x

Offline Snoopyski

  • *
  • 141
  • +0/-0
    • http://www.serviceinfosg.com
Looking for HowTo install MySQL 5.x and PHP 5.x
« on: August 24, 2006, 02:13:41 AM »
Hello Everybody,

I'm looking for a REAL HowTo about upgrade for PHP 5.X et MySQL 5.x on a SME Server 7...

If anybody have a link or something, I will very appreciate  !!!

Thanks

Snoopyski

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #1 on: August 24, 2006, 11:47:14 AM »
Quote from: "Snoopyski"
Hello Everybody,

I'm looking for a REAL HowTo about upgrade for PHP 5.X et MySQL 5.x on a SME Server 7...

If anybody have a link or something, I will very appreciate  !!!

Thanks

Snoopyski
There are to my knowledge no finished how-to's, however there are a few threads on this forum on how to install both... maybe you van help out as well...
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline kruhm

  • *
  • 680
  • +0/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #2 on: August 27, 2006, 02:23:16 PM »
They are in the CENTOSPLUS yum repository. This repo is already installed on your system by default so that you can easily grab stuff from it.

All you have to do is enable it with a search:
yum --enablerepo=centosplus search mysql

or enable it with an install:
yum --enablerepo=centosplus yum <casesensitivepackagename>

Offline Jean-Philippe Pialasse

  • *
  • 2,721
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #3 on: August 28, 2006, 01:42:00 AM »
i have a how to , but i am sorry as it is only in French:


http://smeserver.pialasse.com/index.php/Php_5_mysql_5

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #4 on: September 05, 2006, 02:44:38 PM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

Offline Jean-Philippe Pialasse

  • *
  • 2,721
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #5 on: September 06, 2006, 10:13:05 PM »
wonderfull job  just what is needed for a rush job for non french speeking people.


unnilennium AKA Jean-Philippe Pialasse

Offline flufdk

  • 7
  • +0/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #6 on: September 20, 2006, 02:01:47 PM »
The link is broken to eng. ver. is the any who there have a new link?

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #7 on: September 20, 2006, 02:06:56 PM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

Offline flufdk

  • 7
  • +0/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #8 on: September 20, 2006, 09:09:06 PM »
Thanks william_syd

now i get this.

Quote

--> Running transaction check
--> Processing Dependency: php-domxml for package: e-smith-horde
--> Finished Dependency Resolution
Error: Missing Dependency: php-domxml is needed by package e-smith-horde
================================================================
No new rpms were installed. No additional commands are required.
================================================================


What do I have to do now??


/Brian Bech

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #9 on: September 21, 2006, 03:34:41 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

jckelly

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #10 on: September 21, 2006, 05:43:21 AM »
I followed the php 5 & MySQL 5 howto this past Sunday (before it disappeared) and all seemed to go well.  However, I still wasn't able to get vTiger 5.0 CRM running which was the purpose of the whole exersize.  Earlier today I discovered that the mysql client is still version 4.1.14.  Now, I can't be sure if I messed up in some way, or if the packages are at fault.  I'd be grateful if anyone else who followed the howto could check their version of the MySQL client and let me know what they've got.

By the way, one of the messages above mentions a link to the contribs, I received this message "You are not authorized to view this resource.
You need to login." upon trying that link.

regards,
jc kelly

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #11 on: September 21, 2006, 05:56:04 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

jckelly

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #12 on: September 21, 2006, 05:24:35 PM »
William,

Thanks for the help.  Here's what's happening...

Running yum list | grep "mysql" on a freshly installed SME 7 gives me:

Code: [Select]
e-smith-mysql.noarch                     1.12.0-06              installed
mysql.i386                               4.1.20-1.RHEL4.1       installed
mysql-server.i386                        4.1.20-1.RHEL4.1       installed
php-mysql.i386                           4.3.9-3.15             installed



Running the same command after installing PHP 5 and MySQL 5 gives:

Code: [Select]
e-smith-mysql.noarch                     1.12.0-06              installed
mysql.i386                               5.0.22-1.centos.1      installed
mysql-server.i386                        5.0.22-1.centos.1      installed
mysqlclient14.i386                       4.1.14-4.2.c4.1        installed
php-mysql.i386                           5.0.4-5.centos4        installed
mysql.i386                               4.1.20-1.RHEL4.1       smeos
mysql-server.i386                        4.1.20-1.RHEL4.1       smeos
php-mysql.i386                           4.3.9-3.15             smeupdates



If I try yum remove mysqlclient14.i386, I get a 46 item listing of things that are going to be removed.  Needless to say, I didn't do THAT.

If I've irrepairably screwed up, that's ok - starting again is an option

Thanks for any light you can shed on this for me.

jckelly

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #13 on: September 22, 2006, 02:02:08 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

jckelly

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #14 on: September 22, 2006, 04:35:46 AM »
vtiger gives the following error while trying to connect to database:

Code: [Select]
Unable to connect to database Server. Invalid mySQL Connection Parameters specified

This may be due to the following reasons:
- specified database user, password, hostname, database type, or port is invalid.
- specified database user does not have access to connect to the database server from the host


However, the connection info is correct and the username/password works from the command line.  When I noticed that the mysqlclient was version 4.1.14 I thought it might have something to do with the problem.

I have since installed mysql-shared-5.0.22-0 but phpinfo still reports the client as 4.1.14

Still looking....

Offline flufdk

  • 7
  • +0/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #15 on: September 22, 2006, 11:26:22 AM »
Hi agian

I can not install domxml again.

Quote
Using username "root".
root@xxxxxx's password:
Last login: Fri Sep 22 05:54:11 2006 from xxxxxxx
[root@xxxx ~]# rpm -e --nodeps php-domxml
[root@xxxx ~]# rpm -Uvh http://mirror.contribs.org/smeserver/releases/7/updates/i386/RPMS/php-domxml-4.3.9-3.15.i386.rpm
Retrieving http://mirror.contribs.org/smeserver/releases/7/updates/i386/RPMS/php-domxml-4.3.9-3.15.i386.rpm
error: Failed dependencies:
        php = 4.3.9-3.15 is needed by php-domxml-4.3.9-3.15.i386
[root@bxxxx ~]#



Is the a other way to do this?
Its a fres inst. sme 7.0

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #16 on: September 22, 2006, 11:28:45 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #17 on: September 22, 2006, 04:53:11 PM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

jckelly

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #18 on: September 22, 2006, 05:22:16 PM »
William,

Thanks for your time on this.

First, with regard to the installation you did, it's not MySQL that might break it.  vTiger will work with versions above 4.1.x.  However, it does need PHP 5.

Knowing this, and being that I had a combined howto for PHP 5 and MySQL 5, I installed both before trying to install vTiger.

I created a vtiger user in mySQL with all rights (grant all) and used that user during the configuration - which failed with the message included above.  Next, I created the database manually. The error remained.  Finally, I got a script from vtiger which allowed me to create the tables from the command line.  Obviously none of this solved the problem with the connection to mySQL.  It was at this point that I discovered, via phpinfo, that I was running  MySQL client API version 4.1.14   At this point I am only ASSUMING that this is the problem.

Perhaps my next attempt should be to start fresh and do only the PHP 5 install?

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #19 on: September 22, 2006, 05:34:03 PM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #20 on: September 22, 2006, 05:39:20 PM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

jckelly

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #21 on: September 22, 2006, 05:59:58 PM »
I tried with both machine name and ip address.  Did not try localhost.  Though I will now.

Quote
Quote
jckelly wrote:
Finally, I got a script from vtiger which allowed me to create the tables from the command line.



There are 307 tables...


Just to be clear... the script created on the tables :)

regards,
Cavan

jckelly

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #22 on: September 22, 2006, 06:06:02 PM »
William,

What's most interesting about your phpinfo() is that the mysqlclient is 4.1.20 while mine (after the php 5/mysql 5 upgrade) is 4.1.14.  On a fresh install, I also have 4.1.20.  The question is, where did 4.1.14 come from?  Was it the php/mysql upgrade? or did I do something else that caused this downgrade - perhaps via yum....  I just don't know.  I'll have to start fresh to figure that out.

Unfortunately, I have to go out and make a few bucks right now so I'll give it a try later tonight.

Thanks again for all your effort on this.

Cavan

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #23 on: September 23, 2006, 03:13:25 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

Offline pcdoc

  • *
  • 56
  • +0/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #24 on: September 26, 2006, 04:20:42 PM »
Have a bit of a problem still after installing php5 and mysql5

PHP5 won't start because it is looking for snmp.so and odbc.so

after commenting these out of /etc/php.ini, it also wanted domxml.so

commented that out as well, but still having same problem.

The problem is when I try to open a php page, ie webmail, the browser wants to save the php file. The server does not seem to be wanting to process the php and produce a html page for the browser.

Any thoughts?? - this is on my main test server, and I want to be able to update a lot of our servers to php5 because of software rollout requiring php5
There are 10 types of people in this world,
   Those that know binary, and those who don't!

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #25 on: September 27, 2006, 01:52:12 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

Offline RvLardin

  • ***
  • 82
  • +0/-0
    • http://sme.firewall-services.com
VTiger 5 CRM install
« Reply #26 on: October 10, 2006, 09:33:21 AM »
> jckelly
Your pb as nothing to do with PHP5 or MySQL5.
We are running VT5 on several SME7 servers without any upgrade.
It seems that you didn't create the MySQL DB before running the install scripts.
So, brief howto
1) DL & untar the files from VT5 in an ibay/html
2) Create your DB :
# mysql
> create database myVTbase;
> grant all prilileges on myVTbase.* to 'myVTuser'@'localhost' identified by 'myPWD';
> flush privileges;
> quit
#
3) Run the install script opening the http://myserver/ibay
and specifying "localhost" as "MySQLserverhost", "myVTbase" as name of the DB, "myVTuser" as database owner and "myPWD" as password.

It runs !
:)

May be you've done the frequent mistake that consist of changing the root password if you indicate "root" as base owner. That's bad !
In this case, search this forum  to fix it.

A+,
RV.
P.S. : To stick with this thread, we are also thinking to upgrade to PHP5 because one of the features of VTiger5 don't work : the imap connector.
----
"Those who are willing to lose some of their essential liberties in favour of security deserve neither and will lose both."
- Thomas Jefferson .

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Re: VTiger 5 CRM install
« Reply #27 on: October 10, 2006, 11:12:29 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

pippin

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #28 on: January 03, 2007, 01:14:40 AM »
I get this error when trying to update on a fresh install

Cannot open/read repomd.xml file for repository: smeaddons
failure: repodata/repomd.xml from smeaddons: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from smeaddons: [Errno 256] No more mirrors to try.

It seems like PHP5 isnt installed and the webserver isnt running

I get a error messages in httpd.conf in line 111 i guess

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #29 on: January 03, 2007, 01:41:39 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

pippin

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #30 on: January 03, 2007, 01:57:37 AM »
Where can i get 7.1 then? the USA mirror is Down

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #31 on: January 03, 2007, 02:22:39 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

pippin

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #32 on: January 03, 2007, 02:34:42 AM »
well i only get timeout when i try thats why i said the US mirror is down :D

And the other mirrors that are closer to me havent got the 7.1

Edit i got in with FTP :D But timeout again

Offline Jean-Philippe Pialasse

  • *
  • 2,721
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #33 on: January 03, 2007, 10:22:03 AM »
The mirrors are to be updated due to upload of 7.1 version and upload of rpm to update from 7.0 to 7.1 so wait 2 or 3 more days for propagation.

Thanks to the new plugin for yum update, it chose the fastest (so probably the nearest ) miror to query update, but it may be the last to be propaged. If the miror is being propaged you'll get a lot of break download errors so be patient.

For the How to, unfortunatly it is read only and totaly buggy !

I have a french version that is working for MYSQL 5, but nut not really safe for PHP 5 for the moment (one or two things to check).

The procedure given just above should success

Mathias

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #34 on: February 27, 2007, 02:25:42 PM »
Hello
Unnimillenium, I did  follow your french how to, and I got a problem with PHP5 I guess.
Well I am trying to update the template for httpd.conf after the php5 installation and I got this message :
Code: [Select]

# expand-template /etc/httpd/conf/httpd.conf

WARNING in /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/php-5.0.4-5.centos4.i386.rpm: ERROR: Cannot process template /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/php-5.0.4-5.centos4.i386.rpm: Unmatched close brace at line 125
 at /sbin/e-smith/expand-template line 45

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Do not use the old wiki how-to for SME >= 7.1
« Reply #35 on: March 03, 2007, 09:16:27 AM »
The old wiki how-to was only relevent to SME 7.0 and does not provide an easy upgrade path. Actually, till the '5' series become part of the base there is really no 'easy' upgrade path.

I've tested the following in a server-only VM. Server-manager and webmail login were possible after upgrading. This was the only test of success.

If you upgraded SME 7.0 by the old wiki there is a post here on how to downgrade. If you downgrade, I suggest you update to 7.1.1 before upgrading again.

If you upgraded SME 7.1 by the old wiki there is a post here on how to transition from the custom templates to the default templates.

Word of warning. You will be doing a 7.1 to 7.1.1 update. New kernels will get installed. Grub prior to 7.1.1 can revert to an incorrect kernel type (smp/up). If this occurs with a VIA C3 processor your machine will not boot. Updating e-smith-grub prior to starting is recommended.
Code: [Select]
yum update e-smith-grub \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot


Bigger word of warning. Using this post is at your risk.

SME 7.1 >> php/mysql to 5 series >> SME 7.1.1

Code: [Select]
db yum_repositories setprop updates Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts
db yum_repositories setprop base Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts
db yum_repositories setprop centosplus Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts,perl*,perl-DBI,httpd,mod_ssl
expand-template /etc/yum.conf

Code: [Select]
yum update php mysql \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=centosplus \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot

Code: [Select]
mysql_upgrade
Code: [Select]
cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql \
--force \
--user=root \
--host=localhost \
--database=mysql

Code: [Select]
signal-event post-upgrade
signal-event reboot

If you have transitioned to the default templates this is the start of the 7.1.1 update.
Code: [Select]
rpm -e --nodeps \
smeserver-support \
e-smith-horde \
e-smith-base


At this point some backups will be produced. Either rename them at the end to reuse them or go into a local server console to recreate them.
Code: [Select]
warning: /home/e-smith/db/networks saved as /home/e-smith/db/networks.rpmsave
warning: /home/e-smith/db/hosts saved as /home/e-smith/db/hosts.rpmsave
warning: /home/e-smith/db/domains saved as /home/e-smith/db/domains.rpmsave
warning: /home/e-smith/db/configuration saved as /home/e-smith/db/configuration.rpmsave
warning: /home/e-smith/db/accounts saved as /home/e-smith/db/accounts.rpmsave

These file versions were correct 3-MAR-2007
Code: [Select]
rpm -ivh --nodeps \
http://mirror.contribs.org/smeserver/releases/7/smeupdates/i386/RPMS/smeserver-support-1.6.0-32.el4.sme.noarch.rpm \
http://mirror.contribs.org/smeserver/releases/7/smeupdates/i386/RPMS/e-smith-base-4.18.0-10.el4.sme.noarch.rpm \
http://mirror.contribs.org/smeserver/releases/7/smeupdates/i386/RPMS/e-smith-horde-1.13.0-19.el4.sme.noarch.rpm

Code: [Select]
yum clean all
Code: [Select]
yum update \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=centosplus \
--enablerepo=smeaddons

Answer y to overwrite
Code: [Select]
cp hosts.rpmsave hosts
cp domains.rpmsave domains
cp configuration.rpmsave configuration
cp accounts.rpmsave accounts
cp networks.rpmsave networks

Code: [Select]
signal-event post-upgrade
signal-event reboot


SME 7.1 >> SME 7.1.1 >> php/mysql to 5 series

Code: [Select]
db yum_repositories setprop updates Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts
db yum_repositories setprop base Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts
db yum_repositories setprop centosplus Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts,perl*,perl-DBI,httpd,mod_ssl
expand-template /etc/yum.conf

Code: [Select]
yum update \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot

This is the start of the php/mysql upgrade.
Code: [Select]
yum update php mysql \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=centosplus \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot

Code: [Select]
mysql_upgrade
Code: [Select]
cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql \
--force \
--user=root \
--host=localhost \
--database=mysql

Code: [Select]
signal-event post-upgrade
signal-event reboot
Regards,
William

IF I give advise.. It's only if it was me....

jazbokes

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #36 on: March 04, 2007, 03:47:19 PM »
Thanks William for all your assistance and education..

I'm trying to install Alfresco document management and Alfresco-sugarcrm application, but first I have to update php4 to php5

My attempts results the below errors;
though iam able to access server-manager but not webmail..

Upgraded to smeserver 7.2 through test & testupdates repo


[root@sme8dev ~]# mysql_upgrade
Could not find file mysql_fix_privilege_tables.sql
Please use --basedir to specify the directory where MySQL is installed


[root@sme8dev ~]# cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin
/mysql \
> --force \
> --user=root \
> --host=localhost \
> --database=mysql
ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv'
@hadGrantPriv:=1
1
1
1
ERROR 1060 (42S21) at line 28: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 29: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 30: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 41: Duplicate column name 'ssl_type'
ERROR 1060 (42S21) at line 70: Duplicate column name 'Routine_type'
ERROR 1054 (42S22) at line 94: Unknown column 'Type' in 'columns_priv'
ERROR 1060 (42S21) at line 100: Duplicate column name 'type'
@hadShowDbPriv:=1
1
1
1
ERROR 1060 (42S21) at line 110: Duplicate column name 'Show_db_priv'
ERROR 1060 (42S21) at line 127: Duplicate column name 'max_questions'
ERROR 1060 (42S21) at line 137: Duplicate column name 'Create_tmp_table_priv'
ERROR 1060 (42S21) at line 140: Duplicate column name 'Create_tmp_table_priv'
ERROR 1061 (42000) at line 145: Duplicate key name 'Grantor'
@hadCreateViewPriv:=1
1
1
1
ERROR 1060 (42S21) at line 252: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 253: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 254: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 259: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 260: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 261: Duplicate column name 'Show_view_priv'
@hadCreateRoutinePriv:=1
1
1
1
ERROR 1060 (42S21) at line 282: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 283: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 284: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 289: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 290: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 291: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 293: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 294: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 306: Duplicate column name 'max_user_connections'
@hadCreateUserPriv:=1
1
1
1
ERROR 1060 (42S21) at line 315: Duplicate column name 'Create_user_priv'


Thanks
Jon

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #37 on: March 05, 2007, 07:52:07 AM »
Quote from: "jazbokes"


Upgraded to smeserver 7.2 through test & testupdates repo

I have not tried 7.2 yet.

Quote from: "jazbokes"

[root@sme8dev ~]# mysql_upgrade
Could not find file mysql_fix_privilege_tables.sql
Please use --basedir to specify the directory where MySQL is installed

Try...
Code: [Select]
mysql_upgrade --basedir /usr

Quote from: "jazbokes"


[root@sme8dev ~]# cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin
/mysql \
> --force \
> --user=root \
> --host=localhost \
> --database=mysql
ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv'
@hadGrantPriv:=1
1
1
1
ERROR 1060 (42S21) at line 28: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 29: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 30: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 41: Duplicate column name 'ssl_type'
ERROR 1060 (42S21) at line 70: Duplicate column name 'Routine_type'
ERROR 1054 (42S22) at line 94: Unknown column 'Type' in 'columns_priv'
ERROR 1060 (42S21) at line 100: Duplicate column name 'type'
@hadShowDbPriv:=1
1
1
1
ERROR 1060 (42S21) at line 110: Duplicate column name 'Show_db_priv'
ERROR 1060 (42S21) at line 127: Duplicate column name 'max_questions'
ERROR 1060 (42S21) at line 137: Duplicate column name 'Create_tmp_table_priv'
ERROR 1060 (42S21) at line 140: Duplicate column name 'Create_tmp_table_priv'
ERROR 1061 (42000) at line 145: Duplicate key name 'Grantor'
@hadCreateViewPriv:=1
1
1
1
ERROR 1060 (42S21) at line 252: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 253: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 254: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 259: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 260: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 261: Duplicate column name 'Show_view_priv'
@hadCreateRoutinePriv:=1
1
1
1
ERROR 1060 (42S21) at line 282: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 283: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 284: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 289: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 290: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 291: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 293: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 294: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 306: Duplicate column name 'max_user_connections'
@hadCreateUserPriv:=1
1
1
1
ERROR 1060 (42S21) at line 315: Duplicate column name 'Create_user_priv'


Thanks
Jon


The last two commands are to update mysql privilege tables. The last one in a subset of the first. I split them because the first would not complete due to mysql root user having a password. It appears to be more friendly now and the last command could be omitted.
Look at the first few lines.
Code: [Select]
more /usr/share/mysql/mysql_fix_privilege_tables.sql

Why you cannot login to Webmail I do not know.
Bug 2132 and 2558 might help.

BTW, how did you upgrade to php5/mysql5 ?
Regards,
William

IF I give advise.. It's only if it was me....

Offline nowhinjing

  • *
  • 32
  • +0/-0
it works
« Reply #38 on: March 05, 2007, 09:51:54 AM »
Hi, all,

further to the conversation I had been having with William in another thread - I felt that the state of my test server had become unclear, so I decided to dump off all the data, re-install 7.1 and then follow William's instuctions to upgrade to 7.1.1 and then update to PHP5 and MySQL5 - what else would you do on a wet windy Sunday afternoon ?

I am please to say that all went to plan - I initially fell into the same problem as jazbokes but --basedir="/usr" soon fixed that.

I also got the same SQL errors as jazbokes, but they do not seem to be important as I have successfully restored the data and all seems to be well on my shiny new PHP5/MySql5 installation.

Anyone know when PHP5/MySQL5 will be in the core distribution ?

Thank-you, William - I could not have done this without  your help.

NWJ
...

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #39 on: March 05, 2007, 10:07:09 AM »
Thanks, but it was Greg who got the default templates changed to detect the installation if php5. Bug 1120.

As for php5/mysql5 in the core..  your not going to see it with the CentOS 4 series so you might have to wait for SMEServer 8. Bug 2422.

Oh, does your Webmail work ?
Regards,
William

IF I give advise.. It's only if it was me....

Offline nowhinjing

  • *
  • 32
  • +0/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #40 on: March 05, 2007, 11:04:12 AM »
seems to - I have activated webmail and can log in with no problem.

I have not tried sending myself a message yet.

NWJ
...

jazbokes

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #41 on: March 06, 2007, 02:33:40 AM »
Thanks William  and Greg,

Now I'm able to login to webmail,  next to install Alfresco..


Thanks

Jon

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #42 on: March 06, 2007, 08:11:30 AM »
Update from 7.1.1 to 7.1.2 appears to generate some errors in the message log.

Looks like a later version of perl-DBI slipped in.

Code: [Select]
db yum_repositories setprop centosplus Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts,perl*,perl-DBI,perl-DBD-MySQL,httpd,mod_ssl
expand-template /etc/yum.conf

Code: [Select]
rpm -e --nodeps perl-DBI.i386
Code: [Select]
rpm -e --nodeps perl-DBD-MySQL
Code: [Select]
yum install perl-DBI perl-DBD-MySQL \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=centosplus \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot
Regards,
William

IF I give advise.. It's only if it was me....

Offline nowhinjing

  • *
  • 32
  • +0/-0
Ooops !
« Reply #43 on: March 06, 2007, 04:02:56 PM »
Sorry, William. I spoke too soon !

Receiving mail POP3 is fine.

Sending mail SMTP is not working.

Error is :
Code: [Select]
Mar  5 18:27:15 louches httpd: PHP Warning:  Mail_smtp::include_once(Net/SMTP.php) [<a href='function.Mail-smtp-include-once'>function.Mail-smtp-include-once</a>]: failed to open stream: No such file or directory in /usr/share/pear-addons/Mail/smtp.php on line 148
Mar  5 18:27:15 louches httpd: PHP Warning:  Mail_smtp::include_once() [<a href='function.include'>function.include</a>]: Failed opening 'Net/SMTP.php' for inclusion (include_path='/home/httpd/html/horde/lib:/usr/share/pear-addons:/usr/share/pear') in /usr/share/pear-addons/Mail/smtp.php on line 148
Mar  5 18:27:15 louches httpd: PHP Fatal error:  Class 'Net_SMTP' not found in /usr/share/pear-addons/Mail/smtp.php on line 150
Mar  5 18:27:35 louches httpd: PHP Notice:  Only variable references should be returned by reference in /usr/share/pear-addons/Log.php on line 128


Just going to do a search to see if I can find the answer myself, comme un grand !

NWJ

<EDIT>

Search is your friend .....

For completeness sake, proble resolved by installing the following PEAR modules ....

Code: [Select]
# pear install Net_Socket
# pear install --alldeps Net_SMTP


send mail now works

</EDIT>
...

crackerboy

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #44 on: April 14, 2007, 10:33:22 PM »
I have a problem there i cant access server-manager nor on the server it self or through the browser after following the french version of updating to mysql 5 and php 5 so how can i fix it?

It rejects the admin password but webmmail and phpmyadmin working

Offline mike_mattos

  • *
  • 313
  • +0/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #45 on: May 25, 2007, 11:16:06 PM »
I haven't been able to get MySQL5/PHP5 to work with the current updates installed ,  I think the install image is 7.1.06.

Has anyone tried this lately?

thx
...

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #46 on: May 26, 2007, 05:03:03 AM »
Quote
Has anyone tried this lately?


I tried and failled miserably!
 :(

I was able to get my system back following many posts from William  :D
I had this working up until 7.1 following his instructions.
Thanks,

Offline mike_mattos

  • *
  • 313
  • +0/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #47 on: May 28, 2007, 06:31:45 PM »
well, of necessity, I'm ghosting a working 7.1.3 system & will try again to do a fresh install later!  

I DID install MYSQL5/PHP5  onto 7.1.3 a few weeks ago with the same install image,  I've got no idea where it is going wrong now!
...

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #48 on: June 21, 2007, 01:40:29 PM »
Here is some good info on running php4 and php5 side by side.

http://sme.firewall-services.com/spip.php?article46#forum62

There is a thread on here about it as well.
Regards,
William

IF I give advise.. It's only if it was me....

tsinatra

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #49 on: July 26, 2007, 01:47:10 PM »
If server-manager and/or admin console login don't work after mysql5 php5 upgrade on SME7.2:

yum --enablerepo=centosplus update perl-DBI perl-suidperl
signal-event post-upgrade
signal-event-reboot

Online Stefano

  • *
  • 10,836
  • +2/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #50 on: July 26, 2007, 03:10:01 PM »
I managed to install mysql5 and php5 on sme 7.2 without problems

Code: [Select]


rpm -e --nodeps php-domxml

db yum_repositories setprop centosplus Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts,perl*,perl-DBI,perl-DBD-MySQL,httpd,mod_ssl

expand-template /etc/yum.conf

yum update php mysql \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=centosplus \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

signal-event post-upgrade
signal-event reboot

mysql_upgrade

signal-event post-upgrade
signal-event reboot


server-manager, phpmyadmin, webmail all running fine

HTH

Ciao

Stefano

crackerboy

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #51 on: August 02, 2007, 05:49:20 PM »
Quote from: "william_syd"
Here is some good info on running php4 and php5 side by side.

http://sme.firewall-services.com/spip.php?article46#forum62

There is a thread on here about it as well.
That fucked up my forums that i host on the serrver also mine wich has grown pretty much :cry:

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #52 on: August 02, 2007, 10:19:56 PM »
Quote from: "crackerboy"
Quote from: "william_syd"
Here is some good info on running php4 and php5 side by side.

http://sme.firewall-services.com/spip.php?article46#forum62

There is a thread on here about it as well.
That fucked up my forums that i host on the serrver also mine wich has grown pretty much :cry:


Hi. You cannot fuck anything with this how-to. If it doesn't work for you, you can remove the custom-template for your web app:

(in the example)
Code: [Select]

<Directory /home/e-smith/files/ibays/vtiger/html>
       AddHandler php5-cgi .php
       Action php5-cgi /php5-cgi/php
</Directory>


And it we be handled by the default php module of your sme, just like it was before you tried it. If you don't use the php5-cgi anymore, you can also remove the rpms, and the other template, and your system will be just like it was before.

Cheers
C'est la fin du monde !!! :lol:

Offline Jean-Philippe Pialasse

  • *
  • 2,721
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #53 on: September 30, 2007, 02:17:12 AM »
how to install mysql5 on SME 7.2:

Code: [Select]
yum update --enablerepo=centosplus  mysql-server  --exclude=php-pdo --exclude=php-common --exclude=php-mysql --exclude=perl-DBD-MySQL --exclude=perl -y

cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql --force --user=root --host=localhost --database=mysql
service mysqld stop;
service mysqld start;
/etc/rc.d/init.d/mysql.init restart;