I wrote a button to install MySQL script--violent version

Source: Internet
Author: User

Tag:mysql   admin    violent    

[[email protected] songlisha]# cat install_mysql.sh #!/bin/bashmysql_src=/songlisha/ home/admin/mysql_datainstall_scr=/songlisha/usr/localrm -rf  $install _scr/mysqlrm -rf $ Mysql_srcrm -rf /etc/my.cnfgroupadd mysqluseradd -g mysql mysqlmkdir -p   $mysql _src/{binlog,innodb_log,innodb_ts,log,mydata,relaylog,sock,tmpdir}chown -r mysql.mysql   $mysql _srctar zxvf  $install _scr/mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz -c $ install_scrmv  $install _scr/mysql-5.6.34-linux-glibc2.5-x86_64  $install _scr/mysqlcat >>  /etc/my.cnf <<EOF[client]port             = 3306socket          = /songlisha/ home/admin/mysql_data/sock/mysql3306.sock[mysql]prompt= ' \[email protected]\h [\d]>  ' No-auto-rehashdefault_character_set = utf8[mysqld]user = mysqlbasedir = /songlisha/usr/local/mysqldatadir = / songlisha/home/admin/mysql_data port = 3306socket = /songlisha/home/admin/mysql_data/ Sock/my3307.sockevent_scheduler = 0max_allowed_packet=64m#skip-grant-tables#timeoutinteractive_ timeout = 300wait_timeout = 100000#character setcharacter-set-server =  utf8open_files_limit = 65535max_connections = 100max_connect_errors =  100000skip-name-resolve = 1#logslog-output=fileslow_query_log = 1slow_query_log_file  = /songlisha/home/admin/mysql_data/log/slow.loglog-error = /songlisha/home/admin/mysql_data/log /error.loglog_warnings = 2pid-file = mysql.pid#log-slow-admin-statements = 1# log-queries-not-using-indexes = 1log-slow-slave-statements = 1long_query_time =  0.3#binlogbinlog_format = roWserver-id = 1273307log-bin = /songlisha/home/admin/mysql_data/binlog/mybin.logbinlog_ cache_size = 4mmax_binlog_size = 1gmax_binlog_cache_size = 2gsync_binlog =  0expire_logs_days = 7#relay logskip_slave_start = 1max_relay_log_size =  1grelay_log_purge = 1relay_log_recovery = 1log_slave_updates#slave-skip-errors= 1032,1053,1062tmpdir = /songlisha/home/admin/mysql_data/tmpdirexplicit_defaults_for_timestamp=1# Buffers & cachetable_open_cache = 2048table_definition_cache = 2048table_ Open_cache = 2048max_heap_table_size = 96msort_buffer_size = 2mjoin_buffer_size  = 2Mthread_cache_size = 256query_cache_size = 0query_cache_type =  0query_cache_limit = 256kquery_cache_min_res_unit = 512thread_stack = 192ktmp_ Table_size = 96mkey_buffer_size = 8mread_buffer_size = 2mread_rnd_buffer_size = 16mbulk_insert_buffer_size  = 32m#myisammyisam_sort_buffer_size = 128mmyisam_max_sort_file_size = 1gmyisam_ Repair_threads = 1#innodbinnodb_data_home_dir=/songlisha/home/admin/mysql_data/innodb_tsinnodb_log_ Group_home_dir=/songlisha/home/admin/mysql_data/innodb_loginnodb_buffer_pool_size = 1ginnodb_buffer_ Pool_instances = 1innodb_data_file_path = ibdata1:10g:autoextendinnodb_flush_log_at_trx_ Commit = 2innodb_log_file_size = 500minnodb_log_files_in_group = 3innodb_max_ Dirty_pages_pct = 70innodb_file_per_table = 1innodb_rollback_on_timeoutinnodb_status_file  = 1transaction_isolation = read-committedinnodb_log_buffer_size = 16minnodb_ Lock_wait_timeout = 10innodb_sync_spin_loops = 40innodb_support_xa = 0innodb_ thread_concurrency = 0innodb_thread_sleep_delay = 500#innodb_file_io_threads    =  4innodb_concurrency_tickets = 1000log_bin_trust_function_creators = 1innodb_flush_method  = o_directinnodb_read_io_threads = 16innodb_write_io_threads = 16innodb_io_ Capacity = 2000innodb_file_format = barracudainnodb_purge_threads=1innodb_purge_batch_size  = 32innodb_old_blocks_pct=75innodb_change_buffering=allinnodb_stats_on_metadata=off[mysqld_safe] open_file_limit = 65535eof$install_scr/mysql/scripts/mysql_install_db --user=mysql -- defaults-file=/etc/my.cnf --datadir=/songlisha/home/admin/mysql_data --basedir=/songlisha/usr/local/ mysqlcp  $install _scr/mysql/support-files/mysql.server /etc/init.d/mysqldservice mysqld  startchkconfig mysqld onecho  "export path=" \ $PATH:/songlisha/usr/local/mysql/bin ""   >> /etc/profileexport&nbSp Path= "/songlisha/usr/local/mysql/bin: $PATH" source /etc/profileexit 0

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/95/7B/wKiom1kVfVzTNp51AACD6qOrUfg536.png-wh_500x0-wm_ 3-wmp_4-s_3748282009.png "title=" qq picture 20170512170856.png "alt=" Wkiom1kvfvztnp51aacd6qorufg536.png-wh_50 "/>

I wrote a button to install MySQL script--violent version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.