多实例mysql的安装和管理
多实例mysql的安装和管理
http://blog.chinaunix.net/uid-20639775-id-3438560.html
mysql的多实例有两种方式可以实现,两种方式各有利弊。
第一种是使用多个配置文件启动不同的进程来实现多实例,这种方式的优势逻辑简单,配置简单,缺点是管理起来不太方便。
第二种是通过官方自带的mysqld_multi使用单独的配置文件来实现多实例,这种方式定制每个实例的配置不太方面,优点是管理起来很方便,集中管理。
下面就分别来实战这两种多实例的安装和管理
先来学习第一种使用多个配置文件启动多个不同进程的情况:
环境介绍:
mysql 版本:5.1.50
操作系统:SUSE 11
mysql实例数:3个
实例占用端口分别为:3306、3307、3308
点击(此处)折叠或打开
- /usr/sbin/groupadd mysql
- /usr/sbin/useradd -g mysql mysql
点击(此处)折叠或打开
- tar xzvf mysql-5.1.50.tar.gz
- cd mysql-5.1.50
- ./configure '--prefix=/usr/local/mysql' '--with-charset=utf8' '--with-extra-charsets=complex' '--with-pthread' '--enable-thread-safe-client' '--with-ssl' '--with-client-ldflags=-all-static' '--with-mysqld-ldflags=-all-static' '--with-plugins=partition,innobase,blackhole,myisam,innodb_plugin,heap,archive' '--enable-shared' '--enable-assembler'
- make
- make install
点击(此处)折叠或打开
- /usr/local/mysql/bin/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/dbdata_3306 --user=mysql
- /usr/local/mysql/bin/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/dbdata_3307 --user=mysql
- /usr/local/mysql/bin/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/dbdata_3308 --user=mysql
点击(此处)折叠或打开
- [client]
- port = 3306
- socket = /data/dbdata_3306/mysql.sock
- [mysqld]
- datadir=/data/dbdata_3306/
- skip-name-resolve
- lower_case_table_names=1
- innodb_file_per_table=1
- port = 3306
- socket = /data/dbdata_3306/mysql.sock
- back_log = 50
- max_connections = 300
- max_connect_errors = 1000
- table_open_cache = 2048
- max_allowed_packet = 16M
- binlog_cache_size = 2M
- max_heap_table_size = 64M
- sort_buffer_size = 2M
- join_buffer_size = 2M
- thread_cache_size = 64
- thread_concurrency = 8
- query_cache_size = 64M
- query_cache_limit = 2M
- ft_min_word_len = 4
- default-storage-engine = innodb
- thread_stack = 192K
- transaction_isolation = REPEATABLE-READ
- tmp_table_size = 64M
- log-bin=mysql-bin
- binlog_format=mixed
- slow_query_log
- long_query_time = 1
- server-id = 1
- key_buffer_size = 8M
- read_buffer_size = 2M
- read_rnd_buffer_size = 2M
- bulk_insert_buffer_size = 64M
- myisam_sort_buffer_size = 128M
- myisam_max_sort_file_size = 10G
- myisam_repair_threads = 1
- myisam_recover
- innodb_additional_mem_pool_size = 16M
- innodb_buffer_pool_size = 200M
- innodb_data_file_path = ibdata1:10M:autoextend
- innodb_file_io_threads = 8
- innodb_thread_concurrency = 16
- innodb_flush_log_at_trx_commit = 1
- innodb_log_buffer_size = 16M
- innodb_log_file_size = 512M
- innodb_log_files_in_group = 3
- innodb_max_dirty_pages_pct = 60
- innodb_lock_wait_timeout = 120
- [mysqldump]
- quick
- max_allowed_packet = 256M
- [mysql]
- no-auto-rehash
- prompt=\\u@\\d \\R:\\m>
- [myisamchk]
- key_buffer_size = 512M
- sort_buffer_size = 512M
- read_buffer = 8M
- write_buffer = 8M
- [mysqlhotcopy]
- interactive-timeout
- [mysqld_safe]
- open-files-limit = 8192
点击(此处)折叠或打开
- [client]
- port = 3307
- socket = /data/dbdata_3307/mysql.sock
- [mysqld]
- datadir=/data/dbdata_3307/
- skip-name-resolve
- lower_case_table_names=1
- innodb_file_per_table=1
- port = 3307
- socket = /data/dbdata_3307/mysql.sock
- back_log = 50
- max_connections = 300
- max_connect_errors = 1000
- table_open_cache = 2048
- max_allowed_packet = 16M
- binlog_cache_size = 2M
- max_heap_table_size = 64M
- sort_buffer_size = 2M
- join_buffer_size = 2M
- thread_cache_size = 64
- thread_concurrency = 8
- query_cache_size = 64M
- query_cache_limit = 2M
- ft_min_word_len = 4
- default-storage-engine = innodb
- thread_stack = 192K
- transaction_isolation = REPEATABLE-READ
- tmp_table_size = 64M
- log-bin=mysql-bin
- binlog_format=mixed
- slow_query_log
- long_query_time = 1
- server-id = 1
- key_buffer_size = 8M
- read_buffer_size = 2M
- read_rnd_buffer_size = 2M
- bulk_insert_buffer_size = 64M
- myisam_sort_buffer_size = 128M
- myisam_max_sort_file_size = 10G
- myisam_repair_threads = 1
- myisam_recover
- innodb_additional_mem_pool_size = 16M
- innodb_buffer_pool_size = 200M
- innodb_data_file_path = ibdata1:10M:autoextend
- innodb_file_io_threads = 8
- innodb_thread_concurrency = 16
- innodb_flush_log_at_trx_commit = 1
- innodb_log_buffer_size = 16M
- innodb_log_file_size = 512M
- innodb_log_files_in_group = 3
- innodb_max_dirty_pages_pct = 60
- innodb_lock_wait_timeout = 120
- [mysqldump]
- quick
- max_allowed_packet = 256M
- [mysql]
- no-auto-rehash
- prompt=\\u@\\d \\R:\\m>
- [myisamchk]
- key_buffer_size = 512M
- sort_buffer_size = 512M
- read_buffer = 8M
- write_buffer = 8M
- [mysqlhotcopy]
- interactive-timeout
- [mysqld_safe]
- open-files-limit = 8192
点击(此处)折叠或打开
- [client]
- port = 3308
- socket = /data/dbdata_3308/mysql.sock
- [mysqld]
- datadir=/data/dbdata_3308/
- skip-name-resolve
- lower_case_table_names=1
- innodb_file_per_table=1
- port = 3308
- socket = /data/dbdata_3308/mysql.sock
- back_log = 50
- max_connections = 300
- max_connect_errors = 1000
- table_open_cache = 2048
- max_allowed_packet = 16M
- binlog_cache_size = 2M
- max_heap_table_size = 64M
- sort_buffer_size = 2M
- join_buffer_size = 2M
- thread_cache_size = 64
- thread_concurrency = 8
- query_cache_size = 64M
- query_cache_limit = 2M
- ft_min_word_len = 4
- default-storage-engine = innodb
- thread_stack = 192K
- transaction_isolation = REPEATABLE-READ
- tmp_table_size = 64M
- log-bin=mysql-bin
- binlog_format=mixed
- slow_query_log
- long_query_time = 1
- server-id = 1
- key_buffer_size = 8M
- read_buffer_size = 2M
- read_rnd_buffer_size = 2M
- bulk_insert_buffer_size = 64M
- myisam_sort_buffer_size = 128M
- myisam_max_sort_file_size = 10G
- myisam_repair_threads = 1
- myisam_recover
- innodb_additional_mem_pool_size = 16M
- innodb_buffer_pool_size = 200M
- innodb_data_file_path = ibdata1:10M:autoextend
- innodb_file_io_threads = 8
- innodb_thread_concurrency = 16
- innodb_flush_log_at_trx_commit = 1
- innodb_log_buffer_size = 16M
- innodb_log_file_size = 512M
- innodb_log_files_in_group = 3
- innodb_max_dirty_pages_pct = 60
- innodb_lock_wait_timeout = 120
- [mysqldump]
- quick
- max_allowed_packet = 256M
- [mysql]
- no-auto-rehash
- prompt=\\u@\\d \\R:\\m>
- [myisamchk]
- key_buffer_size = 512M
- sort_buffer_size = 512M
- read_buffer = 8M
- write_buffer = 8M
- [mysqlhotcopy]
- interactive-timeout
- [mysqld_safe]
- open-files-limit = 8192
点击(此处)折叠或打开
- #!/bin/bash
- mysql_port=3306
- mysql_username="admin"
- mysql_password="password"
- function_start_mysql()
- {
- printf "Starting MySQL...\n"
- /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/dbdata_${mysql_port}/my.cnf 2>&1 > /dev/null &
- }
- function_stop_mysql()
- {
- printf "Stoping MySQL...\n"
- /usr/local/mysql/bin/mysqladmin -u ${mysql_username} -p${mysql_password} -S /data/dbdata_${mysql_port}/mysql.sock shutdown
- }
- function_restart_mysql()
- {
- printf "Restarting MySQL...\n"
- function_stop_mysql
- function_start_mysql
- }
- function_kill_mysql()
- {
- kill -9 $(ps -ef | grep 'bin/mysqld_safe' | grep ${mysql_port} | awk '{printf $2}')
- kill -9 $(ps -ef | grep 'libexec/mysqld' | grep ${mysql_port} | awk '{printf $2}')
- }
- case $1 in
- start)
- function_start_mysql;;
- stop)
- function_stop_mysql;;
- kill)
- function_kill_mysql;;
- restart)
- function_stop_mysql
- function_start_mysql;;
- *)
- echo "Usage: /data/dbdata_${mysql_port}/mysqld {start|stop|restart|kill}";;
- esac
点击(此处)折叠或打开
- #!/bin/bash
- mysql_port=3307
- mysql_username="admin"
- mysql_password="password"
- function_start_mysql()
- {
- printf "Starting MySQL...\n"
- /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/dbdata_${mysql_port}/my.cnf 2>&1 > /dev/null &
- }
- function_stop_mysql()
- {
- printf "Stoping MySQL...\n"
- /usr/local/mysql/bin/mysqladmin -u ${mysql_username} -p${mysql_password} -S /data/dbdata_${mysql_port}/mysql.sock shutdown
- }
- function_restart_mysql()
- {
- printf "Restarting MySQL...\n"
- function_stop_mysql
- function_start_mysql
- }
- function_kill_mysql()
- {
- kill -9 $(ps -ef | grep 'bin/mysqld_safe' | grep ${mysql_port} | awk '{printf $2}')
- kill -9 $(ps -ef | grep 'libexec/mysqld' | grep ${mysql_port} | awk '{printf $2}')
- }
- case $1 in
- start)
- function_start_mysql;;
- stop)
- function_stop_mysql;;
- kill)
- function_kill_mysql;;
- restart)
- function_stop_mysql
- function_start_mysql;;
- *)
- echo "Usage: /data/dbdata_${mysql_port}/mysqld {start|stop|restart|kill}";;
- esac
点击(此处)折叠或打开
- #!/bin/bash
- mysql_port=3308
- mysql_username="admin"
- mysql_password="password"
- function_start_mysql()
- {
- printf "Starting MySQL...\n"
- /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/dbdata_${mysql_port}/my.cnf 2>&1 > /dev/null &
- }
- function_stop_mysql()
- {
- printf "Stoping MySQL...\n"
- /usr/local/mysql/bin/mysqladmin -u ${mysql_username} -p${mysql_password} -S /data/dbdata_${mysql_port}/mysql.sock shutdown
- }
- function_restart_mysql()
- {
- printf "Restarting MySQL...\n"
- function_stop_mysql
- function_start_mysql
- }
- function_kill_mysql()
- {
- kill -9 $(ps -ef | grep 'bin/mysqld_safe' | grep ${mysql_port} | awk '{printf $2}')
- kill -9 $(ps -ef | grep 'libexec/mysqld' | grep ${mysql_port} | awk '{printf $2}')
- }
- case $1 in
- start)
- function_start_mysql;;
- stop)
- function_stop_mysql;;
- kill)
- function_kill_mysql;;
- restart)
- function_stop_mysql
- function_start_mysql;;
- *)
- echo "Usage: /data/dbdata_${mysql_port}/mysqld {start|stop|restart|kill}";;
- esac
点击(此处)折叠或打开
- /data/dbdata_3306/mysqld start
- /data/dbdata_3307/mysqld start
- /data/dbdata_3308/mysqld start
更改原来密码(处于安全考虑,还需要删除系统中没有密码的帐号,这里省略了):
点击(此处)折叠或打开
- /usr/local/mysql/bin/mysqladmin -uroot password 'password' -S /data/dbdata_3306/mysql.sock
- /usr/local/mysql/bin/mysqladmin -uroot password 'password' -S /data/dbdata_3307/mysql.sock
- /usr/local/mysql/bin/mysqladmin -uroot password 'password' -S /data/dbdata_3308/mysql.sock
点击(此处)折叠或打开
- /usr/local/mysql/bin/mysql -uroot -ppassword -S /data/dbdata_3308/mysql.sock
- GRANT SHUTDOWN ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password';
- flush privileges;
- /usr/local/mysql/bin/mysql -uroot -ppassword -S /data/dbdata_3308/mysql.sock
- GRANT SHUTDOWN ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password';
- flush privileges;
- /usr/local/mysql/bin/mysql -uroot -ppassword -S /data/dbdata_3308/mysql.sock
- GRANT SHUTDOWN ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password';
- flush privileges;
点击(此处)折叠或打开
- vim /etc/profile 添加下面一行内容
- PATH=${PATH}:/usr/local/mysql/bin/
- source /etc/profile
点击(此处)折叠或打开
- vim /etc/init.d/boot.local
- /data/dbdata_3306/mysqld start
- /data/dbdata_3307/mysqld start
- /data/dbdata_3308/mysqld start
点击(此处)折叠或打开
- [mysqld_multi]
- mysqld = /usr/local/mysql/bin/mysqld_safe
- mysqladmin = /usr/local/mysql/bin/mysqladmin
- user = admin
- password = password
- [mysqld1]
- socket = /data/dbdata_3306/mysql.sock
- port = 3306
- pid-file = /data/dbdata_3306/3306.pid
- datadir = /data/dbdata_3306
- user = mysql
- skip-name-resolve
- lower_case_table_names=1
- innodb_file_per_table=1
- back_log = 50
- max_connections = 300
- max_connect_errors = 1000
- table_open_cache = 2048
- max_allowed_packet = 16M
- binlog_cache_size = 2M
- max_heap_table_size = 64M
- sort_buffer_size = 2M
- join_buffer_size = 2M
- thread_cache_size = 64
- thread_concurrency = 8
- query_cache_size = 64M
- query_cache_limit = 2M
- ft_min_word_len = 4
- default-storage-engine = innodb
- thread_stack = 192K
- transaction_isolation = REPEATABLE-READ
- tmp_table_size = 64M
- log-bin=mysql-bin
- binlog_format=mixed
- slow_query_log
- long_query_time = 1
- server-id = 1
- key_buffer_size = 8M
- read_buffer_size = 2M
- read_rnd_buffer_size = 2M
- bulk_insert_buffer_size = 64M
- myisam_sort_buffer_size = 128M
- myisam_max_sort_file_size = 10G
- myisam_repair_threads = 1
- myisam_recover
- innodb_additional_mem_pool_size = 16M
- innodb_buffer_pool_size = 200M
- innodb_data_file_path = ibdata1:10M:autoextend
- innodb_file_io_threads = 8
- innodb_thread_concurrency = 16
- innodb_flush_log_at_trx_commit = 1
- innodb_log_buffer_size = 16M
- innodb_log_file_size = 512M
- innodb_log_files_in_group = 3
- innodb_max_dirty_pages_pct = 60
- innodb_lock_wait_timeout = 120
- [mysqld2]
- socket = /data/dbdata_3307/mysql.sock
- port = 3307
- pid-file = /data/dbdata_3307/3307.pid
- datadir = /data/dbdata_3307
- user = mysql
- skip-name-resolve
- lower_case_table_names=1
- innodb_file_per_table=1
- back_log = 50
- max_connections = 300
- max_connect_errors = 1000
- table_open_cache = 2048
- max_allowed_packet = 16M
- binlog_cache_size = 2M
- max_heap_table_size = 64M
- sort_buffer_size = 2M
- join_buffer_size = 2M
- thread_cache_size = 64
- thread_concurrency = 8
- query_cache_size = 64M
- query_cache_limit = 2M
- ft_min_word_len = 4
- default-storage-engine = innodb
- thread_stack = 192K
- transaction_isolation = REPEATABLE-READ
- tmp_table_size = 64M
- log-bin=mysql-bin
- binlog_format=mixed
- slow_query_log
- long_query_time = 1
- server-id = 1
- key_buffer_size = 8M
- read_buffer_size = 2M
- read_rnd_buffer_size = 2M
- bulk_insert_buffer_size = 64M
- myisam_sort_buffer_size = 128M
- myisam_max_sort_file_size = 10G
- myisam_repair_threads = 1
- myisam_recover
- innodb_additional_mem_pool_size = 16M
- innodb_buffer_pool_size = 200M
- innodb_data_file_path = ibdata1:10M:autoextend
- innodb_file_io_threads = 8
- innodb_thread_concurrency = 16
- innodb_flush_log_at_trx_commit = 1
- innodb_log_buffer_size = 16M
- innodb_log_file_size = 512M
- innodb_log_files_in_group = 3
- innodb_max_dirty_pages_pct = 60
- innodb_lock_wait_timeout = 120
- [mysqld3]
- socket = /data/dbdata_3308/mysql.sock
- port = 3308
- pid-file = /data/dbdata_3308/3308.pid
- datadir = /data/dbdata_3308
- user = mysql
- skip-name-resolve
- lower_case_table_names=1
- innodb_file_per_table=1
- back_log = 50
- max_connections = 300
- max_connect_errors = 1000
- table_open_cache = 2048
- max_allowed_packet = 16M
- binlog_cache_size = 2M
- max_heap_table_size = 64M
- sort_buffer_size = 2M
- join_buffer_size = 2M
- thread_cache_size = 64
- thread_concurrency = 8
- query_cache_size = 64M
- query_cache_limit = 2M
- ft_min_word_len = 4
- default-storage-engine = innodb
- thread_stack = 192K
- transaction_isolation = REPEATABLE-READ
- tmp_table_size = 64M
- log-bin=mysql-bin
- binlog_format=mixed
- slow_query_log
- long_query_time = 1
- server-id = 1
- key_buffer_size = 8M
- read_buffer_size = 2M
- read_rnd_buffer_size = 2M
- bulk_insert_buffer_size = 64M
- myisam_sort_buffer_size = 128M
- myisam_max_sort_file_size = 10G
- myisam_repair_threads = 1
- myisam_recover
- innodb_additional_mem_pool_size = 16M
- innodb_buffer_pool_size = 200M
- innodb_data_file_path = ibdata1:10M:autoextend
- innodb_file_io_threads = 8
- innodb_thread_concurrency = 16
- innodb_flush_log_at_trx_commit = 1
- innodb_log_buffer_size = 16M
- innodb_log_file_size = 512M
- innodb_log_files_in_group = 3
- innodb_max_dirty_pages_pct = 60
- innodb_lock_wait_timeout = 120
- [mysqldump]
- quick
- max_allowed_packet = 256M
- [mysql]
- no-auto-rehash
- prompt=\\u@\\d \\R:\\m>
- [myisamchk]
- key_buffer_size = 512M
- sort_buffer_size = 512M
- read_buffer = 8M
- write_buffer = 8M
- [mysqlhotcopy]
- interactive-timeout
- [mysqld_safe]
- open-files-limit = 8192
点击(此处)折叠或打开
- /usr/local/mysql/bin/mysqld_multi start 1
- /usr/local/mysql/bin/mysqld_multi start 2
- /usr/local/mysql/bin/mysqld_multi start 3
点击(此处)折叠或打开
- /usr/local/mysql/bin/mysqld_multi start 1-3
点击(此处)折叠或打开
- /usr/local/mysql/bin/mysqladmin -uroot password 'password' -S /data/dbdata_3306/mysql.sock
- /usr/local/mysql/bin/mysqladmin -uroot password 'password' -S /data/dbdata_3307/mysql.sock
- /usr/local/mysql/bin/mysqladmin -uroot password 'password' -S /data/dbdata_3308/mysql.sock
点击(此处)折叠或打开
- /usr/local/mysql/bin/mysql -uroot -ppassword -S /data/dbdata_3308/mysql.sock
- GRANT SHUTDOWN ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password';
- flush privileges;
- /usr/local/mysql/bin/mysql -uroot -ppassword -S /data/dbdata_3308/mysql.sock
- GRANT SHUTDOWN ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password';
- flush privileges;
- /usr/local/mysql/bin/mysql -uroot -ppassword -S /data/dbdata_3308/mysql.sock
- GRANT SHUTDOWN ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password';
- flush privileges;
点击(此处)折叠或打开
- vim /etc/profile
- PATH=${PATH}:/usr/local/mysql/bin/
- source /etc/profile
点击(此处)折叠或打开
- vim /etc/init.d/boot.local
- /usr/local/mysql/bin/mysqld_multi start 1-3
多实例mysql的安装和管理的更多相关文章
- 多实例mysql的安装和管理【验证通过】
mysql的多实例有两种方式可以实现,两种方式各有利弊.第一种是使用多个配置文件启动不同的进程来实现多实例,这种方式的优势逻辑简单,配置简单,缺点是管理起来不太方便.第二种是通过官方自带的mysqld ...
- mysql 手动安装和管理
版本:5.7.10 my.ini简单配置 [client] default-character-set=utf8 [mysqld] port = 3306 basedir =D:/programs/M ...
- MySQL第01课- CentOS + 单实例MySql编译安装总结
2016年2月,从oracle转向MySql ,碰上几个坑,特此记录 总结 1.注意环境变量.配置文件,操作过程不能出错 2.相比rpm方式安装,编译安装方式可以指定安装路径,再说安装是简单活,将来安 ...
- Vue+node.js+express+mysql实例---对图书信息进行管理
一个简单的 CURD 实例 ---对图书信息进行管理 目录 1 开发环境 1.1 前端开发环境 1.2 后端开发环境 2 数据库设计和创建 2.1 数据库和表设计 2.2 book 表设计 2.3 s ...
- MySQL基础篇——安装、管理
MySQL 安装 所有平台的 MySQL 下载地址为https://dev.mysql.com/downloads/mysql/ .挑选你需要的 MySQL Community Server 版本及对 ...
- linux学习笔记4:linux的任务调度,进程管理,mysql的安装和使用,ssh工具的使用,linux网络编程
1.设置任务调度命令crontab 任务调度是指系统在某个时间执行的特定的命令或程序.任务调度分为:1)系统工作:有些重要的工作必须周而复始的执行,如病毒扫描.2)个别用户工作:个别用户可能希望执行某 ...
- Mysql单实例脚本自动化安装
安装包:mysql-5.6.31.tar.gz 已有配置文件:my.cnf *注意:本次Mysql的配置文件是在my.cnf的基础上更改得到的,my.cnf存放路径为/opt/rh/my.cnf 脚本 ...
- 一台Ubuntu server上安装多实例MySQL
受环境所迫,在一台Ubuntu server上安装多个实例MySQL. 手动安装MySQL 环境:Ubuntu server 11.10 64bit + mysql-5.5.17-linux2.6-x ...
- Mysql 的安装(压缩文件)和基本管理
MySql安装和基本管理 本节掌握内容: mysql的安装.启动 mysql破解密码 统一字符编码 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,目前属于 Oracle ...
随机推荐
- ubuntu16.04安装node.js、npm
ubuntu16.04安装node.js.npm1.请尽量避免在 Ubuntu 上使用 apt-get 来安装 node.js, 如果你已经这么做了,请手动移除: sudo apt-get purge ...
- 关于无线的Idle Timeout和Session Timeout
1.Session Timeout Session Timer的默认值为1800s,也就是30min.Session Timeout:当该计时器超时时,使得客户端强制发生重认证,这个时间是从客户端认证 ...
- JAVA web课堂测试1
1登录账号:要求由6到12位字母.数字.下划线组成,只有字母可以开头:(1分)2登录密码:要求显示“• ”或“*”表示输入位数,密码要求八位以上字母.数字组成.(1分)3性别:要求用单选框或下拉框实现 ...
- spark脑图
spark脑图:
- 【PAT甲级】1042 Shuffling Machine (20 分)
题意: 输入洗牌次数K(<=20),输入54张牌每次洗入的位置(不是交换的位置),输出洗好的牌. AAAAAccepted code: #define HAVE_STRUCT_TIMESPEC ...
- linux mysql 查看数据库大小
SELECT CONCAT(TRUNCATE(SUM(data_length)//,),'MB') AS data_size, CONCAT(TRUNCATE(SUM(max_data_length) ...
- 「AHOI2014/JSOI2014」拼图
「AHOI2014/JSOI2014」拼图 传送门 看到 \(n \times m \le 10^5\) ,考虑根号分治. 对于 \(n < m\) 的情况,我们可以枚举最终矩形的上下边界 \( ...
- linux关闭进程
查看端口对应的pid lsof -i:8888 若要关闭使用这个端口的程序,使用kill + 对应的pid kill -9 PID号
- 什么是redis事务
一.什么是redis事务? 可以一次性执行多条命令,本质上是一组命令的集合.一个事务中的所有命令都会序列化,然后按顺序地串行化执行,而不会被插入其他命令 二.Redis 事务可以做什么? 一个队列中, ...
- Css——设置input输入框光标颜色
在使用 input 输入框时,我们可能会遇到需要给其设置光标颜色的情况.谷歌浏览器的默认光标颜色是黑色的,GitHub 上的光标却是白色,那么这个用 CSS 怎么改变呢? 上面描述的情景有两种实现方式 ...