PDA

View Full Version : Upgarde to mysql 5.1



LionRock
01-27-2009, 11:23 AM
Hi,

I have upgraded to 5.1 and when I CB finished I get this:


mysql-5.1.30-freebsd6.2-i386.tar.gz created
Removing temporary directory
Moving mysql-5.1.30-*.tar.gz to main direcotry...
done.
Stopping mysqld ...
Stopping mysqld: [ OK ]
Installing mysql-5.1.30-freebsd6.2-i386.tar.gz...
Starting mysqld: [ OK ]
Giving mysqld a few seconds to start up...
Looking for 'mysql' as: /usr/local/mysql/bin/mysql
Looking for 'mysqlcheck' as: /usr/local/mysql/bin/mysqlcheck
Running 'mysqlcheck'...
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
Done mysql-5.1.30-freebsd6.2-i386.
Restarting MySQL.
Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]
It is recommended to do "./build php n" after MySQL update.

I have FreeBSD 6.2, CB 1.2.11

My options.conf

#Possible values - 5.0, 5.1
mysql=5.1
mysql_inst=yes
mysql_backup=yes

Thanks

scsi
01-27-2009, 11:32 AM
Are you sure mysql actually started?

ps xua | grep -i mysql | grep -v grep

LionRock
01-27-2009, 11:36 AM
[root@s1 /var]# ps xua | grep -i mysql | grep -v grep
[root@s1 /var]# /usr/local/etc/rc.d/mysqld start
Starting mysqld: [ OK ]
[root@s1 /var]# ps xua | grep -i mysql | grep -v grep
[root@s1 /var]#

Also if I try to start it from DA it is the same.

scsi
01-27-2009, 11:45 AM
There has gotta be a reason it is not starting. Check /var/log/messages for any errors. You might have to turn on mysql debugging to be able to see any errors.

LionRock
01-27-2009, 11:53 AM
How I can turn on debug for mysql? Recompile??

scsi
01-27-2009, 12:03 PM
Run the following command then restart mysql as normal. Then see if there are errors in /var/log/messages



perl -pi -e 's/\/usr\/local\/mysql\/bin\/mysqld_safe --user/\/usr\/local\/mysql\/bin\/mysqld_safe --log-error=\/var\/log\/messages --user/' /usr/local/etc/rc.d/mysqld

LionRock
01-27-2009, 12:05 PM
Ok, I found log :) It is in /home/mysql :P Didn't know that.


[root@s1 /usr/local/mysql/data]# /usr/local/etc/rc.d/mysqld start
Starting mysqld: [ OK ]
[root@s1 /usr/local/mysql/data]# tail s1.xxx.xx.err
090127 20:50:11 mysqld_safe mysqld from pid file /usr/local/mysql/data/s1.pid ended
090127 20:50:12 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/mysql-5.1.30-freebsd6.2-i386/libexec/mysqld: Table 'mysql.plugin' doesn't exist
090127 20:50:12 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
090127 20:50:12 [ERROR] /usr/local/mysql-5.1.30-freebsd6.2-i386/libexec/mysqld: unknown option '--skip-innodb'
090127 20:50:12 [ERROR] Aborting

090127 20:50:12 [Note] /usr/local/mysql-5.1.30-freebsd6.2-i386/libexec/mysqld: Shutdown complete

090127 20:50:12 mysqld_safe mysqld from pid file /usr/local/mysql/data/s1.pid ended

I have tried to run mysql_upgrade but:


[root@s1 /usr/local/mysql/bin]# ./mysql_upgrade
Looking for 'mysql' as: ./mysql
Looking for 'mysqlcheck' as: ./mysqlcheck
Running 'mysqlcheck'...
./mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

Any tip?

Thanks

scsi
01-27-2009, 12:11 PM
haha I have no clue how you will be able to do that if the stupid server wont start.