./configure \
--prefix=/application/mysql5.1.72 \
--with-unix-socket-path=/application/mysql5.1.72/tmp/mysql.sock \
--localstatedir=/application/mysql5.1.72/data \
--enable-assembler \
--enable-thread-safe-client \
--with-mysqld-user=mysql \
--with-big-tables \
--without-debug \
--with-pthread \
--enable-assembler \
--with-extra-charsets=complex \
--with-readline \
--with-ssl \
--with-embedded-server \
--enable-local-infile \
--with-plugins=partition,innobase \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static
#--with-plugin-PLUGIN \
[root@localhost application]# ln -s /application/mysql5.1.72/ /application/mysql
[root@localhost application]# ll /application/mysql
初始化数据库
cd /home/sun/tools/mysql-5.1.72
\cp support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
/etc/init.d/mysqld start
第一种方法:
启动:
/application/mysql/bin/mysqld_safe &
关闭:
mysqladmin shutdown
第二种:
/etc/init.d/mysqld start
/etc/init.d/mysqld stop
设置密码
/application/mysql/bin/mysqladmin -u root password "123456"
本文来自博客园,作者:孙龙-程序员,转载请注明原文链接:https://www.cnblogs.com/sunlong88/articles/8672166.html