2007-04-16

一个系统下的多个mysql安装

关键字: mysql linux
  1. 安装的版本是mysql5.0.37,服务器原本的版本是mysql3.23
  2. tar zxvf mysql-5.0.37.tar.gz
  3. ./configure --prefix=/real/ugc/mysqlmaster  --with-charset=utf8  --with-unix-socket-path=/real/ugc/mysqlmaster.sock --with-tcp-port=7001 --with-extra-charsets=gbk,gb2312,utf8,big5,latin1,latin2,latin5,latin7
    1. --prefix:安装的目录   
    2. --with-unix-socket-path:安转的socket的路径   
    3. --with-tcp-port:安装的mysql的端口  
    4. --with-extra-charsets:默认支持的字符集
  4.   scripts/mysql_install_db --user=mysql(安装mysql默认库)
  5. 启动mysql:bin/mysqld_safe --socket=/tmp/mysqlmaster.sock --port=7001 &
  6. netstat -anp|grep LISTEN 查看监听的端口
  7. 修改root密码:/real/ugc/mysqlmaster/bin/mysqladmin --socket=/tmp/mysqlmaster.sock --port=7001 -u root password 'root'
  8. 启动数据库:bin/mysql -uroot -proot --default-character-set=utf8 --socket=/temp/mysqlmaster.sock

到这里,安装基本结束了

评论
发表评论

您还没有登录,请登录后发表评论

yezi
搜索本博客
我的相册
76988825-a3a2-35e4-b837-75437d40ffca-thumb
IMG_7195
共 46 张
最近加入圈子
存档
最新评论