时间:2021-07-01 10:21:17 帮助过:22人阅读
basedir = /data/app/mysql3306 #程序目录
socket = /data/mysql3306/mysql3306.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU‘s*2 for thread_concurrency
thread_concurrency = 8
log-bin=mysql-bin #二进制日志,主从复制用
binlog_format=mixed #混合模式复制(mixed-based replication,
server-id = 1 #多服务器时,区分mysql服务器身份的ID
初始化mysql:
cd /data/app/mysql3306/
./scripts/mysql_install_db --basedir=/data/app/mysql3306/ --datadir=/data/mysql3306/ --user=mysql
添加为系统服务:
cp /tmp/mysql-5.5.44/support-files/my-medium.cnf /etc/my.cnf
cp /tmp/mysql-5.5.44/support-files/mysql.server /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 35 mysqld on
chkconfig --list |grep mysql #验证
启动
/etc/init.d/mysqld restart
ERROR! MySQL server PID file could not be found! #再次restart 没有再报错
设置密码为123456
/data/app/mysql3306/bin/mysqladmin -uroot password ‘123456‘
登陆
mysql -uroot -p123456
cmake 安装 mysql5.5.44
标签:mysql cmake