我写的一键安装MySQL脚本——暴力版
发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,[root@xd-10-189 songlisha]# cat install_mysql.sh #!/bin/bashmysql_src=/songlisha/home/admin/mysql_da
千家信息网最后更新 2025年02月01日我写的一键安装MySQL脚本——暴力版
[root@xd-10-189 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 <'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 PATH="/songlisha/usr/local/mysql/bin:$PATH"source /etc/profileexit 0
暴力
脚本
一键
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
软件开发计划模板国家标准
智能软件开发女生多吗
普陀区生态网络技术行业
数据库文件扩展名是
宁波网络技术转让信息中心
中科院中科软件开发科技公司
工控网络安全竞赛 赛题类型
胶南im即时通讯软件开发
软件开发人员网站
科技城软件开发
服务器系统怎么取消开机密码
4g与网络安全
汕头机器人rpa软件开发
上海蓝宇网络技术有限公司
北京软件开发单位
网络安全管理关键技术
计算机网络技术子网掩码
方舟怎么让好友加入我的服务器
未成年网络安全法规心得体会
校外论文数据库
锤子科技是互联网品牌吗
r6300v2服务器
王者荣耀我的服务器
四川电力信息网络安全十不准
2020阿里云最强服务器
大公司的软件开发流程
网络安全应急指挥面试
域名服务器的安全等级查询
iis服务器怎么加强安全
如何删除管家婆库存数据库