
명령을 통한 mysql 액세스에 관한 간단한 질문이 있습니다. 루트로 액세스하려고 하면 다음 메시지가 반송됩니다.
mysql: unknown option '--innodb_file_per_table'
어떻게 다시 작동하게 될까요?
고마워요 릭. 나는 액세스 권한을 얻었고 서버가 작동하고 있습니다. 걱정되는 것은 시작/중지/다시 시작하는 동안 많은 오류가 발생한다는 것입니다.
오류 기록
2020-12-17 19:16:40 0 [Note] InnoDB: Using Linux native AIO
2020-12-17 19:16:40 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-12-17 19:16:40 0 [Note] InnoDB: Uses event mutexes
2020-12-17 19:16:40 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-12-17 19:16:40 0 [Note] InnoDB: Number of pools: 1
2020-12-17 19:16:40 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-12-17 19:16:40 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-12-17 19:16:40 0 [Note] InnoDB: Completed initialization of buffer pool
2020-12-17 19:16:40 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority ().
2020-12-17 19:16:40 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-12-17 19:16:40 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-12-17 19:16:40 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-12-17 19:16:40 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-12-17 19:16:40 0 [Note] InnoDB: 10.3.27 started; log sequence number 8459955162; transaction id 23688770
2020-12-17 19:16:40 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-12-17 19:16:40 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-12-17 19:16:40 0 [Note] Server socket created on IP: '127.0.0.1'.
2020-12-17 19:16:40 0 [Note] Reading of all Master_info entries succeeded
2020-12-17 19:16:40 0 [Note] Added new Master_info '' to hash table
2020-12-17 19:16:40 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.27-MariaDB-0+deb10u1' socket: '/run/mysqld/mysqld.sock' port: 3306 Debian 10
2020-12-17 19:16:40 0 [Note] InnoDB: Buffer pool(s) load completed at 201217 19:16:40
답변1
계획 A(지저분하고 권장되지 않음): 해당 옵션을 mysqld
(클라이언트 프로그램이 아닌 서버 프로그램 mysql
)에 추가합니다.
계획 B: 설정을 변경합니다 my.cnf
(또는 구성 파일이 있는 위치). 그런 다음 서버를 다시 시작하십시오. (다시 시작은 OS에 따라 다릅니다.)
계획 C: mysql의 "루트" 사용자로 로그인하고 SET GLOBAL innodb_file_per_table = 1;
. 이후(로그아웃할 때까지) _이 연결이 이루어지는 테이블CREATEs
테이블당 파일이 되는 테이블이 됩니다. 또한 해당 설정은 "전역"이므로 로그인하는 다른 사람에게도 적용됩니다.~ 후에하는 일SET
것과~ 전에그런 다음 다시 시작합니다(또는 플래그를 끕니다).
계획 D: (MySQL 8.0에서만) 루트는 옵션 SET
을 사용 하여 이를 수행할 수 있습니다 PERSIST
. (그러나 자세한 내용은 다루지 않겠습니다.)
주의 사항: 다양한 설정에는 다양한 규칙이 있습니다. 이 4가지 계획은 다음과 같습니다.일부설정. 다른 설정에는 더 적거나 더 많은 계획이 적용됩니다. 한 가지 단서는 설정이 "전역"인지 "세션"인지 또는 둘 다인지 여부가 문서에 나와 있다는 것입니다.