http :// dev.mysql.com/ downloads/ mysql /5.1.html# downloads
这是5.1的官方地址,你自己把空格去掉就好了
1、安装linux一些必须的包:yum install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* libevent
2、安装mysql,mysql安装包需要自己下载,安装目录 /usr/local/web/
sudo mkdir -p /usr/local/web/
sudo tar xzvf mysql-5.1.39.tar.gz
cd mysql-5.1.39
./configure --prefix=/usr/local/web/mysql.5.1.39 --enable-thread-safe-client --enable-assembler --with-big-tables --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=complex
make
make install
3、创建mysql用户组等信息
sudo groupadd mysql
sudo useradd -g mysql -s /sbin/nologin mysql
sudo ./scripts/mysql_install_db --user=mysql --datadir=/usr/local/web/mysql.5.1.39/var
sudo chown -R root /usr/local/web/mysql.5.1.39
sudo chown -R mysql:mysql /usr/local/web/mysql.5.1.39/var
4、管理MYSQL
#启动mysql:
sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server start
#重启mysql
sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server restart
#停止mysql
sudo /usr/local/web/mysql.5.1.39/share/mysql/mysql.server stop
linux
你的命令里面--prefix=/opt/mysql/\--with-charset=utf8\--with--extra-charsets=all\--localstatedir=/var/lib/mysql/
这样写整个句子都是一个参数,当然是把后面一连串都当作你的安装目录了。把所有的斜杠\都换成空格试试看
--prefix=/opt/mysql/ --with-charset=utf8 --with--extra-charsets=all --localstatedir=/var/lib/mysql/
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)