EgoH
Jul 3 2003, 11:50 AM
Since this new version came out, which fixes a database corruption bug, i grab this chance to give you guys all the info to install mysql 4.
This HOWTO is for ensim. But most of the steps apply to plain servers also.
Well lets go on with it:
Grabbing all of the files.
CODE
cd /root
mkdir mysql4
cd mysql4
wget [url]ftp://mysql.secsup.org/pub/software/mysql/Downloads/MySQL-4.0/MySQL-server-4.0.13-0.i386.rpm[/url]
wget [url]ftp://mysql.secsup.org/pub/software/mysql/Downloads/MySQL-4.0/MySQL-client-4.0.13-0.i386.rpm[/url]
wget [url]ftp://mysql.secsup.org/pub/software/mysql/Downloads/MySQL-4.0/MySQL-devel-4.0.13-0.i386.rpm[/url]
We are getting the mysql3 shared rpm to prevent issues for programs using the mysql3 librarys.
CODE
wget [url]ftp://mysql.secsup.org/pub/software/mysql/Downloads/MySQL-3.23/MySQL-shared-3.23.57-1.i386.rpm[/url]
Now lets go installing it (it should start the mysql server also).
CODE
/sbin/service mysqld stop
rpm -Uvh --nodeps MySQL*.rpm
Now we need to to some mysql3->mysql4 converting
CODE
mysql_fix_privilege_tables mysqlrootpw
mysql mysql -u root -p
<enter the mysql root password>
update `user` set Create_tmp_table_priv = 'N', Lock_tables_priv = 'N' where user <> 'root';
flush privileges;
q
Let's fix the ensim mysql command also
CODE
ln -s /etc/rc.d/init.d/mysqld_app_init /etc/rc.d/init.d/mysqld
mkdir /var/run/mysqld
chown mysql:mysql /var/run/mysqld
/sbin/service mysql stop
/sbin/service mysqld start
rm -f /etc/rc.d/init.d/mysql
This should do it.
I tested this on 4 servers with ensim pro.
If you want to turn on query caching do this:
CODE
pico -w /etc/my.cnf
Add these lines under the [mysqld]:
(you can adjust the cache size)
CODE
set-variable = query_cache_type=1
set-variable = query_cache_size=16M
Do a mysql restart:
CODE
/sbin/service mysqld restart
mahmood
Jul 3 2003, 12:22 PM
dose this verison have some problem with ensim 3.1.11 , such as the previous vresion of mysql 4.0.1
EgoH
Jul 3 2003, 12:24 PM
QUOTE
Originally posted by mahmood
dose this verison have some problem with ensim 3.1.11 , such as the previous vresion of mysql 4.0.1
haven't tried this exact howto on a 3.1 server cause i don't have one.
You can contact me on below info to test it on your box.
jaume
Jul 3 2003, 01:50 PM
Upgraded some 3.1.11 boxes some days ago following a similar method ... almost identical. The only issue were sites getting into inconsistent state after editting due to the missing MySQL-shared-3.23.57-1.i386.rpm.
So install the shared rpm to avoid the inconsistent state issue if you are on 3.1.X box.
Will tests Egoh's steps right now on a test 3.1 box.
nsouto
Jul 3 2003, 06:11 PM
Hello,
I did the upgrade, and it worked fine, thanks, except that I have a problem with Ensim 3.5.10-12, in the mySQL admin area when adding new databases, it works, but when listing, it returns:
QUOTE
An error has occured:
Traceback (innermost last):
File /usr/lib/python2.2/site-packages/ZPublisher/Publish.py, line 171, in publish
File /usr/lib/python2.2/site-packages/ZPublisher/mapply.py, line 160, in mapply
(Object: form_mysqllistdb)
File /usr/lib/python2.2/site-packages/ZPublisher/Publish.py, line 112, in call_object
(Object: form_mysqllistdb)
File /home/build/qa/webppliance/3.5.0/48/lwp/naris48/WebGui/base/services/mysql/wp/site_mysql.py, line 245, in form_mysqllistdb
File /home/build/qa/webppliance/3.5.10/12/lwp/nitin12/WebGui/published/dtmlhelper.py, line 317, in __call__
(Object: HTML)
File /home/build/qa/webppliance/3.5.10/12/lwp/nitin12/WebGui/published/dtmlhelper.py, line 286, in __call__
(Object: HTML)
File /home/build/qa/webppliance/3.5.10/12/lwp/nitin12/WebGui/published/dtmlhelper.py, line 268, in _renderBlockList
File /home/build/qa/webppliance/3.5.10/12/lwp/nitin12/WebGui/published/dtmlhelper.py, line 264, in
File /home/build/qa/webppliance/3.5.10/12/lwp/nitin12/WebGui/published/dtmlhelper.py, line 202, in _render_dtmlfile
(Object: mysql_dblist)
File /usr/lib/python2.2/site-packages/DocumentTemplate/DT_String.py, line 540, in __call__
(Object: mysql_dblist)
File /usr/lib/python2.2/site-packages/DocumentTemplate/DT_Let.py, line 149, in render
(Object: dblist="ListDatabases(site)")
File /usr/lib/python2.2/site-packages/DocumentTemplate/DT_In.py, line 719, in renderwob
(Object: dblist)
File /usr/lib/python2.2/site-packages/DocumentTemplate/DT_Let.py, line 149, in render
(Object: dbname=sequence-item)
File /usr/lib/python2.2/site-packages/DocumentTemplate/DT_Util.py, line 339, in eval
(Object: db_space_consumed(dbname))
(Info: db_space_consumed)
File , line 0, in ?
File /home/build/qa/webppliance/3.5.0/48/lwp/naris48/WebGui/base/services/mysql/mysql.py, line 48, in db_space_consumed
File //usr/lib/python2.2/ConfigParser.py, line 250, in readfp
File //usr/lib/python2.2/ConfigParser.py, line 472, in __read
ParsingError: File contains parsing errors: /etc/my.cnf [line 4]: 'skip-lockingn' [line 5]: 'skip-innodbn' [line 25]: 'log-binn' [line 38]: 'quick n' [line 42]: 'no-auto-rehash n' [line 58]: 'interactive-timeoutn'
And also when trying to delete the database with phpMyAdmin 2.5.1, it returns an: Error on delete of './database' (Errcode: 13)
Anyone have this problem, or knows how to fix it ??
Thank You
Nuno Souto
nsouto
Jul 3 2003, 09:11 PM
Well regarding my last post:
I don't exactly know how or why, I did so many things I lost track of it, but I think I'ts working now, and this is what I did more or less:
I uninstalled MySQL 4, reinstalled MySQL 3, uninstalled MySQL 3, installed MySQL 4, and after that it started working, then PHP stopped working, so I had to get the rpm from MySQL 3 called: MySQL-shared-3.23.56-1.3.0.i386.rpm, and extracted two files out of it: libmysql.so.10.0.0 and libmysql_r.so.10.0.0, then I copied them over to /usr/lib/ and ln -s libmysql.so.10 and ln -s libmysql_r.so.10 to them.
An that made it work, or at least it looks like it, although PHPINFO() returns MySQL API 3.23.56, and phpMyAdmin reports MySQL 4.
Now one question is how do I get PHP to load the libmysql.so.12 of MySQL 4, I have PHP 4.3.2 installed from gpan's RPM.
Another question a little of this topic, but if anyone has the answer please email, or pm me - I have the 1.3 CEL 1Gig RAM, and I'm always almost out of memory and into the swap ?? this is a new box with only 11 sites, and almost all used primarily for email, right now.
One more thing, regarding the phpMyAdmin error, it didn't get fixed, so I manualy delete the databases at /var/lib/mysql .
Nuno Souto
mahmood
Jul 4 2003, 05:02 AM
what about this assue
QUOTE
You should be aware that after upgrading to MySQL 4, ensim will not be able to add databases when you add a new account. You must create them manually. Again - ensim 3.1.8 and below do NOT detect the presence of MySQL 4 and will NOT create accounts automatically. This isn't a big deal if you are like me and like to do things manually anyway. Hopefully the next version of ensim will offer compatability with MySQL 4.
EgoH
Jul 4 2003, 07:20 AM
QUOTE
Originally posted by nsouto
Hello,
I did the upgrade, and it worked fine, thanks, except that I have a problem with Ensim 3.5.10-12, in the mySQL admin area when adding new databases, it works, but when listing, it returns:
And also when trying to delete the database with phpMyAdmin 2.5.1, it returns an: Error on delete of './database' (Errcode: 13)
Anyone have this problem, or knows how to fix it ??
Thank You
Nuno Souto
This hasn't got anything to do with the mysql 4 upgrade itself.
You modified your my.cnf with skip-locking etc.
Remove those lines and ur fine. (pretty clear from reading the error)
Proetorian
Jul 4 2003, 08:25 AM
QUOTE
Originally posted by mahmood
dose this verison have some problem with ensim 3.1.11 , such as the previous vresion of mysql 4.0.1
I've been using 4.0.13 with ensim 3.1.11 ever since it came out, over a month ago. No problems here at all.
amp3dmoshpit
Jul 4 2003, 09:30 AM
I got everything running smooth. Upgraded a 3.1.11 box in less than 3 mins. Didn't need to install the shared rpm either, control panel works fine. I did have problems with this command:
update `user` set Create_tmp_table_priv = 'N', Lock_tables_priv = 'N' where user <> 'root';
flush privileges;
I got a lot of errors about admin not existing. But everything seems to work fine.
amp3dmoshpit
Jul 4 2003, 09:42 AM
I restarted httpd hoping it would update the MySQL API line in phpinfo() but now mysql doesn't work. I get 'cannot load mysql extension', so i rebooted the server. Now MySQL API line reads
Client API version 3.23.57
yet when i type
[root@ensim root]# mysql -V
mysql Ver 12.20 Distrib 4.0.13, for pc-linux (i686)
so whats going on. I assume I am running 4.0.13.
The DareDevil
Jul 4 2003, 01:10 PM
QUOTE
Originally posted by amp3dmoshpit
I restarted httpd hoping it would update the MySQL API line in phpinfo() but now mysql doesn't work. I get 'cannot load mysql extension', so i rebooted the server. Now MySQL API line reads
Client API version 3.23.57
yet when i type
[root@ensim root]# mysql -V
mysql Ver 12.20 Distrib 4.0.13, for pc-linux (i686)
so whats going on. I assume I am running 4.0.13.
Everything is working fine on my server but phpinfo() is listing different MySQL version numbers too. It's even stating that I'm running PHP422, when I'm really running 432!
I'd like to get to the bottom of this.
jaume
Jul 4 2003, 01:36 PM
QUOTE
Originally posted by amp3dmoshpit
I restarted httpd hoping it would update the MySQL API line in phpinfo() but now mysql doesn't work. I get 'cannot load mysql extension', so i rebooted the server. Now MySQL API line reads
Client API version 3.23.57
yet when i type
[root@ensim root]# mysql -V
mysql Ver 12.20 Distrib 4.0.13, for pc-linux (i686)
so whats going on. I assume I am running 4.0.13.
I think you need to install the shared RPM. I have had to install it on all the 3.1.X systems to get rig of errors on the ensim when dealing with mysql and the 'cannot load mysql extension' when restating apache from commandline.
EgoH
Jul 4 2003, 04:07 PM
In the phpinfo it WON't update.
The php is compiled with the old mysql3 client files.
If you want it to show mysql4 you need to recompile your php after you installed mysql4.
The DareDevil
Jul 4 2003, 05:11 PM
QUOTE
Originally posted by jaume
I think you need to install the shared RPM. I have had to install it on all the 3.1.X systems to get rig of errors on the ensim when dealing with mysql and the 'cannot load mysql extension' when restating apache from commandline.
I had to install the shared RPMs on my 3.5 box too.
The DareDevil
Jul 4 2003, 05:12 PM
QUOTE
Originally posted by EgoH
In the phpinfo it WON't update.
The php is compiled with the old mysql3 client files.
If you want it to show mysql4 you need to recompile your php after you installed mysql4.
Okay, makes sense to me. But I'm still not sure about why it's showing 422 as my php version, thought the two may be related =/
nkoo1
Jul 4 2003, 08:47 PM
I am running Ensim 3.1.11-2 with phpmyadmin 2.2 and tried upgraded mysql to 4.0.13., ending up restored the box. If you know exactly what you're doing then you can try upgrading it, otherwise, leave it alone. It was a pain in the??? try to figure out what went wrong; nothing works togheter. Mysql server was running alright! but The ensim had problem when create or delete a site, and PHPmyadmin is not working after upgrade even upgrading it to v2.51.
After all the mess I couldn't get it fixed then I decided to reinstall the old version back, and it's still not working right. Finally, I had to get my box restore and now I am afraid to experience anything like that. You can try it if your box is not in production nor hosting any site.
Good luck!
Let me know if you successful upgraded mysql with the same configuration.
amp3dmoshpit
Jul 4 2003, 10:54 PM
I have the same config as you, ensim 3.1.11, php, and mysql. My phpmyadmin was already 2.5.1. I believe you need atleast 2.4 for mysql 4.0.x, but not sure. It was a smooth install for me. I did have probs doing the command line restart of httpd, but I installed the other rpm package that was listed in the howto and now all is fine. I am now looking to install php 4.3.3 rc1. Has anyone been successful on an ensim box? BTW...i would highly recommend this upgrade if you currently use MySQL-3.x.xx as the query cache on saves a ton on the servers load.
EgoH
Jul 5 2003, 02:41 AM
QUOTE
Originally posted by The DareDevil
Okay, makes sense to me. But I'm still not sure about why it's showing 422 as my php version, thought the two may be related =/
Ever heard of high security mode in ensim?
Your php install doesn't update that.
Coach
Jul 5 2003, 04:07 PM
Tested on a test box and went smoothly and is seems to be running fine on production servers running Ensim 3.1.10. Looks to be no need of the shared RPM at this point.
Thanks EgoH.
EDIT: A *huge* drop in server load since the install. Went from .27 on one box to .02 right now.
I'm interested in seeing how this goes on Monday because traffic is down this weekend.
nkoo1
Jul 5 2003, 04:39 PM
QUOTE
Originally posted by Coach
Tested on a test box and went smoothly and is seems to be running fine on production servers running Ensim 3.1.10. Looks to be no need of the shared RPM at this point.
Thanks EgoH.
EDIT: A *huge* drop in server load since the install. Went from .27 on one box to .02 right now.
I'm interested in seeing how this goes on Monday because traffic is down this weekend.
I am glad you did. Did you have to upgrade your phpmyadmin? and did you have to fix anything after upgrade and did you try to add or delete a site after to see if there's any error might occur.
EgoH
Jul 5 2003, 06:24 PM
I do recommend upgrading phpmyadmin.
The stock phpmyadmin is pretty old, could have difficulties with newer mysql.
nkoo1
Jul 5 2003, 07:46 PM
Is there any instruction on upgrading the stock phpmyadmin without causing any error?
TrueBart
Jul 5 2003, 10:01 PM
Ok, I can no longer start up mySQL from Ensim anymore. I could do this fine on 4.0.12 though.
amp3dmoshpit
Jul 5 2003, 10:07 PM
I have done several updates to phpmyadmin on a 4.0.x box and never any probs. Currently running 2.5.1 with no probs.
QUOTE
Originally posted by EgoH
I do recommend upgrading phpmyadmin.
The stock phpmyadmin is pretty old, could have difficulties with newer mysql.
Coach
Jul 6 2003, 03:49 AM
Okay, a problem now. After Ensim ran it's updates at 4 am, everything to do with MySQL is hosed.
In PHPMyAdmin
cannot load MySQL extension,
please check PHP Configuration.
Documentation
On forums... either a blank page comes up (on phpBB) or problems with vBulletin like this.
Fatal error: Call to undefined function: mysql_connect() in /home/virtual/site6/fst/var/www/html/forums/admin/db_mysql.php on line 40
Using Ensim 3.1.10, PHP 4.3.2, PHPMyAdmin 2.5.1.
So, it doesn't make sense that this was a fix, but here's what I did and the problem seems to be resolved for the moment.
Added the shared RPM.
Still didn't work.
restarted mysqld
No dice
restarted httpd
No dice, but at this point, mysql had failed.
restarted mysqld again
Everything is back to normal.
I'm *really* hoping that we don't have to do this every morning after Ensim runs its updates.
EgoH
Jul 6 2003, 05:54 AM
If your mysql isn't starting make sure you do the following steps:
service mysqld stop
killall -9 safe_mysqld
killall -9 mysqld
ps aux
(make sure you don't see any mysql processes anymore)
then start mysql:
service mysqld start
Coach
Jul 6 2003, 11:52 PM
Sorry, should have clairified that in my post above. The work around was to not restart MySQL but to stop then start it.
Thanks EgoH.
nkoo1
Jul 7 2003, 12:42 AM
just wonder about the steps in the instruction. Does the old mysql has to be stopped and removed first before installing the new rpm package?
jaume
Jul 7 2003, 12:53 AM
In the how-to theres a step that stops mysql before installing the RPM's. No need to uninstall the old mysql.
For those installing this on 3.1.X ensims ... it's recommended to upgtrade first to ensim 3.1.11. If you install mysql4 and then attempt to upgrade ensim to latest 3.1.11 you'll need to exclude mysql rpm's from the 3.1.11 upgrade.
EgoH
Jul 7 2003, 01:56 AM
QUOTE
Originally posted by Coach
Sorry, should have clairified that in my post above. The work around was to not restart MySQL but to stop then start it.
Thanks EgoH.
Yes it is very, very very important not to do a restart.
If you look closely, it is using mysql file to stop and he mysqlD file to start.
Using the mysqld to stop will result in zombie mysql processes which cause the "mysql won't start" problems.
This is cause of the auto start features in the mysql rpm install.
Ensim uses other mysql start files then default mysql installation, so you have to reconfigure the mysqld ensim uses.
phinsup
Jul 7 2003, 03:49 AM
Edit: spoke too soon LOL playing with it now.
Coach
Jul 7 2003, 11:46 AM
Just an update... Ensim 3.1.10 ran through its processes this morning and everything was fine. So it does look like this is a safe install for at least 3.1.10 and up.
TrueBart
Jul 7 2003, 06:05 PM
How come Ensim still shows that MySQL is always down and cannot connect to it when adding sites?
Coach
Jul 7 2003, 11:02 PM
What Ensim version truebart?
nkoo1
Jul 8 2003, 12:33 AM
Ok...I just did the upgrade...everything went smooth as I follow the instruction exactly. There's some duplicated error when I ran mysql_fix_privileges_tables but there's also a comment after each error said" you can ignore the duplicated error. So, I didn't worry about it much and kept going to the next step.....
The website and phpMyadmin 2.51 work great after upgrade.
Try add website with Mysqldatabase .....Ooop...a lots of error...phpMyadmin and mysql stop working.
Apply the mysql3_shared rpm....
Restart everything mysql, httpd, webppliance.
Delete the site which weren't successfully added
re-add the site again without mysql database..everything working fine...
Anyway....that were everything I 've done to my box ensim 3.1.11-2 with phpMyadmin 2.5.1.
All credits should go to Egoh.
Thanks!
jaume
Jul 8 2003, 01:49 AM
Only issue on 3.1.11 is that ensim does not create the mysql database for the new domains . Always complains:
mysql - Install service
(WARNING):The database domainname_com already exists.
And database is not created.
nkoo1
Jul 8 2003, 01:59 AM
Can I still check the option Mysql username when adding the new site? That way the owner of the site can change the mysql password and have a direct link to Myadmin page.
Marcus Wendel
Jul 8 2003, 02:22 AM
QUOTE
Originally posted by Coach
Okay, a problem now. After Ensim ran it's updates at 4 am, everything to do with MySQL is hosed.
In PHPMyAdmin
cannot load MySQL extension,
please check PHP Configuration.
Documentation
On forums... either a blank page comes up (on phpBB) or problems with vBulletin like this.
Fatal error: Call to undefined function: mysql_connect() in /home/virtual/site6/fst/var/www/html/forums/admin/db_mysql.php on line 40
Using Ensim 3.1.10, PHP 4.3.2, PHPMyAdmin 2.5.1.
I've got the same problem running 3.1.11. Any ideas on how to resolve this?
When I restart httpd I get this:
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/mysql.so' - libmysqlclient.so.10: cannot open shared object file: No such file or directory in Unknown on line 0
btw. This mess started after the Ensim upgrade.
Thanks.
/Marcus
jaume
Jul 8 2003, 02:30 AM
QUOTE
Originally posted by Marcus Wendel
I've got the same problem running 3.1.11. Any ideas on how to resolve this?
When I restart httpd I get this:
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/mysql.so' - libmysqlclient.so.10: cannot open shared object file: No such file or directory in Unknown on line 0
btw. This mess started after the Ensim upgrade.
Thanks.
/Marcus
Have you installed the shared RPM ?
Marcus Wendel
Jul 8 2003, 02:41 AM
QUOTE
Originally posted by jaume
Have you installed the shared RPM ?
Yes, I've installed as below:
rpm -Uvh --nodeps MySQL-shared-4.0.13-0.i386.rpm
/Marcus
Marcus Wendel
Jul 8 2003, 02:47 AM
I reinstalled the MySQL-shared-3.23.57-1.i386.rpm and now it works :-)
/Marcus
nsouto
Jul 8 2003, 05:47 AM
Hello,
I'm having a problem with mySQL and Ensim 3.5.10-12, in which I can't use it with High Security Sites, I'm not sure wether it worked before the upgrade or not... But I'm getting this error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Any help on this or will I have to make every site 3.1 Compatible ?
Thank You
Nuno Souto
EgoH
Jul 8 2003, 06:15 AM
QUOTE
Originally posted by nsouto
Hello,
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
That isn't caused by the mysql4 upgrade.
You need to use 127.0.0.1 as your mysql host, not localhost.
nsouto
Jul 8 2003, 06:23 AM
thanks.. it worked...
The DareDevil
Jul 8 2003, 06:26 AM
QUOTE
Originally posted by EgoH
Ever heard of high security mode in ensim?
Your php install doesn't update that.
Aha...
Well... Then the upgrade doesn't do us much good, does it?
MySQL4 is running very well by the way.
chrissicom
Jul 8 2003, 06:47 AM
I could install MySQL 4.0.13 in combination with Ensim 3.5.10-12 without any problems. Although I highly suggest not the install the regular shared lib but the compat-shared lib which included the MySQL 3 libs.
I do not suggest to try to install MySQL 4.0.13 on an Ensim 3.1.x box unless you very well know what you are doing. I had lots of problems without Ensim Pro.
TrueBart
Jul 8 2003, 07:29 AM
QUOTE
Originally posted by Coach
What Ensim version truebart?
3.1.11-2
chrissicom
Jul 8 2003, 08:15 AM
QUOTE
Originally posted by EgoH
That isn't caused by the mysql4 upgrade.
You need to use 127.0.0.1 as your mysql host, not localhost.
Right, MySQL has nothing to do with that. I could only use localhost with Ensim 3.1.x in the Pro version only 127.0.0.1 worked, no matter which MySQL I installed.
EgoH
Jul 8 2003, 08:37 AM
QUOTE
Originally posted by chrissicom
I could install MySQL 4.0.13 in combination with Ensim 3.5.10-12 without any problems. Although I highly suggest not the install the regular shared lib but the compat-shared lib which included the MySQL 3 libs.
I do not suggest to try to install MySQL 4.0.13 on an Ensim 3.1.x box unless you very well know what you are doing. I had lots of problems without Ensim Pro.
I updated the howto not to use mysql4 shared but only the mysql3 shared.
This cause enim 3.1.X needs the file and 3.5 needs it for command line php and some others things.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.