mysql 4.0 and cpanel new installation

heavypredator

Well-Known Member
May 2, 2003
93
1
158
I see that with new cpanel installations we dont have mysql 4.0 opion in whm anymore.

Im planning server upgrade but i still want to use mysql 4.0 - anyone know how to do this?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,465
30
473
Go on, have a guess
You would have to do this before creating any MySQL d/b's:

edit /var/cpanel/cpanel.config and set mysql-version=4

Run /scripts/mysqlup --force
 

heavypredator

Well-Known Member
May 2, 2003
93
1
158
thx

another problem may be that i will get rhe4 and will have to update to 4.1

i heard much about characters encoding in 4.1 - when updating mysql to 4.1 how can i chose what encoding will be used durning update?
 

katmai

Well-Known Member
Mar 13, 2006
564
3
168
Brno, Czech Republic
if you get a brand new server why don't you do mysql 5 ? you will be going on a brand new stable software with no need to upgrade to anything in the near future... my opinion
 

elix

Well-Known Member
Jan 18, 2005
67
0
156
MySQL 5 doesn't work with a fair amount of applications, even still. Though it's fine if you're just running some of your own sites and not any clients (who would complain if their sites break ;)).

Though, I definitely would not recommend 4.0.x. 4.1.x is the version to run if you want a stable solution, IMHO. If you are moving from another server there should not be any problems and I don't think there are any character encoding problems either, but feel free to enlighten me if there are ;)
 

katmai

Well-Known Member
Mar 13, 2006
564
3
168
Brno, Czech Republic
that depends on the applications you might intend to run. still we're in 2006 not in the ace age.
 

heavypredator

Well-Known Member
May 2, 2003
93
1
158
1st problem durning mysqlup

ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

looks like mysql is not eaven starting.
 
Last edited:

goodgbb

Well-Known Member
Aug 15, 2005
75
0
156
Thailand
Connnection is impossible

Code:
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
Unable to reset root MySQL password. at /scripts/securemysql line 150.
Install Complete
 

goodgbb

Well-Known Member
Aug 15, 2005
75
0
156
Thailand
I can't start MySQL service.

Code:
060824 02:51:49  mysqld started
060824  2:51:49  InnoDB: Started
060824  2:51:49 /usr/sbin/mysqld: Can't open file: 'host.MYI'. (errno: 142)
060824  2:51:49 Fatal error: Can't open privilege tables: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
060824  2:51:49 Aborting
 
Last edited:

Solokron

Well-Known Member
Aug 8, 2003
851
1
168
Seattle
cPanel Access Level
DataCenter Provider
I am receiving this same issue as a result of :

edit /var/cpanel/cpanel.config and set mysql-version=4

Run /scripts/mysqlup --force

Did you get it resolved?




/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").

I have ran

rm -f /tmp/mysql.sock
rm -f /var/tmp/mysql.sock
/etc/init.d/mysql stop
rm -f /var/lib/mysql/mysql.sock
/etc/init.d/mysql start
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
ln -s /var/lib/mysql/mysql.sock /var/tmp/mysql.sock

but receive the same error when restarting mysql.

Connnection is impossible

Code:
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
Unable to reset root MySQL password. at /scripts/securemysql line 150.
Install Complete
 

Solokron

Well-Known Member
Aug 8, 2003
851
1
168
Seattle
cPanel Access Level
DataCenter Provider

Solokron

Well-Known Member
Aug 8, 2003
851
1
168
Seattle
cPanel Access Level
DataCenter Provider
Rebuilding my.cnf and then running

cp -fr /var/lib/mysql /var/lib/mysql.old
rm -fr /var/lib/mysql
rm -f /usr/sbin/mysqld
/scripts/mysqlup --force

does the trick.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
11
313
Houston, TX
cPanel Access Level
Root Administrator
cPanel does recommend new servers run MySQL 5 instead of 4 mainly due to the fact it is nearly inevitable that at some point in the future you will need to upgrade to version 5.x or higher.

It's a lot easier to upgrade now and have all of your code functioning on MySQL 5 than to experience a painful upgrade later on when you may need to re-code your applications to work with MySQL 5 (which it appears many have already been forced to do). A MySQL upgrade may be smooth but on some systems it can be quite bumpy.

Personally, I'd rather be doing this now on a fresh server rather than when there's some mission critical website on that server.
 

katmai

Well-Known Member
Mar 13, 2006
564
3
168
Brno, Czech Republic
im running mysql 5 for a few months already and i have seen no broken apps with it. i always prefer to stick with applications that are current and recommended, and not with software that might become EOL soon, this is why i have chosen centos over fedora as well. makes not obvious sense here but get my point.