- 安装的版本是mysql5.0.37,服务器原本的版本是mysql3.23
- tar zxvf mysql-5.0.37.tar.gz
- ./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
- --prefix:安装的目录
- --with-unix-socket-path:安转的socket的路径
- --with-tcp-port:安装的mysql的端口
- --with-extra-charsets:默认支持的字符集
- scripts/mysql_install_db --user=mysql(安装mysql默认库)
- 启动mysql:bin/mysqld_safe --socket=/tmp/mysqlmaster.sock --port=7001 &
- netstat -anp|grep LISTEN 查看监听的端口
- 修改root密码:/real/ugc/mysqlmaster/bin/mysqladmin --socket=/tmp/mysqlmaster.sock --port=7001 -u root password 'root'
- 启动数据库:bin/mysql -uroot -proot --default-character-set=utf8 --socket=/temp/mysqlmaster.sock
到这里,安装基本结束了