1、初始化mysql数据库(实际就是mysql表、test表、infomation表)
# cd /mysql/mysql
# scripts/mysql_install_db --user=mysql--basedir=/mysql/mysql --datadir=/data/3307
2、复制启动文件
#cp/mysql/mysql/support-files/mysql.server /etc/init.d/mysqld
3、更改配置文件
# cp/mysql/suppots-file/my-default-cnf
[client]
port=
socket=
prompt=\\u@hostname \\r:\\m:\\s->
#在登陆的时候,区别登陆的标识
[mysqld]
basedir=
datadir=
port=
server-id=
socket=/data/mysql.sock
log-bin=/data/mysql_bin
binlog_format=mixed/row/sql
binlog-do-db=
binlog-ignore-db=
long_query_time=1
relay-log=/data/relay_bin
relay-log-info-file=/data/relay_log.info
[mysqld_safe]
log-error=/data/mysql_err.log
pid-file=/data/mysql_pid.pid
4、启动Mysql
#/etc/init.d/mysqld start
本文出自 “技术博” 博客,谢绝转载!
原文地址:http://hostman.blog.51cto.com/6303208/1673494