本文我们来看看在debian服务器中如何安装二进制mysql5.5.8,以下是安装的详细命令步骤,需要的朋友可以参考一下.
debian需要安装libaio
apt-get install libaio1
然后输入命令:
- shell> groupadd mysql
- shell> useradd -r -g mysql mysql
- shell> cd /usr/local
- shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
- 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
这里我用的这句:
- scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
- shell> chown -R root .
- shell> chown -R mysql data
- shell> cp /usr/local/mysql/support-files/my-small.cnf /etc/my.cnf # Option
这里需要修改innodb设置:
- shell> bin/mysqld_safe --user=mysql &
- shell> cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql.server # Optional
这里设置:
- basedir=/usr/local/mysql
- datadir=/usr/local/mysql/data
最后开机自启动:update-rc.d mysql.server defaults
新闻热点
疑难解答