CentOs6.2 64bit,装了lamp,因为用到的一个软件必须要php 5.3以上版本,所以根据论坛里的方法开始折腾。
先升级到了mysql 5.5,升级成功,phpmyadmin中提示server版本是5.5.27,client版本是5.1。然后升级php 5.3,不管怎么折腾都不成功。翻遍论坛,有个朋友说一定要先升级mysql然后再升级php5.3。幸好做了快照,再次折腾。
先升级php 5.3,装了一些要用到的externsion。然后升级mysql 5.5,当然,肯定不成功的,幸好论坛里关于php和mysql升级的帖子翻得都烂了,修改/www/wdlinux/init.d/mysqld文件如下:
basedir = /www/wdlinux/mysql
datadir= /www/wdlinux/mysql/var mysqld启动起来了。但还有问题:
phpmyadmin里面显示server和client都是5.1版本,但是服务器上用mysqld -V查看显示: mysqld Ver 5.5.27 for Linux on x86_64 (Source distribution)
查看/www/wdlinux/mysql-5.5.27/var里面的err文件,显示:
130524 15:07:40 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql/var
130524 15:07:40 InnoDB: The InnoDB memory heap is disabled
130524 15:07:40 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130524 15:07:40 InnoDB: Compressed tables use zlib 1.2.3
130524 15:07:40 InnoDB: Initializing buffer pool, size = 128.0M
130524 15:07:40 InnoDB: Completed initialization of buffer pool
130524 15:07:40 InnoDB: highest supported file format is Barracuda.
130524 15:07:40 InnoDB: Waiting for the background threads to start
130524 15:07:41 InnoDB: 1.1.8 started; log sequence number 1595675
130524 14:58:22 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130524 14:58:22 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130524 14:58:22 [Note] Server socket created on IP: '0.0.0.0'.
130524 15:07:41 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
130524 15:07:41 [Note] Event Scheduler: Loaded 0 events
130524 15:07:41 [Note] /www/wdlinux/mysql/bin/mysqld: ready for connections.
Version: '5.5.27' socket: '/tmp/mysql.sock' port: 3306 Source distribution
修改/www/wdlinux/etc/my.cnf文件,在[mysqld]下面加入
bind-address = 127.0.0.1
再执行
mysql_upgrade -u root -p
都是OK。重启mysqld,查看err文件:
130524 15:16:47 mysqld_safe Starting mysqld daemon with databases from /www/wdlinux/mysql/var
130524 15:16:47 InnoDB: The InnoDB memory heap is disabled
130524 15:16:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130524 15:16:47 InnoDB: Compressed tables use zlib 1.2.3
130524 15:16:47 InnoDB: Initializing buffer pool, size = 128.0M
130524 15:16:47 InnoDB: Completed initialization of buffer pool
130524 15:16:47 InnoDB: highest supported file format is Barracuda.
130524 15:16:47 InnoDB: Waiting for the background threads to start
130524 15:16:48 InnoDB: 1.1.8 started; log sequence number 1595685
130524 15:16:48 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
130524 15:16:48 [Note] - '127.0.0.1' resolves to '127.0.0.1';
130524 15:16:48 [Note] Server socket created on IP: '127.0.0.1'.
130524 15:16:48 [Note] Event Scheduler: Loaded 0 events
130524 15:16:48 [Note] /www/wdlinux/mysql/bin/mysqld: ready for connections.
Version: '5.5.27' socket: '/tmp/mysql.sock' port: 3306 Source distribution
进入phpmyadmin,显示还是5.1版本。这是怎么回事? |