编译安装 mysql 5.5.0 m2 通过 

由于我自己的ubuntu 系统一直没有搭建LAMP,而最近我一直比较看重的Centos VPS被端掉以后.我便开始转向于我的本机了.

由于昨天一不小心,把系统自带的network-manager卸载掉了,导致连不上网.今天从别的电脑里下载了network-manager,ppp,pppoe-config 的deb 包,传到系统里才解决了这个问题....

废话不说了,电脑好了后,下载了mysql最新的版本 mysql-5.5.0-m2.

解压,我的configure:

It was created by configure, which was
generated by GNU Autoconf 2.63. Invocation command line was

$ ./configure --prefix=/usr/local/mysql --enable-assembler --enable-profiling --with-charset=utf8 --with-extra-charsets=all --with-system-type --with-machine-type --with-server-suffix --with-mysqld-user=mysql --with-zlib-dir=bundled --with-error-inject --with-comment --with-big-tables --with-embedded-server --with-embedded-privilege-control

一次通过,没有缺依赖.

而后,make 编译,最后 make install 安装.

安装好了后,要创建 mysql专用的用户和组,如 mysql. (因为我是第一次安装)
shell> groupadd mysql
shell> useradd -g mysql mysql
而后创建软链接到 /usr/bin
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql

之后创建测试数据库,表
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql (由于我是自定义的prefix)
shell> chown -R root .
shell> chown -R mysql data

完事后,进入mysql 源码文件夹,进入 support-files 文件夹,按情况复制
my-large/medium/small.cnf 配置文件到 /etc 下.

PS:我的ubuntu自带了这个文件在 /etc/mysql 下

一切ok后,启动数据库
shell> bin/mysqld_safe --user=mysql & (密码初始为空)
[ ] ( 2661 次浏览 ) 永久链接 ( 2.9 / 2829 )

<< <上一页 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 下一页> >>