Learning Perl: 4.8. The use strict Pragma

Previous Page
Next Page

 

4.8. The use strict Pragma

Perl tends to be a permissive language.[] But maybe you want Perl to impose a little discipline; that can be arranged with the use strict pragma.

[] Bet you hadn't noticed.

A pragma is a hint to a compiler, telling it something about the code. In this case, the use strict pragma tells Perl's internal compiler that it should enforce some good programming rules for the rest of this block or source file.

Why would this be important? Well, imagine that you're composing your program, and you type a line like this one:

    $bamm_bamm = 3;  # Perl creates that variable automatically

Now, you keep typing for a while. After that line has scrolled off the top of the screen, you type this line to increment the variable:

    $bammbamm += 1;  # Oops!

Since Perl sees a new variable name (the underscore is significant in a variable name), it creates a new variable and increments that one. If you're lucky and smart, you've turned on warnings, and Perl can tell you that you used one or both of those global variable names once in your program. But if you're merely smart, you used each name more than once, and Perl won't be able to warn you.

To tell Perl you're ready to be more restrictive, put the use strict pragma at the top of your program (or in any block or file where you want to enforce these rules):

    use strict;  # Enforce some good programming rules

Now, among other restrictions,[*] Perl will insist that you declare every new variable, usually done with my:[]

[*] To learn about the other restrictions, see the documentation for strict. The documentation for any pragma is filed under that pragma's name, so the command perldoc strict (or your system's native documentation method) should find it for you. In brief, the other restrictions require that strings be quoted in most cases, and that references be true (hard) references. Neither of these restrictions should affect beginners in Perl.

[] There are some other ways to declare variables, too.

    my $bamm_bamm = 3;  # New lexical variable

If you try to spell it the other way, Perl can complain that you haven't declared any variable called $bammbamm, so your mistake is automatically caught at compile time.

    $bammbamm += 1;  # No such variable: Compile time fatal error

Of course, this applies only to new variables; you don't need to declare Perl's built-in variables, such as $_ and @_.[] If you add use strict to a previously written program, you'll generally get a flood of warning messages, so it's better to use it from the start when it's needed.

[] In some circumstances, you don't want to declare $a and $b because they're used internally by sort. So, if you're testing this feature, use other variable names than those two. The fact that use strict doesn't forbid these two is one of the most frequently reported non-bugs in Perl.

Most people recommend that programs that are longer than a screenful of text generally need use strict. And we agree.

From here on, most (but not all) of our examples will be written as if use strict is in effect even where we don't show it. That is, we'll generally declare variables with my where it's appropriate. Though we don't always do so here, we encourage you to include use strict in your programs as often as possible.

Previous Page
Next Page
2012-08-04T13:34:48.100295Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 6020 2012-08-04T13:34:48.236300Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2012-08-04T13:35:07.144382Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2012-08-04T13:35:39.446231Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. 2012-08-04T13:36:01.826510Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 4016 2012-08-04T13:36:01.829510Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting. 2012-08-04T13:36:01.830510Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\MySQL Server 8.0\Data\ is unusable. You can remove all files that the server added to it. 2012-08-04T13:36:01.833510Z 0 [ERROR] [MY-010119] [Server] Aborting 2012-08-04T13:36:01.833512Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2012-08-04T13:50:50.554656Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 4652 2012-08-04T13:50:50.619657Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2012-08-04T13:50:50.814669Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2012-08-04T13:50:50.815669Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2012-08-04T13:50:50.829669Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2012-08-04T13:50:50.830669Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2012-08-04T13:50:50.830670Z 0 [ERROR] [MY-010119] [Server] Aborting 2012-08-04T13:50:50.831674Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2012-08-04T13:51:39.728468Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 2836 2012-08-04T13:51:39.749467Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2012-08-04T13:51:39.933478Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2012-08-04T13:51:39.934478Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2012-08-04T13:51:39.938478Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2012-08-04T13:51:39.939478Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2012-08-04T13:51:39.939479Z 0 [ERROR] [MY-010119] [Server] Aborting 2012-08-04T13:51:39.940482Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:26:32.458715Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2025-06-26T11:26:32.474315Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2025-06-26T11:26:32.474315Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2025-06-26T11:26:32.474315Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 2025-06-26T11:26:32.786315Z 0 [Note] mysqld (mysqld 5.7.31) starting as process 6620 ... 2025-06-26T11:26:33.098315Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2025-06-26T11:26:33.098315Z 0 [Note] InnoDB: Uses event mutexes 2025-06-26T11:26:33.098315Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier 2025-06-26T11:26:33.098315Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2025-06-26T11:26:33.113915Z 0 [Note] InnoDB: Number of pools: 1 2025-06-26T11:26:33.129515Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2025-06-26T11:26:33.191915Z 0 [Note] InnoDB: Initializing buffer pool, total size = 64M, instances = 1, chunk size = 64M 2025-06-26T11:26:33.191915Z 0 [Note] InnoDB: Completed initialization of buffer pool 2025-06-26T11:26:33.332315Z 0 [ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:26:33.332315Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2025-06-26T11:26:33.550715Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2025-06-26T11:26:33.550715Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2025-06-26T11:26:33.550715Z 0 [ERROR] Failed to initialize builtin plugins. 2025-06-26T11:26:33.550715Z 0 [ERROR] Aborting 2025-06-26T11:26:33.550715Z 0 [Note] Binlog end 2025-06-26T11:26:33.566315Z 0 [Note] Shutting down plugin 'CSV' 2025-06-26T11:26:33.566315Z 0 [Note] mysqld: Shutdown complete 2025-06-26T11:29:24.760715Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2025-06-26T11:29:24.760715Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2025-06-26T11:29:24.760715Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2025-06-26T11:29:24.760715Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 2025-06-26T11:29:24.760715Z 0 [Note] MySQL57 (mysqld 5.7.31) starting as process 6856 ... 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Uses event mutexes 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Number of pools: 1 2025-06-26T11:29:24.776315Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2025-06-26T11:29:24.791915Z 0 [Note] InnoDB: Initializing buffer pool, total size = 64M, instances = 1, chunk size = 64M 2025-06-26T11:29:24.807515Z 0 [Note] InnoDB: Completed initialization of buffer pool 2025-06-26T11:29:25.072715Z 0 [ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:29:25.072715Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2025-06-26T11:29:25.400315Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2025-06-26T11:29:25.400315Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2025-06-26T11:29:25.400315Z 0 [ERROR] Failed to initialize builtin plugins. 2025-06-26T11:29:25.400315Z 0 [ERROR] Aborting 2025-06-26T11:29:25.400315Z 0 [Note] Binlog end 2025-06-26T11:29:25.400315Z 0 [Note] Shutting down plugin 'CSV' 2025-06-26T11:29:25.400315Z 0 [Note] MySQL57: Shutdown complete 2025-06-26T11:30:11.679515Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2025-06-26T11:30:11.679515Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2025-06-26T11:30:11.679515Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2025-06-26T11:30:11.679515Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 2025-06-26T11:30:11.680515Z 0 [Note] MySQL57 (mysqld 5.7.31) starting as process 1328 ... 2025-06-26T11:30:11.696515Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2025-06-26T11:30:11.697515Z 0 [Note] InnoDB: Uses event mutexes 2025-06-26T11:30:11.698515Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier 2025-06-26T11:30:11.698515Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2025-06-26T11:30:11.699515Z 0 [Note] InnoDB: Number of pools: 1 2025-06-26T11:30:11.700515Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2025-06-26T11:30:11.707515Z 0 [Note] InnoDB: Initializing buffer pool, total size = 64M, instances = 1, chunk size = 64M 2025-06-26T11:30:11.727515Z 0 [Note] InnoDB: Completed initialization of buffer pool 2025-06-26T11:30:11.785515Z 0 [ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:30:11.786515Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2025-06-26T11:30:11.987515Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 2025-06-26T11:30:11.987515Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2025-06-26T11:30:11.988515Z 0 [ERROR] Failed to initialize builtin plugins. 2025-06-26T11:30:11.988515Z 0 [ERROR] Aborting 2025-06-26T11:30:11.989515Z 0 [Note] Binlog end 2025-06-26T11:30:11.989515Z 0 [Note] Shutting down plugin 'CSV' 2025-06-26T11:30:11.990515Z 0 [Note] MySQL57: Shutdown complete 2025-06-26T11:32:29.799516Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6768 2025-06-26T11:32:29.932515Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:32:30.217515Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:32:30.218515Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:32:30.222515Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:32:30.223515Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:32:30.223516Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:32:30.225515Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:33:11.431517Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 5844 2025-06-26T11:33:11.453515Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:33:11.646515Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:33:11.647515Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:33:11.651515Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:33:11.652515Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:33:11.652516Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:33:11.653519Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:37:44.455517Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 5416 2025-06-26T11:37:44.459515Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting. 2025-06-26T11:37:44.460515Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\MySQL Server 8.0\data\ is unusable. You can remove all files that the server added to it. 2025-06-26T11:37:44.477515Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:37:44.477517Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:37:47.993517Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 3268 2025-06-26T11:37:47.996515Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting. 2025-06-26T11:37:47.997515Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\MySQL Server 8.0\data\ is unusable. You can remove all files that the server added to it. 2025-06-26T11:37:47.999515Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:37:48.000516Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:44:45.414317Z 0 [System] [MY-013169] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) initializing of server in progress as process 7160 2025-06-26T11:44:45.417315Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting. 2025-06-26T11:44:45.418315Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\MySQL Server 8.0\data\ is unusable. You can remove all files that the server added to it. 2025-06-26T11:44:45.421315Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:44:45.421317Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:50:18.940316Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 2960 2025-06-26T11:50:19.707315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:50:20.882315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:50:20.889315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:50:20.933315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:50:20.943315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:50:20.943316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:50:21.013315Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:54:54.948317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 5396 2025-06-26T11:54:55.006315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:54:55.988315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:54:56.000315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:54:56.044315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:54:56.054315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:54:56.055315Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:54:56.124315Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:54:59.535315Z 0 [ERROR] [MY-010083] [Server] --verbose is for use with --help; did you mean --log-error-verbosity? 2025-06-26T11:54:59.536316Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6260 2025-06-26T11:54:59.557315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:54:59.763315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:54:59.764315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:54:59.768315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:54:59.769315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:54:59.769316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:54:59.770320Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:55:49.378317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6884 2025-06-26T11:55:49.412315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:55:49.607315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:55:49.608315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:55:49.612315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:55:49.613315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:55:49.613316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:55:49.614319Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T11:59:23.848317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6500 2025-06-26T11:59:23.870315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T11:59:24.138315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T11:59:24.145315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T11:59:24.190315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T11:59:24.199315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T11:59:24.200315Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T11:59:24.270315Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T12:00:11.464315Z 0 [ERROR] [MY-010083] [Server] --verbose is for use with --help; did you mean --log-error-verbosity? 2025-06-26T12:00:11.464318Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 5528 2025-06-26T12:00:11.506315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T12:00:11.712315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T12:00:11.713315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T12:00:11.717315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T12:00:11.718315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T12:00:11.718316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T12:00:11.719319Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T12:00:48.273317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.42) starting as process 6076 2025-06-26T12:00:48.312315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T12:00:48.525315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T12:00:48.526315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T12:00:48.530315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T12:00:48.531315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T12:00:48.531316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T12:00:48.532320Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-26T12:02:01.665317Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 5008 2025-06-26T12:02:01.715315Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-26T12:02:01.927315Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-26T12:02:01.928315Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-26T12:02:01.932315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-26T12:02:01.933315Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-26T12:02:01.933316Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-26T12:02:01.934320Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-27T08:49:33.665262Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 1656 2025-06-27T08:49:38.251669Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-27T08:49:38.782070Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-27T08:49:38.813270Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-27T08:49:38.875670Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-27T08:49:38.891270Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-27T08:49:38.891271Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-27T08:49:38.922470Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-27T09:23:59.010941Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 5100 2025-06-27T09:24:00.153005Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-27T09:24:00.765040Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-27T09:24:00.776041Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-27T09:24:00.802042Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-27T09:24:00.810043Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-27T09:24:00.811043Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-27T09:24:00.851045Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-27T10:45:57.915815Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 3404 2025-06-27T10:45:58.574852Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-27T10:45:59.277892Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-27T10:45:59.289893Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-27T10:45:59.315895Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-27T10:45:59.323895Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-27T10:45:59.323896Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-27T10:45:59.363897Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL. 2025-06-27T10:47:26.056858Z 0 [System] [MY-010116] [Server] D:\MySQL Server 8.0\bin\mysqld (mysqld 8.0.42) starting as process 4556 2025-06-27T10:47:26.083857Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-27T10:47:26.411876Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files. 2025-06-27T10:47:26.412876Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2025-06-27T10:47:26.416876Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2025-06-27T10:47:26.417877Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2025-06-27T10:47:26.417878Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-27T10:47:26.418882Z 0 [System] [MY-010910] [Server] D:\MySQL Server 8.0\bin\mysqld: Shutdown complete (mysqld 8.0.42) MySQL Community Server - GPL.
最新发布
06-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值