Help - Search - Members - Calendar
Full Version: [HOWTO] Upgrade to MySQL 4.0.12-0 (ensim)
The Planet Forums > Control Panels > Ensim > Ensim HOWTOs
Pages: 1, 2, 3, 4, 5
Mr_Pink
QUOTE
In that case you could install them again (the 4.0.12) and then remove them then your sure it's gone.

But still curious what those major problems to you are...


Thanks very much for that tip, I'll try that. Is there a switch I add to force it to install regardless of what is already there?
EgoH
--force should be enough if it doesn't install normally..
Mr_Pink
Thanks EgoH

I think I am going to wait a while before I take 4.0.12 off. I am interested to hear whether you can change the MySQL password from Ensim.

Both as "System Admin" and as "Site Admin", Ensim throws up errors for me. I can live without "System Admin".
EgoH
QUOTE
Originally posted by Mr_Pink
Thanks EgoH

I think I am going to wait a while before I take 4.0.12 off.  I am interested to hear whether you can change the MySQL password from Ensim.

Both as "System Admin" and as "Site Admin", Ensim throws up errors for me. I can live without "System Admin".


Weerd the change password in siteadmin works fine here....
You ran the mysql_fix_privelige_tables command?
Mr_Pink
Yes. That's the first thing I did once installed.
Hoojx
Mr_Pink :

# rpm -qa | grep MySQL

Note it is 'MySQL' (not all lowercase)
Mr_Pink
Neato. Thanks for that. I need to pay attention to case.
Karateka
Two things I noticed after upgrading several ensim servers.
some applications rely on /etc/rc.d/init.d/mysqld, but for 4.0.12 it is actually /etc/rc.d/init.d/mysql.
Symlinking it solved it for me.
Another issue I noticed is that users get permissions to create temp tables and lock tables globally, which will cause all databases to show up on phpmyadmin.
Doing this query in the mysql database named mysql on the server should fix this:
UPDATE user SET Create_tmp_table_priv='N', Lock_tables_priv='N'

To enable innodb it seems to be enough to comment out these two lines in /etc/my.cnf (see one of the earlier postings for an example):
Change
skip-locking
skip-innodb
to
#skip-locking
#skip-innodb

A minor issue is that it says in the how to:

QUOTE
/usr/local/sim/sim -j


Next we need to figure out which MySQL RPMs to remove. You want to remove mysql, mysql-server and mysql-devel. You can get the exact names via:
rpm -qa | grep mysql


I would do both of that before you shut down the tables, as this saves you some seconds / minutes of downtime if you know the rpm names and won't have to look them up after you shut down your servers.
Sim should be disabled before you shut down the servers too, as it has the habit to check a service exactly in the very moment when you don't want it to happen, i.e. right after you stopped httpd or mysqld. icon_smile.gif
Thanks for the great info!
ClayGP
QUOTE
Originally posted by Karateka
Two things I noticed after upgrading several ensim servers.
some applications rely on /etc/rc.d/init.d/mysqld, but for 4.0.12 it is actually /etc/rc.d/init.d/mysql.
Symlinking it solved it for me.
Another issue I noticed is that users get permissions to create temp tables and lock tables globally, which will cause all databases to show up on phpmyadmin.
Doing this query in the mysql database named mysql on the server should fix this:
UPDATE user SET Create_tmp_table_priv='N', Lock_tables_priv='N'

To enable innodb it seems to be enough to comment out these two lines in /etc/my.cnf (see one of the earlier postings for an example):
Change
skip-locking
skip-innodb
to
#skip-locking
#skip-innodb

A minor issue is that it says in the how to:

 

I would do both of that before you shut down the tables, as this saves you some seconds / minutes of downtime if you know the rpm names and won't have to look them up after you shut down your servers.
Sim should be disabled before you shut down the servers too, as it has the habit to check a service exactly in the very moment when you don't want it to happen, i.e. right after you stopped httpd or mysqld. icon_smile.gif
Thanks for the great info!


I think you mean:

CODE
update  `user` set Create_tmp_table_priv = 'N', Lock_tables_priv = 'N' where user <> 'root'
aussie
After you do all of the above visit http://forum.rackshack.net/showthread.php?...ht=mysql+4.0.12 to optimize it!
slick
Users can now see all database names yet not access them. Any way to stop them from showing?

Also for the mysql creation problem. It can be solved by using virtDomain.sh. I will use php and have it create the database as ensim would.
aussie
QUOTE
Originally posted by slick
Users can now see all database names yet not access them. Any way to stop them from showing?

Also for the mysql creation problem. It can be solved by using virtDomain.sh.  I will use php and have it create the database as ensim would.


Didnt you read my howto on optimizing 4.0.12? Maybe you should! Your problem is you have not upgraded the priv tables. Read the howto!!

http://forum.rackshack.net/showthread.php?...&threadid=20983
EgoH
QUOTE
Originally posted by slick
Users can now see all database names yet not access them. Any way to stop them from showing?

Also for the mysql creation problem. It can be solved by using virtDomain.sh.  I will use php and have it create the database as ensim would.


All those problems already are known and patches for.
Look though this topic..
slick
QUOTE
Originally posted by aussie
Didnt you read my howto on optimizing 4.0.12? Maybe you should! Your problem is you have not upgraded the priv tables. Read the howto!!

http://forum.rackshack.net/showthread.php?...&threadid=20983

I did run it, and it did come with errors and the thread said it was normal.

mysql_fix_privilege_tables PASS
EgoH
QUOTE
Originally posted by slick
I did run it, and it did come with errors and the forum said to skip it.


Yes when you run it it gives some erros, no harm....
Look back in the thread to find the all databases seeing off solution
slick
I ran that aswell.
You are refering to
update `user` set Create_tmp_table_priv = 'N', Lock_tables_priv = 'N' where user <> 'root'
correct?
EgoH
QUOTE
Originally posted by slick
I ran that aswell.
You are refering to
update  `user` set Create_tmp_table_priv = 'N', Lock_tables_priv = 'N' where user <> 'root'
correct?


yes after that reload of restart your mysql and your users can't see all database anymore, ofcourse if you applied the fix_privilege script first..
slick
I did both and no go.
I checked the privilages in mysql users and they still have
CREATE TEMPORARY TABLES, LOCK TABLES


Fixed it, All resolved.
Hoojx
It is not a big problem but when I went to edit a site and change the site name from www1.domain.com to www2.domain.com, I get this error :

Failed to rename database to www1_domain_com: database not found

And the site is now in an inconsistent state. (the mysql option is not selected)

So, is this one of the problems of MySQL4 with Ensim too ? Is it able to uninstall MySQL4 and install back the latest version of MySQL3 ?

Thanks.
cheater
I did the optimization used the my.cnf info and restarted mysql and still dont get anything when doing SHOW VARIABLES LIKE 'mysql_query_cache'.
cheater
This fix /usr/bin/python2.1 /usr/lib/opcenter/mysql/create_db.pyc ${1/./_} doesnt work with subdomains (2x .). So how to fix that?
EgoH
QUOTE
Originally posted by cheater
This fix /usr/bin/python2.1 /usr/lib/opcenter/mysql/create_db.pyc ${1/./_} doesnt work with subdomains (2x .). So how to fix that?

/usr/bin/python2.1 /usr/lib/opcenter/mysql/create_db.pyc `echo $1 | tr '.' '_'`

Didn't know that one replace method only did it for one.
deVisie
QUOTE
Originally posted by EgoH
Ok guys here are the fixes:

pico -w /etc/appliance/customization/virtDomain.sh
Add this to bottom of file:
CODE
/usr/bin/python2.1 /usr/lib/opcenter/mysql/create_db.pyc `echo $1 | tr '.' '_'`

This will make sure the user database gets created for a new site.


This doesn't appear to be working for me, after adding a reseller/domain the database is not created and an error stated that the database already exists (and i'm sure that it is NOT).

QUOTE
Now the problem that mysql doesn't showup and start correctly with ensim.

cd /etc/rc.d/init.d/
mv mysql mysql.bak
wget http://srv01.deluxhosting.com/mysql
chmod 755 mysql

Make a symlink for mysqld:
ln -s /etc/rc.d/init.d/mysql mysqld

Now the status should be ok in ensim, and you can stop,start and restart with it again. [/B]


Yep, this worked like a charm icon_smile.gif

And for the rest, it took me a while to upgrade MySQL, php and phpMyAdmin all together, but alteast now everything is uptodate and running like thunder! icon_biggrin.gif
EgoH
QUOTE
Originally posted by deVisie
This doesn't appear to be working for me, after adding a reseller/domain the database is not created and an error stated that the database already exists (and i'm sure that it is NOT).


You will still get that error, however the database should be created....
deVisie
QUOTE
Originally posted by EgoH
You will still get that error, however the database should be created....


How come i can't see the database from within phpMyAdmin, also there is no such database dir in the /var/lib/mysql root?

I do see the user i specified while creating a new site though, and it appears to be connected to the domainname_com, but when i check the databases it's not there.
EgoH
QUOTE
Originally posted by deVisie
How come i can't see the database from within phpMyAdmin, also there is no such database dir in the /var/lib/mysql root?

I do see the user i specified while creating a new site though, and it appears to be connected to the domainname_com, but when i check the databases it's not there.


Does the database get created when you use this in ssh?:
/usr/bin/python2.1 /usr/lib/opcenter/mysql/create_db.pyc `echo domain.com | tr '.' '_'`
deVisie
QUOTE
Originally posted by EgoH
Does the database get created when you use this in ssh?:
/usr/bin/python2.1 /usr/lib/opcenter/mysql/create_db.pyc `echo domain.com | tr '.' '_'`


Yes, this works just fine.
digitalbackbone
I am wondering if I can setup the new version for a single "virual server" on my server or if it has to be system wide, can anybody help with this?
Netwerk
My heart is still pounding..... but it worked! Thanks guys!!!
stlracing
I know it somewhat says how to fix this in this post, but I can't get it to work.

I get this error on loading a php page:

Fatal error: Call to undefined function: mysql_connect() in /home/virtual/site1/fst/var/www/html/forums/admin/db_mysql.php on line 40


I get this error starting httpd

[root@svr01 temp]# httpd start
Processing config directory: /etc/appliance/apacheconf
Processing config file: /etc/appliance/apacheconf/apache
Processing config directory: /etc/httpd/conf/virtual
Processing config file: /etc/httpd/conf/virtual/site1
Processing config directory: /etc/httpd/conf/site1
Processing config file: /etc/httpd/conf/site1/0sqmail
Syntax error on line 5 of /etc/httpd/conf/site1/0sqmail:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration

also, i had upgraded php to 4.3.1 a few weeks ago.


Server is down, I need some help fast...
stlracing
QUOTE
Originally posted by Edgewize
If your PHP no longer connects to mysql, and/or you get warnings about [b]libmysqlclient.so.10, here's a fix:

Go to http://www.mysql.com/downloads/mysql-3.23.html and download the RPM for "Dynamic Client Libraries" (it should be named MySQL-shared-3.23.56-1.i386.rpm).

Run this command:
rpm -ivh --force --oldpackage MySQL-shared-3.23.56-1.i386.rpm

Then re-install your MySQL 4.0 shared rpm (use -i not -U):
rpm -ivh --force MySQL-shared-4.0.12-0.i386.rpm

Problem solved.  You now hae both the old and new mysql client libraries available. [/B]


Doing this appears to have fixed my problem....
stlracing
Everything seems to be running fine, when I do the command: mysql -V in shows mysql Ver 12.18 Distrib 4.0.12, for pc-linux (i686)

However when I do a phpinfo file in a browser, it shows 3.23.56

Anyone shed any light on this?
EgoH
QUOTE
Originally posted by stlracing
Everything seems to be running fine, when I do the command: mysql -V in shows mysql  Ver 12.18 Distrib 4.0.12, for pc-linux (i686)

However when I do a phpinfo file in a browser, it shows 3.23.56

Anyone shed any light on this?


php is still using the 3.23.56 client files.
You will have to recompile php in order to have this updated also
stlracing
recompile or just reinstall the RPM files for php4.3.1?

If I reinstall using the RPM files which command do I use?

rpm -Uvh

or

rpm -Fvh

or

rpm -ivh


Also, do I need to remove some other rpm's first. I have 4.3.1 from the HOWTO: that is on this forum.
EgoH
QUOTE
Originally posted by stlracing
recompile or just reinstall the RPM files for php4.3.1?

If I reinstall using the RPM files which command do I use?

rpm -Uvh  

or

rpm -Fvh

or  

rpm -ivh  


Also, do I need to remove some other rpm's first. I have 4.3.1 from the HOWTO: that is on this forum.


No, cause the rpm is made with the mysql 3 package.
Anyways i don't see any reason why you would want to update this.
stlracing
I'm a newbie, I just wanted to make sure I'm getting the full benefits of MYSQL 4.0.12
Amygdala
Does phpinfo not showing the correct version of MySQL being used in the above case actually affect the performance of using 4? Or are we actually still seeing all the benifits (query caching etc) and it's just that PHP info doesn't realise it?
EgoH
QUOTE
Originally posted by Amygdala
Does phpinfo not showing the correct version of MySQL being used in the above case actually affect the performance of using 4?  Or are we actually still seeing all the benifits (query caching etc) and it's just that PHP info doesn't realise it?


Yes that's all server based.
The client doesn't matter for it.
naramation
This is great, thank you very much! icon_biggrin.gif

One issue: users can see all the databases. Even though they can't get to them, I'd like to prvent them from knowing the names of others'. What did you do to fix this?
EgoH
QUOTE
Originally posted by naramation
This is great, thank you very much! icon_biggrin.gif

One issue:  users can see all the databases.  Even though they can't get to them, I'd like to prvent them from knowing the names of others'.  What did you do to fix this?

CODE
update  `user` set Create_tmp_table_priv = 'N', Lock_tables_priv = 'N' where user <> 'root';

flush privileges;


Mentioned on the 4th page of this topic.
naramation
I did that, and reloaded mysqld and httpd. Didn't seem to solve it.
naramation
On second thought, what database should I select before running that query?
EgoH
QUOTE
Originally posted by naramation
On second thought, what database should I select before running that query?


the "mysql" db icon_smile.gif
naramation
:

Thanks for your help icon_smile.gif
ucm
I read a few times in this thread about using the old mysql 3.23 along side the new mysql 4.0.12.......

thing is that I would rather not use the old version stuff at all ( dont like going backwards, lol )...

on a side note, the status fix for ensim worked great for me, thanx EgoH!


my issue right now is the Call to undefined function: mysql_connect() and phpmyadmin 2.2.0 doesn't come up now, it's just a blank white background....


what's the purpose of using the Dynamic client libraries and why wouldn't it be installed with the new mysql 4 if it is needed to access mysql to begin with??

one would assume that anything needed for php to run on the new mysql ver 4 would be included in the ver 4 release....


any ideas or comments?
ucm
QUOTE
Originally posted by Edgewize [/i]
If your PHP no longer connects to mysql, and/or you get warnings about libmysqlclient.so.10, here's a fix:

Go to http://www.mysql.com/downloads/mysql-3.23.html and download the RPM for "Dynamic Client Libraries" (it should be named MySQL-shared-3.23.56-1.i386.rpm).

Run this command:
rpm -ivh --force --oldpackage MySQL-shared-3.23.56-1.i386.rpm

Then re-install your MySQL 4.0 shared rpm (use -i not -U):
rpm -ivh --force MySQL-shared-4.0.12-0.i386.rpm

Problem solved. You now hae both the old and new mysql client libraries available.  


I just tried this with:

CODE
root # su -

root # cd mysql

root # wget [url]ftp://mysql.secsup.org/pub/software/mysql/Downloads/MySQL-3.23/MySQL-shared-3.23.56-1.i386.rpm[/url]

root # rpm -ivh --force --oldpackage MySQL-shared-3.23.56-1.i386.rpm

root # wget [url]ftp://mysql.secsup.org/pub/software/mysql/Downloads/MySQL-4.0/MySQL-shared-4.0.12-0.i386.rpm[/url]

root # rpm -ivh --force MySQL-shared-4.0.12-0.i386.rpm


and then stoped and restarted mysql in ensim and it still brings up the Call to undefined function: mysql_connect() error...

:-/
ucm
FIX:

Once I installed the shared rpms for both vers of mysql, i stoped and restarted ONLY mysql in ensim and nothing happened...

I JUST went back into ensim on a hunch and followed this process:

1: Stop Apache
2: Stop MySQL
3: Start Apache ( NOT restart )
4: Start MySQL ( NOT restart )

and wualla, mysql 4.0.12 is up now ^_^

I still think that we shouldn't have to go through all this time, effor, and trouble to get mysql upgraded like this... i mean having to install something from and earlier version Just to get the newer version to work is kinda...well...odd

you'd think they would have put anything that the new ver would need to work right in the new ver itself....
Amygdala
I had the exact same problem ucm. It worked for me too. The performance improvements for my hand rolled forum were worth the panic, as it'll extend the life of my poor 1.3 celery a bit more now icon_smile.gif
ucm
Niiice, Amygdala!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.