如何在同一台机器上安装多个MySQL的实例
1个回答
展开全部
给你个linux的配置my.cnf的内容[mysqld_multi]mysqld=/usr/local/mysql/bin/mysqld_safe[client]socket=/tmp/mysql.sockdefault-character-set=utf8[mysqld1]datadir=/usr/local/mysql/databasedir=/usr/local/mysqlcharacter-set-server=utf8default-storage-engine=innodbport=3306table_open_cache=64innodb_data_home_dir=/usr/local/mysql/datainnodb_data_file_path=ibdata1:10M:autoextendinnodb_log_group_home_dir=/usr/local/mysql/datainnodb_buffer_pool_size=50Minnodb_additional_mem_pool_size=2Minnodb_log_file_size=5Minnodb_log_buffer_size=8Minnodb_flush_log_at_trx_commit=1innodb_lock_wait_timeout=50[mysqld2]datadir=/usr/local/mysql/data1basedir=/usr/local/mysqlcharacter-set-server=utf8default-storage-engine=innodbport=3307table_open_cache=64innodb_data_home_dir=/usr/local/mysql/data1innodb_data_file_path=ibdata1:10M:autoextendinnodb_log_group_home_dir=/usr/local/mysql/data1innodb_buffer_pool_size=50Minnodb_additional_mem_pool_size=2Minnodb_log_file_size=5Minnodb_log_buffer_size=8Minnodb_flush_log_at_trx_commit=1innodb_lock_wait_timeout=50----【mysqld】中的配置和单实例的mysqld配置一致,多实例中每个[mysqld]需要有不同的端口号,sock,datadir然后是启动:/usr/local/mysql/bin/mysqld_mulit--defaults-extra-file=/etc/my.cnfstart1----这里的数字1对应[mysqld1],关闭就是把start改成stop,启动所有就是startall其他命令你自己网上查下吧
力控科技
2024-08-19 广告
2024-08-19 广告
ForceSCADA是力控科技信创产品的重要组成部分,具备完全自主知识产权,支持部署在Linux桌面版、服务器版、嵌入式等系统架构下。使用ForceSCADA可以搭建创新性高、扩展性佳、融合度强的SCADA平台,进而构建高效、智能化的监控中...
点击进入详情页
本回答由力控科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询