CentOs6.2 64bit,裝了lamp,因為用到的一個軟件必須要php 5.3以上版本,所以根據(jù)論壇里的方法開始折騰。
先升級到了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
再執(zhí)行
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版本。這是怎么回事? |