Koozali.org: home of the SME Server

How to install MySQL5 on SME7

Offline mike_mattos

  • *
  • 313
  • +0/-0
How to install MySQL5 on SME7
« on: May 30, 2006, 05:22:54 PM »
Please test on a fresh install, because it is likely to destroy some settings and data!   Perhaps someone can refine it to not kill webmail!

1 # mysql
logs in as version 4.1.12

2 mysql> quit;

3 # /etc/rc.d/init.d/supervise/mysqld status
/service/mysqld: run (pid 29128) 53510 seconds, normally down

4 # /etc/rc.d/init.d/supervise/mysqld stop
Stopping mysqld: [ OK ]

5 # /etc/rc.d/init.d/supervise/mysqld status
/service/mysqld: down 6 seconds

6 # rpm -e mysql-server --nodeps

7 # rpm -e mysql --nodeps

8 Download
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-5.0.18-1.c4.i386.rpm
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-server-5.0.18-1.c4.i386.rpm

Do NOT get the versions with 5.0.18-2.1, they fail dependecies!

9 # rpm -Uvh mysql-5.0.18-1.c4.i386.rpm

10 # rpm -Uvh mysql-server-5.0.18-1.c4.i386.rpm

11 # mysql ( see what happens )
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18

13 reboot

14 # mysql ( make sure it restarted automatically! )
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18

15 Check Web Mail
A fatal error has occurred
DB Error: insufficient permissions
Details have been logged for the administrator.

16 Reset per Charly Brady , destroys data!!
# cd /service/mysqld
# runsvctrl d .
# /etc/e-smith/events/actions/mysql-delete-db-files
# signal-event post-upgrade
# signal event reboot

15 Check Web Mail
GOT LOGIN!!!
...

DarkMirage

How to install MySQL5 on SME7
« Reply #1 on: May 31, 2006, 12:04:04 AM »
This would be the short version:
(Note that this includes mysqlclient because of the dependencies mentioned above)

Download and install:
Code: [Select]
wget \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysqlclient14-4.1.14-4.c4.i386.rpm \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-server-5.0.18-2.1.c4.i386.rpm \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-5.0.18-2.1.c4.i386.rpm
rpm -U \
mysql-5.0.18-2.1.c4.i386.rpm \
mysql-server-5.0.18-2.1.c4.i386.rpm \
mysqlclient14-4.1.14-4.c4.i386.rpm


Remove extra configuration file and apply changes to daemon
Code: [Select]
rm -f /etc/my.cnf.rpmnew
service mysqld restart


Fix privileges
(See Horde issue below for details)
Code: [Select]
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"

Testing went as follows:
System: VMWare  SME Server 7.0rc2 default configuration
Clean installation
Server Manager: Enable Webmail
MySQL: Create mydb, mydb.mytable, grant select by myuser:mypw@localhost
Backup to Desktop
Webmail login
Verify: describe mydb.mytable using myuser
(Upgrade as above)
Webmail login
Verify: describe mydb.mytable using myuser
Restore from desktop
Webmail login
Verify: describe mydb.mytable using myuser
Backup to Desktop
Restore from Desktop
Webmail login
Verify: describe mydb.mytable using myuser

All successful

Horde issue:
It seems horde does not init with a grant statement, rather it inserts what it assumes is correct.
The issue is due to missing data in mysql.db. The grant statement fixes this.
This means that after restoring a backup previous to the upgrade, this command should be reissued.
However, in the above tests, this wasn't necessary. Don't know why though...

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
How to install MySQL5 on SME7
« Reply #2 on: May 31, 2006, 10:04:05 AM »
Quote from: "DarkMirage"
Download and install:
Code: [Select]
wget \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysqlclient14-4.1.14-4.c4.i386.rpm \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-server-5.0.18-2.1.c4.i386.rpm \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-5.0.18-2.1.c4.i386.rpm
rpm -U \
mysql-5.0.18-2.1.c4.i386.rpm \
mysql-server-5.0.18-2.1.c4.i386.rpm \
mysqlclient14-4.1.14-4.c4.i386.rpm
Is there a special reason to install the 4.1.14 client and not the 5.0.18 client?
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)

DarkMirage

How to install MySQL5 on SME7
« Reply #3 on: May 31, 2006, 11:18:44 AM »
Quote from: "cactus"
Is there a special reason to install the 4.1.14 client and not the 5.0.18 client?


What 5.0.18 client? Didn't see it on http://dev.centos.org/centos/4/testing/i386/RPMS/

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
How to install MySQL5 on SME7
« Reply #4 on: May 31, 2006, 12:00:33 PM »
Quote from: "DarkMirage"
Quote from: "cactus"
Is there a special reason to install the 4.1.14 client and not the 5.0.18 client?


What 5.0.18 client? Didn't see it on http://dev.centos.org/centos/4/testing/i386/RPMS/
Sorry, did not have a look there. Normally MySQL ships a client with the same version number as the server, at least on their own site. I don't understand why it isn't on the Centos site...

MySQL hosts the RHEL 4 version of there RPMS itself, maybe they will work on SME Server as well. If I have the time I might give it a go.
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)

lexi

How to install MySQL5 on SME7
« Reply #5 on: May 31, 2006, 12:38:49 PM »
I followed the how to from mike_mattos, but webmail -horde is starting in the browser fatal error.

further i tried to install phpbb for mysql test and the install script said that the the php version doesn´t support the database type.

How can the problems fixed?

Offline mike_mattos

  • *
  • 313
  • +0/-0
How to install MySQL5 on SME7
« Reply #6 on: May 31, 2006, 04:58:55 PM »
the last 3 items in the how to relate to the horde issue, also the grant statement in the follow up!

I'll try to update this again with the lastest rpm's

BTW, I put in a lot of extra steps just to be sure everything was working/shutdown, this upgrade has been a real pain in the ass for working for a while for some features, and then failing!  So please let me know if you did the webmail test & repair I suggested
...

lexi

How to install MySQL5 on SME7
« Reply #7 on: June 01, 2006, 03:56:47 PM »
i tried it as decribed and executed

rm -f /etc/my.cnf.rpmnew
service mysqld restart

mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"  too

But webmail had fatal error.

DarkMirage

How to install MySQL5 on SME7
« Reply #8 on: June 01, 2006, 04:06:16 PM »
Could you tell us a little bit more about this fatal error?
(On screen and preferably from logs)

Offline Snoopyski

  • *
  • 141
  • +0/-0
    • http://www.serviceinfosg.com
How to install MySQL5 on SME7
« Reply #9 on: June 02, 2006, 11:40:45 PM »
Hello mike_mattos,

I try it and work fine for me !!!  :-D  :-D  :-D

But I di this command:

mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"

AND I don't di this command:

16 Reset per Charly Brady , destroys data!!
# cd /service/mysqld
# runsvctrl d .
# /etc/e-smith/events/actions/mysql-delete-db-files
# signal-event post-upgrade
# signal event reboot

After I go to the server-manager and click on REBOOT AND RECONFIGURE

So everything goes fine for the moment My eGroupWare application works  :-D  :-D  :-D

So I will be able now to use SynML with eGroupWare and Outlokk...

Thanks,

Snoopyski

Offline Snoopyski

  • *
  • 141
  • +0/-0
    • http://www.serviceinfosg.com
How to install MySQL5 on SME7
« Reply #10 on: June 03, 2006, 03:06:47 PM »
Hello

I found one BUG this morning in a eGroupWare module:

PHPSYSINFO

Quote

ERRORS
File    Line    Command    Message
common_functions.php    313    file_exists(/proc/loadavg)    the file does not exist on your machine
common_functions.php    313    file_exists(/proc/sys/kernel/hostname)    the file does not exist on your machine
common_functions.php    313    file_exists(/proc/version)    the file does not exist on your machine
common_functions.php    313    file_exists(/proc/uptime)    the file does not exist on your machine
common_functions.php    152    find_program(who)    program not found on the machine
common_functions.php    313    file_exists(/proc/net/dev)    the file does not exist on your machine
common_functions.php    313    file_exists(/proc/cpuinfo)    the file does not exist on your machine
common_functions.php    313    file_exists(/proc/pci)    the file does not exist on your machine
common_functions.php    340    is_dir(/proc/ide)    directory does not exist on your machine
common_functions.php    313    file_exists(/proc/scsi/scsi)    the file does not exist on your machine
common_functions.php    313    file_exists(/proc/bus/usb/devices)    the file does not exist on your machine
common_functions.php    313    file_exists(/proc/meminfo)    the file does not exist on your machine
common_functions.php    152    find_program(df)    program not found on the machine
common_functions.php    152    find_program(mount)    program not found on the machine


Any Idea ?

Thanks,

Snoopyski

DarkMirage

How to install MySQL5 on SME7
« Reply #11 on: June 03, 2006, 09:21:37 PM »
There seems to be some security in place keeping the web server process www confined to it's own directories. Meaning php can't read files in / or /proc,  or detect programs located in PATH or things like that.

Anyway, it's completely unrelated to MySQL, try a new thread if you wish to continue trying to resolve this...

Offline Snoopyski

  • *
  • 141
  • +0/-0
    • http://www.serviceinfosg.com
How to install MySQL5 on SME7
« Reply #12 on: June 03, 2006, 10:05:33 PM »
Yes ??????????

But works before the MySQL upgrade I think !!!

I will let you know...

A+

Snoopyski

Offline mike_mattos

  • *
  • 313
  • +0/-0
How to install MySQL5 on SME7
« Reply #13 on: June 04, 2006, 02:37:45 AM »
intersting glitch ;  if you stop mysql5 with
/etc/init.d/mysqld  stop

it appears to restart but you can;'t run a MySQL session, you get an error about the socket not working.

HOWEVER,
/etc/rc.d/init.d/supervise/mysqld stop
followed by
/etc/rc.d/init.d/supervise/mysqld start
repairs the problem
...

Offline mike_mattos

  • *
  • 313
  • +0/-0
How to install MySQL5 on SME7
« Reply #14 on: August 24, 2006, 01:50:32 AM »
http://dev.centos.org/centos/4/testing/i386/RPMS/*mysql* seem to have been deleted!

the Centos rpm's that CentOS 'yum update mysql' detects work fine on my CentOS 4 system, but won't install on SME! (dependencies!)

Prior to downloading from MySQL, am I missing something obvious?  I looked in centos/4 and in centos/4.3

thx all
...