百乐门娱乐网开户备用-北京福星医院主要治什么病为主

首页

AD联系:507867812

百乐门娱乐网开户备用

时间:2019-11-12 23:57:52 作者:博天堂国际娱乐备用域名 浏览量:93746

百乐门娱乐网开户备用MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装,见下图

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

MySQL多实例安装MySQL多实例安装,见下图

MySQL多实例安装MySQL多实例安装MySQL多实例安装MySQL多实例安装,如下图

MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

MySQL多实例安装

如下图

MySQL多实例安装,如下图

MySQL多实例安装MySQL多实例安装,见图

百乐门娱乐网开户备用

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装MySQL多实例安装

MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

MySQL多实例安装MySQL多实例安装MySQL多实例安装MySQL多实例安装MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装MySQL多实例安装MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装。

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

百乐门娱乐网开户备用

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

MySQL多实例安装MySQL多实例安装MySQL多实例安装MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

1.

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装MySQL多实例安装MySQL多实例安装MySQL多实例安装MySQL多实例安装MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

2.

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

3.

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

4.

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

MySQL多实例安装MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linuxMySQL多实例安装MySQL多实例安装MySQL多实例安装MySQL多实例安装

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux。百乐门娱乐网开户备用

展开全文
相关文章
爱赢娱客服备用网站

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux

百乐坊备用网址

MySQL多实例安装....

乐众国际备用网站

MySQL多实例安装....

678新备用网址

MySQL多实例安装....

大发体育娱乐备用打不开

MySQL多实例安装....

相关资讯
g3新备用网址

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux....

百苑国际备用网址

一共有两种方法

一、安装端口为3306mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql用户组

groupadd mysql

创建mysql3306用户

useradd -g mysql mysql3306

编译安装

./configure --prefix=/usr/local/mysql3306 --with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock --sysconfdir=/usr/local/mysql3306/--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3306 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3306/etc

cp support-files/my-medium.cnf /usr/local/mysql3306/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3306

chmod 755 /etc/init.d/mysqld3306

chkconfig --add mysqld3306

chkconfig --level 2345 mysqld3306 on

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3306/.bashrc

初始化安装数据库

/usr/local/mysql3306/bin/mysql_install_db --user=mysql3306

chown -R mysql3306:mysql /usr/local/mysql3306/*

启动服务

/usr/local/mysql3306/bin/mysqld_safe --user=mysql3306 &

更改mysql数据库root密码

/usr/local/mysql3306/bin/mysqladmin -u root password root //root改为你需要的密码

重启mysql3306服务

service mysqld3306 restart

二、安装端口为3307的mysql

tar -zxvf mysql-5.1.44.tar.gz

cd mysql-5.1.44

创建mysql3307用户

useradd -g mysql mysql3307

编译安装

./configure --prefix=/usr/local/mysql3307 --with-unix-socket-path=/usr/local/mysql3307/var/mysql.sock --sysconfdir=/usr/local/mysql3307/etc --with-charset=utf8 --without-debug --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --disable-shared --with-mysqld-user=mysql3307 --with-extra-charsets=gb2312,big5,gbk

make && make install

创建配置文件目录并拷贝配置文件

mkdir /usr/local/mysql3307/etc

cp support-files/my-medium.cnf /usr/local/mysql3307/etc/my.cnf

添加到系统服务并开机启动

cp support-files/mysql.server /etc/init.d/mysqld3307

chmod 755 /etc/init.d/mysqld3307

chkconfig --add mysqld3307

chkconfig --level 2345 mysqld3307 on

初始化安装数据库

/usr/local/mysql3307/bin/mysql_install_db --user=mysql3307

chown -R mysql3307:mysql /usr/local/mysql3307/*

修改my.cnf设置监听端口为3307

vi /usr/local/mysql3307/etc/my.cnf

配置系统环境变量

echo "PATH=/usr/local/mysql3306/bin:$PATH" >> /home/mysql3307/.bashrc

启动mysql3307服务

/usr/local/mysql3307/bin/mysqld_safe --user=mysql3307 &

修改mysql3307数据库密码

/usr/local/mysql3307/bin/mysqladmin -u root password root //root改为你需要的密码

重启数据库服务

service mysqld3307 restart

三、编译参数解析--prefix=/usr/local/mysql3306 指定安装路径--with-unix-socket-path=/usr/local/mysql3306/var/mysql.sock 指定socket的套接字文件,多个实例时必须指定,否则多个实例会同时默认取/tmp/mysql.sock--sysconfdir=/usr/local/mysql3306/etc mysql实例启动后的配置文件所在,默认是安装路径下的[PREFIX/etc]此处指定的目的是强调需为每个实例配置my.cnf,同时需要保证 /etc/my.cnf不存在,因为启动脚本一般会先去读/etc/my.cnf--with-charset=utf8 默认字符集--with-extra-charsets=gb2312,big5,gbk 支持的其他字符集,减少不必要的开销,Mysql默认支持20多种字符集--without-debug 去掉调试模式,据说可以优化--enable-assembler 使用一些字符函数的汇编版本,据说可以优化性能--with-client-ldflags=-all-static 以纯静态方式编译客户端,如果服务器实例上不需要客户端,这项可以不要,不过建议还是留着,登录到数据库服务器上,直接mysql已经是默认习惯了。--with-mysqld-ldflags=-all-static 以纯静态方式编译服务端,据说对性能优化很有用--disable-shared 不提供动态链接库--with-mysqld-user=mysql 启动用户设置为mysql

linux....

热门资讯