1¡¢ÉÏ´«MySQL¶þ½øÖÆÑ¹Ëõ°üµ½LinuxÉÏ
2¡¢½âѹµ½/usr/local/mysqlÖÐ
tar -xzvf mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz -C /usr/local/mysql
²é¿´/usr/local/mysql
3¡¢´´½¨ÐÂÓû§
4¡¢/var/local/mysql ¸ü¸ÄÊôÖ÷Ϊmysql
5¡¢mysql/bin Ìí¼Óµ½»·¾³±äÁ¿
6¡¢´´½¨mysqlÊý¾ÝĿ¼²¢¸ü¸ÄÊôÖ÷Ϊmysql
1¡¢ÐÞ¸Ämy.cnfµ½/etc/mysqlÖÐ
2¡¢³õʼ»¯3306Êý¾Ý¿â Ö¸¶¨Îļþ/etc/mysql/my3306.cnf
3¡¢²é¿´/data1/db3306 Ŀ¼
4¡¢²é¿´error.logÎļþ<†·Ÿ"/kf/ware/vc/" target="_blank" class="keylink">vcD4NCjxwPjxpbWcgYWx0PQ=="image" src="/uploadfile/Collfiles/20160827/20160827093051176.png" title="\" />
5¡¢Æô¶¯mysql3306ʵÀý
6¡¢²é¿´¶Ë¿Ú
1¡¢½øÈëmysql
2¡¢ÉèÖÃrootÓû§µÄÃÜÂëΪ123456
3¡¢Ê¹ÓÃÃÜÂëµÇ¼mysql
[mysqld] # GENERAL # user = mysql port = 3306 socket = /data1/db3306/my3306.sock pid_file = /data1/db3306/mysql.pid datadir = /data1/db3306/ tmpdir = /data1/tmp log_bin = /data1/db3306/3306-mysql-bin relay-log = /data1/db3306/3306-relay-bin log_error = /data1/db3306/error.log slow_query_log_file = /data1/db3306/slow-queries.log long_query_time=1 sync_binlog = 0 expire_logs_days = 7 back_log=1024 skip-name-resolve skip-slave-start skip-external-locking skip-character-set-client-handshake explicit_defaults_for_timestamp=true default_storage_engine = InnoDB bind-address=0.0.0.0 #lower_case_table_names = 0 myisam_recover = FORCE,BACKUP transaction-isolation = READ-COMMITTED table_definition_cache = 4096 table_open_cache = 4096 # connection # max_connections = 1100 max_user_connections = 1000 max_connect_errors = 1000 # timeout # wait_timeout = 100 interactive_timeout = 100 lock_wait_timeout = 3 connect_timeout = 20 slave-net-timeout = 30 # character # character-set-server=utf8 init-connect='SET NAMES utf8' # disabled query cache # query_cache_type = 0 query_cache_size = 0 # replication # server_id=71493306 gtid_mode=ON enforce-gtid-consistency log-slave-updates binlog-format=row slave-parallel-workers=6 master-info-repository=TABLE relay-log-info-repository=TABLE sync_master_info = 10000 slave_sql_verify_checksum=1 skip-slave-start # session # key_buffer_size = 128M tmp_table_size = 32M max_heap_table_size = 32M max_allowed_packet = 32M bulk_insert_buffer_size = 32M sort_buffer_size = 128K read_buffer_size = 1M read_rnd_buffer_size = 1M join_buffer_size = 128K myisam_sort_buffer_size = 32M tmp_table_size = 32M max_heap_table_size = 64M thread_cache_size = 64 #thread_concurrency = 32 thread_stack = 192K # INNODB # innodb_flush_method = O_DIRECT innodb_data_home_dir = /data1/db3306/ innodb_data_file_path = ibdata1:10M:autoextend #redo log innodb_log_group_home_dir=/data1/db3306/ innodb_log_files_in_group = 3 innodb_log_file_size = 1G #innodb performance innodb_flush_log_at_trx_commit = 0 innodb_file_per_table = 1 innodb_buffer_pool_instances = 8 innodb_io_capacity = 2000 innodb_lock_wait_timeout = 30 binlog_error_action = ABORT_SERVER innodb_buffer_pool_size = 256M innodb_max_dirty_pages_pct=90 innodb_file_format=Barracuda innodb_support_xa = 0 innodb_buffer_pool_dump_at_shutdown = 1 innodb_buffer_pool_load_at_startup = 1