Mysql8.0修改lower_case_table_names参数导致重启失败

  • GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源。
  • GreatSQL是MySQL的国产分支版本,使用上与MySQL一致。

事件起因:在测试一个数据迁移工具时,源端oracle19c数据迁移到目标端mysql8.0,提示迁移目标端 Unknown database ‘SBTEST’,报错如下:

2022-07-29 10:08:19,155 ERROR com.greatsync.connector.jdbc.internal.ComplexJdbcOutputFormat [] - JDBC executeBatch error, retry times = 0
java.sql.BatchUpdateException: Unknown database 'SBTEST'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_312]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_312]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_312]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_312]
    at com.mysql.cj.util.Util.handleNewInstance(Util.java:192) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.util.Util.getInstance(Util.java:167) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.util.Util.getInstance(Util.java:174) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.exceptions.SQLError.createBatchUpdateException(SQLError.java:224) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:755) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:426) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:795) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.greatsync.connector.jdbc.statement.FieldNamedPreparedStatementImpl.executeBatch(FieldNamedPreparedStatementImpl.java:77) ~[blob_p-90078b57fb2c51eb5935c045d2e493ef0a7d1524-e9c0e1166eea1bd94ba3d5a23c03b9b3:?]
    at com.greatsync.connector.jdbc.internal.executor.TableSimpleStatementExecutor.executeBatch(TableSimpleStatementExecutor.java:63) ~[blob_p-90078b57fb2c51eb5935c045d2e493ef0a7d1524-e9c0e1166eea1bd94ba3d5a23c03b9b3:?]
    at com.greatsync.connector.jdbc.internal.executor.TableBufferReducedStatementExecutor.executeBatch(TableBufferReducedStatementExecutor.java:121) ~[blob_p-90078b57fb2c51eb5935c045d2e493ef0a7d1524-e9c0e1166eea1bd94ba3d5a23c03b9b3:?]
    at com.greatsync.connector.jdbc.internal.ComplexJdbcOutputFormat.attemptFlush(ComplexJdbcOutputFormat.java:243) ~[blob_p-90078b57fb2c51eb5935c045d2e493ef0a7d1524-e9c0e1166eea1bd94ba3d5a23c03b9b3:?]
    at com.greatsync.connector.jdbc.internal.ComplexJdbcOutputFormat.flush(ComplexJdbcOutputFormat.java:210) ~[blob_p-90078b57fb2c51eb5935c045d2e493ef0a7d1524-e9c0e1166eea1bd94ba3d5a23c03b9b3:?]
    at com.greatsync.connector.jdbc.internal.ComplexJdbcSinkFunction.lambda$open$0(ComplexJdbcSinkFunction.java:63) ~[blob_p-90078b57fb2c51eb5935c045d2e493ef0a7d1524-e9c0e1166eea1bd94ba3d5a23c03b9b3:?]
    at org.apache.flink.streaming.runtime.tasks.StreamTask.invokeProcessingTimeCallback(StreamTask.java:1693) ~[flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$null$22(StreamTask.java:1684) ~[flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.runThrowing(StreamTaskActionExecutor.java:50) ~[flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.streaming.runtime.tasks.mailbox.Mail.run(Mail.java:90) ~[flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.processMailsNonBlocking(MailboxProcessor.java:353) ~[flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.processMail(MailboxProcessor.java:317) ~[flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:201) ~[flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:809) ~[flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:761) ~[flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958) [flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:937) [flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766) [flink-dist_2.11-1.14.4.jar:1.14.4]
    at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) [flink-dist_2.11-1.14.4.jar:1.14.4]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
Caused by: java.sql.SQLSyntaxErrorException: Unknown database 'SBTEST'
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:716) ~[mysql-connector-java-8.0.28.jar:8.0.28]
    ... 22 more

于是查看了目标端mysql的databases:

mysql> select @@version,@@default_storage_engine;
+-----------+--------------------------+
| @@version | @@default_storage_engine |
+-----------+--------------------------+
| 8.0.29    | InnoDB                   |
+-----------+--------------------------+
1 row in set (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sbtest             |
| sys                |
+--------------------+
5 rows in set (0.01 sec)
--使用大写的database name,报错
mysql> use SBTEST
ERROR 1049 (42000): Unknown database 'SBTEST'
--使用小写的database name,可以正常访问
mysql> use sbtest
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

发现目标端是存在sbtest这个库,但是只能小写访问,继续检查大小写敏感配置

mysql> select @@lower_case_table_names;
+--------------------------+
| @@lower_case_table_names |
+--------------------------+
|                        0 |
+--------------------------+
1 row in set (0.00 sec)

mysql>

可见目标端的mysql8.0未开启忽略大写的配置,oracle的对象名称默认是大写,迁移工具迁移时未进行对象名称转小写,导致迁移失败,程序报错
这时的想法那手动改下lower_case_table_names不就行了,于是就有了如下的操作:
修改mysql配置文件:

#my.cnf配置中增加如下配置
lower-case-table-names=1

重启我的mysql8.0 docker容器并查看日志:

root@mysql:~# docker restart mysql8.0.29
mysql8.0.29
root@mysql:~# docker logs -f mysql8.0.29
2022-07-29 02:28:48+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1debian10 started.

2022-07-29 02:28:48+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-07-29 02:28:48+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1debian10 started.

2022-07-29T02:28:48.532695-00:00 0 [Warning] [MY-011068] [Server] The syntax 'log_slave_updates' is deprecated and will be removed in a future release. Please use log_replica_updates instead.

2022-07-29T02:28:48.532736-00:00 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.

2022-07-29T02:28:48.532776-00:00 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.

2022-07-29T02:28:48.532794-00:00 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 1
2022-07-29T02:28:48.541090-00:00 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2022-07-29T02:28:50.875623-00:00 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2022-07-29T02:28:50.896028-00:00 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('1') and data dictionary ('0').

2022-07-29T02:28:50.896513-00:00 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.

2022-07-29T02:28:50.897228-00:00 0 [ERROR] [MY-010119] [Server] Aborting
2022-07-29T02:28:51.615910-00:00 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29)  MySQL Community Server - GPL.

2022-07-29 02:28:53+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1debian10 started.

2022-07-29 02:28:53+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-07-29 02:28:53+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1debian10 started.

2022-07-29T02:28:54.151877-00:00 0 [Warning] [MY-011068] [Server] The syntax 'log_slave_updates' is deprecated and will be removed in a future release. Please use log_replica_updates instead.

2022-07-29T02:28:54.151918-00:00 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.

2022-07-29T02:28:54.151954-00:00 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.

2022-07-29T02:28:54.151972-00:00 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 1
2022-07-29T02:28:54.401739-00:00 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2022-07-29T02:28:56.161607-00:00 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2022-07-29T02:28:56.166187-00:00 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('1') and data dictionary ('0').

2022-07-29T02:28:56.166354-00:00 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.

2022-07-29T02:28:56.166517-00:00 0 [ERROR] [MY-010119] [Server] Aborting
2022-07-29T02:28:56.800121-00:00 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29)  MySQL Community Server - GPL.

咦,居然重启失败并报错,我记得之前mysql5.7上是可以修改成功的,于是在mysql5.7上复现了一下该修改操作:

mysql> select @@version,@@default_storage_engine;
+------------+--------------------------+
| @@version  | @@default_storage_engine |
+------------+--------------------------+
| 5.7.37-log | InnoDB                   |
+------------+--------------------------+
1 row in set (0.00 sec)

mysql> select @@lower_case_table_names;
+--------------------------+
| @@lower_case_table_names |
+--------------------------+
|                        0 |
+--------------------------+
1 row in set (0.00 sec)

配置文件中添加:lower-case-table-names=1后重启mysql5.7的docker容器

root@mysql:~#docker restart mysql5.7
mysql5.7
-- 查看日志,重启成功
root@mysql:~#docker logs -f mysql5.7
2022-07-29 04:36:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.37-1debian10 started.

2022-07-29 04:36:01+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-07-29 04:36:02+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.37-1debian10 started.

2022-07-29T04:36:02.585577-00:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2022-07-29T04:36:02.585636-00:00 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.

2022-07-29T04:36:02.585657-00:00 0 [Note] mysqld (mysqld 5.7.37-log) starting as process 1 ...

2022-07-29T04:36:02.589953-00:00 0 [Note] InnoDB: PUNCH HOLE support available
2022-07-29T04:36:02.589965-00:00 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-07-29T04:36:02.589968-00:00 0 [Note] InnoDB: Uses event mutexes
2022-07-29T04:36:02.589970-00:00 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2022-07-29T04:36:02.589972-00:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-07-29T04:36:02.589974-00:00 0 [Note] InnoDB: Using Linux native AIO
2022-07-29T04:36:02.590203-00:00 0 [Note] InnoDB: Number of pools: 1
2022-07-29T04:36:02.590301-00:00 0 [Note] InnoDB: Using CPU crc32 instructions
2022-07-29T04:36:02.591501-00:00 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2022-07-29T04:36:02.598983-00:00 0 [Note] InnoDB: Completed initialization of buffer pool
2022-07-29T04:36:02.600436-00:00 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

2022-07-29T04:36:02.611754-00:00 0 [Note] InnoDB: Highest supported file format is Barracuda.

2022-07-29T04:36:02.691303-00:00 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-07-29T04:36:02.691434-00:00 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2022-07-29T04:36:02.886567-00:00 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.

2022-07-29T04:36:02.888579-00:00 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.

2022-07-29T04:36:02.888614-00:00 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.

2022-07-29T04:36:02.889822-00:00 0 [Note] InnoDB: 5.7.37 started; log sequence number 12662238
2022-07-29T04:36:02.890218-00:00 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2022-07-29T04:36:02.890839-00:00 0 [Note] Plugin 'FEDERATED' is disabled.

2022-07-29T04:36:02.897432-00:00 0 [Note] InnoDB: Buffer pool(s) load completed at 220729  4:36:02
2022-07-29T04:36:03.150414-00:00 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.

2022-07-29T04:36:03.150468-00:00 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.

2022-07-29T04:36:03.150482-00:00 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.

2022-07-29T04:36:03.150491-00:00 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.

2022-07-29T04:36:03.151831-00:00 0 [Warning] CA certificate ca.pem is self signed.

2022-07-29T04:36:03.151851-00:00 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.

2022-07-29T04:36:03.151929-00:00 0 [Note] Server hostname (bind-address): '*'; port: 3306
2022-07-29T04:36:03.151953-00:00 0 [Note] IPv6 is available.

2022-07-29T04:36:03.151961-00:00 0 [Note]   - '::' resolves to '::';
2022-07-29T04:36:03.151968-00:00 0 [Note] Server socket created on IP: '::'.

2022-07-29T04:36:03.206432-00:00 0 [Warning] Insecure configuration for --pid-file: Location '/var/lib/mysql' in the path is accessible to all OS users. Consider choosing a different directory.

2022-07-29T04:36:03.218018-00:00 0 [Note] Failed to start slave threads for channel ''
2022-07-29T04:36:03.234065-00:00 0 [Note] Event Scheduler: Loaded 0 events
2022-07-29T04:36:03.234636-00:00 0 [Note] mysqld: ready for connections.

Version: '5.7.37-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)

查看配置生效了:

mysql> root@mysql:~# docker exec -it mysql5.7  bash
root@f9bc50f17027:/# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2
Server version: 5.7.37-log MySQL Community Server (GPL)

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select @@lower_case_table_names;
+--------------------------+
| @@lower_case_table_names |
+--------------------------+
|                        1 |
+--------------------------+
1 row in set (0.00 sec)

确实mysql5.7是支持修改的,mysql8.0不支持修改,于是查了mysql8.0的官网解释:
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_lower_case_table_names

— linux未设置默认是0
The default value of this variable is platform-dependent (see lower_case_file_system). On Linux and other Unix-like systems, the default is 0. On Windows the default value is 1. On macOS, the default value is 2. On Linux (and other Unix-like systems), setting the value to 2 is not supported; the server forces the value to 0 instead.

— 禁止使用与服务器初始化时使用的设置不同的lower_case_table_names启动服务器
It is prohibited to start the server with a lower_case_table_names setting that is different from the setting used when the server was initialized. The restriction is necessary because collations used by various data dictionary table fields are determined by the setting defined when the server is initialized, and restarting the server with a different setting would introduce inconsistencies with respect to how identifiers are ordered and compared.

— 在初始化服务器之前,有必要将lower_case_table_names配置为所需的设置
It is therefore necessary to configure lower_case_table_names to the desired setting before initializing the server. In most cases, this requires configuring lower_case_table_names in a MySQL option file before starting the MySQL server for the first time.

原来需要mysql.0初始化的时候就需要设置好,并且后续不支持修改。于是我又重新用docker部署了一个新的mysql8.0数据库继续测试。

参数说明

  • lower_case_table_names=0 表名存储为给定的大小和比较是区分大小写的
  • lower_case_table_names = 1 表名存储在磁盘是小写的,但是比较的时候是不区分大小写
  • lower_case_table_names=2 表名存储为给定的大小写但是比较的时候是小写的
    unix,linux下lower_case_table_names默认值为 0 .Windows下默认值是 1 .Mac OS X下默认值是 2

总结

可见我们在使用mysql8.0前需要根据自己的使用场景评估是否要开启忽略大小写,如果需要开启忽略大小写,初始化前需要把lower-case-table-names=1写入到my.cnf配置文件中,这样才不会影响后续的使用。

关于 GreatSQL

GreatSQL是由万里数据库维护的MySQL分支,专注于提升MGR可靠性及性能,支持InnoDB并行查询特性,是适用于金融级应用的MySQL分支版本。

GreatSQL社区 Gitee GitHub Bilibili

GreatSQL社区:

欢迎来GreatSQL社区发帖提问
https://greatsql.cn/

Mysql8.0修改lower_case_table_names参数导致重启失败

技术交流群:

微信:扫码添加 GreatSQL社区助手微信好友,发送验证信息 加群

Mysql8.0修改lower_case_table_names参数导致重启失败

Original: https://www.cnblogs.com/greatsql/p/16634739.html
Author: GreatSQL
Title: Mysql8.0修改lower_case_table_names参数导致重启失败

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/504920/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

  • 重返MySQL之MySQL基础

    重返MySQL之MySQL基础 本章详细介绍了,什么是数据库,常见的关系型数据库有哪些,什么是MySQL,及MySQL中DDL操作表,DML操作表记录。 1.0 数据库概述 1.1…

    数据库 2023年6月9日
    0209
  • MySQL快速创建800w条测试数据表&深度分页

    MySQL快速创建800w条测试数据表&深度分页 如果一条一条插入普通表的话,效率太低下,但内存表插入速度是很快的,可以先建立一张内存表,插入数据后,在导入到普通表中。 1…

    数据库 2023年6月14日
    0148
  • Java学习-第一部分-第一阶段-第八节:项目-房屋出租系统

    项目-房屋出租系统 笔记目录:(https://www.cnblogs.com/wenjie2000/p/16378441.html) 房屋出租系统-需求 ●项目需求说明 实现基于…

    数据库 2023年6月11日
    0148
  • Linux 利用Cgroup 资源控制

    GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源。 GreatSQL是MySQL的国产分支版本,使用上与MySQL一致。 cgroups 是Linux内核…

    数据库 2023年5月24日
    0183
  • Cookie和Session的关系和区别

    4.请简述Cookie和Session的区别 4.1什么是Cookie HTTP是无状态协议,他不能以状态来区分和管理请求和响应。也就是说服务器但从网络连接上无从知道客户身份。所以…

    数据库 2023年6月14日
    0136
  • 5、Idea同时选择多处光标进行编辑

    1、按住Alt+Shift,然后用鼠标左键点击文本,可以让光标在多个位置出现2、每个光标都会同时输入你正在输入的文本3、ESC退出 搜索 复制 Original: https://…

    数据库 2023年6月6日
    0145
  • Django项目中的数据库引擎的修改注意点以及级联删除的设置

    2022-09-29 问题描述: 在”setting.py”的配置文件中修改数据库引擎中,将系统默认的”sqlite3″后缀改为了&…

    数据库 2023年6月14日
    0135
  • JVM-类加载

    JVM JAVA技术交流群:737698533 类加载 推荐视频 https://www.bilibili.com/video/BV1PJ411n7xZ JVM系列笔记结合此视频和…

    数据库 2023年6月16日
    0160
  • 简述JS正则RegExp对象

    RegExp对象 正则表达式是描述字符模式的对象。 正则表达式用于对字符串模式匹配及检索替换,是对字符串执行模式匹配的强大工具。 参考教材:w3cschool | JavaScri…

    数据库 2023年6月11日
    0148
  • rsync

    rsync rsync是linux系统下的数据镜像备份工具。使用快速增量备份工具Remote Sync可以远程同步,支持本地复制,或者与其他SSH、rsync主机同步。 rsync…

    数据库 2023年6月14日
    0142
  • js异步编程终级解决方案 async/await

    在最新的ES7(ES2017)中提出的前端异步特性:async、await。 async、await是什么 async顾名思义是”异步”的意思,async用…

    数据库 2023年6月9日
    0165
  • 浏览器书签插件配置

    准备远程Git仓库(目前只支持Gitee) 登录后创建仓库(如没有账号请自行注册) 配置Token 进入设置页面配置私人令牌 新增一个令牌(权限) 保存好生成的令牌,此令牌后续无法…

    数据库 2023年6月9日
    0131
  • Redis与Python连接实例

    2022-09-22 1、 Redis与Python建立连接之前需要先安装”Redis”安装包: 在ubantu中,打开终端,输入命令: sudo pip …

    数据库 2023年6月14日
    0149
  • MySQL基础入门学习教程,带你快速掌握mysql

    Original: https://www.cnblogs.com/chaichaichai/p/15243386.htmlAuthor: 牛仔码农Title: MySQL基础入门…

    数据库 2023年5月24日
    0168
  • 【黄啊码】小程序:九宫格抽奖如何实现?可控制抽奖率

    黄啊码向来简单粗暴,来,代码伺候 js代码如下: php;gutter:true; //index.js //获取应用实例 const app = getApp()</p&g…

    数据库 2023年6月16日
    0156
  • MYSQL性能优化以及建议

    1、业务代码组合逻辑后进行数据库操作,如根据波次进行库存分配,可以将波次里面的订单所有明细进行分组,然后匹配库存。2、将大字段、不常用字段放置到扩展表中,将经常使用(状态、数量、编…

    数据库 2023年5月24日
    0114
亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球