Mysql安装笔记
#useradd mysql -s /sbin/nologin
#wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.54.tar.gz
#tar zxvf mysql-5.1.54.tar.gz
#cd mysql-5.1.54
#./configure --prefix=/usr/local/mysql
--with-mysqld-ldflags=-all-static //以静态方式编译服务器端
--with-client-ldflags=-all-static //以静态方式编译客户端
--with-extra-charset=utf8,gbk //添加utf8、gbk字符集
--with-plugins=innobase,myisam //添加mysql存储引擎
--with-server-suffix=-community //为mysqld版本字符串添加后缀
--with-unix-socket-path=/usr/local/mysql/sock/mysql.sock
--enable-thread-safe-client //以线程方式编译客户端,提高性能
--enable-assembler //使用汇编,提高性能
--enable-profiling //启用profile功能
--without-embedded-server //去除embedded
--without-debug //去除debug模式,提高性能
--without-bench //去除bench模式,提高性能
#make && make install
#cp support-files/my-medium.cnf /etc/my.cnf #chown -R mysql:mysql /usr/local/mysql
#/usr/local/mysql/bin/mysql_install_db --user=mysql & //初始化mysql
#/usr/local/mysql/bin/mysqld_safe --user=mysql & //启动mysql
#/usr/local/mysql/bin/mysqladmin -uroot password 123456 //设置mysql管理员密码
#echo "/usr/local/mysql/bin/mysqld_safe --user=mysql &" >>/etc/rc.local //加入开机自启动
#echo "export PATH=$PATH:/usr/local/mysql/bin" >>/etc/profile //加入环境变量
#source /etc/profile
作者“崔元荣学技术”
相关新闻>>
- 发表评论
-
- 最新评论 更多>>