pzg's blog

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

《 “debian安装二进制mysql5.5.8” 》 有 3 条评论

    1. countmeon 的头像

      呵呵,嗯 以后会慢慢多起来的

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注