Looker 사용자에게 필요한 액세스 권한을 만들고 부여하려면 데이터베이스 언어 및 버전에 해당하는 섹션의 안내를 따르세요.
MySQL 8.0.X:
MySQL 8.0.X에서 기본 인증 플러그인은 caching_sha2_password입니다. Looker는 mysql_native_password 플러그인을 사용하여 JDBC 드라이버를 통해 MySQL 데이터베이스에 인증을 시도합니다. 이 버전의 MySQL이 제대로 작동하려면 다음과 같은 추가 단계를 수행해야 합니다.
mysql_native_password 플러그인을 사용하도록 MySQL 데이터베이스를 구성합니다. 이 작업은 여러 방법으로 수행할 수 있으며, MySQL 8 데이터베이스가 배포되는 방식과 구성에 대한 액세스 유형에 따라 달라집니다.
--default-auth=mysql_native_password 플래그를 사용하여 프로세스를 시작합니다.
이러한 데이터베이스 언어는 영구 파생 테이블(PDT) 생성을 지원합니다. 이 기능은 매우 유용할 수 있으므로 가능하면 사용 설정하는 것이 좋습니다.
PDT를 사용 설정하려면 임시 스키마를 구성해야 합니다. 다음 명령어는 임시 데이터베이스를 만들고 looker 사용자에게 필요한 권한을 부여하는 예시를 보여줍니다.
데이터베이스 연결을 만들 때임시 데이터베이스 필드에 임시 데이터베이스의 이름을 지정할 수 있습니다. 임시 데이터베이스의 이름을 지정하지 않으면 Looker가 looker_tmp라는 스크래치 데이터베이스를 생성합니다. 다음 명령어는 looker_tmp를 사용하지만 다른 임시 데이터베이스 이름을 지정한 경우 looker_tmp 대신 임시 데이터베이스 이름을 사용합니다.
SingleStore의 경우 또는 데이터베이스에 GTID 기반 복제를 사용하는 경우 GTID가 CREATE TABLE AS SELECT 문을 지원하지 않으므로 create_process LookML 매개변수를 사용하여 PDT를 사용해야 합니다.
일반 파생 테이블의 대체 설정
영구 파생 테이블 생성을 허용하지 않으려면 일반 파생 테이블을 계속 사용하면 됩니다. 일반 파생 테이블을 사용하려면 looker_tmp라는 스키마에 특정 권한을 추가해야 합니다. 하지만 looker_tmp 스키마가 실제로 데이터베이스에 존재할 필요는 없습니다.
GRANTSELECT,INDEX,INSERT,DROP,CREATETEMPORARYTABLESONlooker_tmp.*TO'looker'@'%';-- Note that the looker_tmp schema does not need to actually exist,-- even though these permission grants are still needed
max_allowed_packet 변수 설정
MySQL의 경우 "SQLException: 쿼리의 패킷이 너무 큼" 오류를 방지하려면 MySQL max_allowed_packet 변수를 최댓값인 1073741824로 설정합니다.
데이터베이스에 대한 Looker 연결 만들기
데이터베이스 구성을 완료하면 Looker에서 데이터베이스에 연결할 수 있습니다. 다음 단계에 따라 Looker에서 데이터베이스로 이어지는 연결을 만듭니다.
Looker의 관리 섹션에서 연결을 선택한 후 연결 추가를 클릭합니다.
언어 드롭다운 메뉴에서 데이터베이스 언어 이름으로 MySQL, MySQL 8.0.12 이상, MariaDB, SingleStore 또는 SingleStore 7 이상을 선택합니다.
연결 세부정보를 작성합니다. 대다수의 설정은 대부분의 데이터베이스 언어에 공통적으로 적용됩니다. 자세한 내용은 데이터베이스에 Looker 연결 문서 페이지를 참조하세요.
제대로 연결되었는지 확인하려면 테스트를 클릭합니다. 문제 해결 정보는 데이터베이스 연결 테스트 문서 페이지를 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[],[],null,["# MySQL, MariaDB, and SingleStore\n\nDialects that use these instructions\n------------------------------------\n\nMySQL, MariaDB, and SingleStore (formerly MemSQL) share the database setup requirements described on this page.\n\nEncrypting network traffic\n--------------------------\n\nIt is a best practice to encrypt network traffic between the Looker application and your database. Consider one of the options described on the [Enabling secure database access](/looker/docs/enabling-secure-db-access) documentation page.\n\nIf you're interested in using SSL encryption, see this [MySQL documentation page](https://dev.mysql.com/doc/refman/5.7/en/encrypted-connections.html).\n\nUsers and security\n------------------\n\nTo create and grant the required access to the Looker user, follow the instructions in the section appropriate to your database dialect and version:\n\n### MySQL 8.0.X:\n\n| **Note:** The Looker MySQL 8.0.X dialect option is implemented with the patch version 8.0.12+ because of a [MySQL deprecation](https://dev.mysql.com/worklog/task/?id=8693) in implicit sorting in the `GROUP BY` clause. This affects Looker subtotals for MySQL versions 8.0.0 through 8.0.11, causing SQL generation errors. Looker suggests upgrading any MySQL 8.0.X databases to at least 8.0.12 to fully integrate. However, earlier MySQL versions will still work, aside from [subtotals](/looker/docs/table-options#subtotals).\n\nIn MySQL 8.0.X, the default authentication plugin is `caching_sha2_password`. Looker uses the `mysql_native_password` plugin\nto attempt to authenticate to MySQL databases through the JDBC driver. For this version of MySQL to work properly,\nyou must take the following additional steps:\n\n1. Configure the MySQL database to use the `mysql_native_password` plugin. This can be done in multiple ways, and will depend on how your MySQL 8 database is deployed and what type of access you have to the configuration:\n\n - Start the process with the flag `--default-auth=mysql_native_password`\n\n - Set the property in the [`my.cnf`](https://dev.mysql.com/doc/refman/8.0/en/option-files.html) configuration file:\n\n [mysqld]\n default-authentication-plugin=mysql_native_password\n\n - If your database instance is hosted through AWS RDS, set the `default_authentication_plugin` parameter through an RDS Parameter Group that is applied to this database instance.\n2. Run the following commands, replacing `some_password_here` with a unique, secure password:\n\n CREATE USER looker IDENTIFIED WITH mysql_native_password BY 'some_password_here';\n GRANT SELECT ON database_name.* TO 'looker'@'%';\n\n### MySQL 5.7.X and earlier, MariaDB, and SingleStore:\n\nRun the following commands, replacing `some_password_here` with a unique, secure password: \n\n CREATE USER looker;\n SET PASSWORD FOR looker = PASSWORD ('some_password_here');\n GRANT SELECT ON database_name.* TO 'looker'@'%';\n\nTemp schema setup for persistent derived tables\n-----------------------------------------------\n\nThese database dialects support the creation of [persistent derived tables (PDTs)](/looker/docs/derived-tables#persistent-derived-tables). This feature can be very useful, and we recommend enabling it when possible.\n\nTo enable PDTs, you need to configure a temp schema. The following commands show an example of creating a temp database and granting the required privileges to the `looker` user.\nYou can specify the name of the temp database in the [**Temp Database**](/looker/docs/connecting-to-your-db#temp_database) field when [creating your database connection](/looker/docs/connecting-to-your-db). If you don't specify a temp database name, Looker generates a scratch database named `looker_tmp`. The following commands use `looker_tmp`, but if you specified a different temp database name, use your temp database name instead of `looker_tmp`. \n\n CREATE SCHEMA looker_tmp;\n GRANT\n SELECT,\n INDEX,\n INSERT,\n UPDATE,\n DELETE,\n CREATE,\n DROP,\n ALTER,\n CREATE TEMPORARY TABLES\n ON looker_tmp.* TO 'looker'@'%';\n\nFor SingleStore, or if your database uses GTID-based replication, you must use the [`create_process`](/looker/docs/reference/param-view-create-process) LookML parameter to use PDTs, because GTID does not support `CREATE TABLE AS SELECT` statements.\n\nAlternative setup for regular derived tables\n--------------------------------------------\n\nIf you do not want to allow the creation of [persistent derived tables](/looker/docs/derived-tables#persistent-derived-tables), you can still use [regular derived tables](/looker/docs/derived-tables#regular-or-ephemeral-derived-tables). To use regular derived tables, you still need to add certain permissions to a schema called `looker_tmp`. However, the `looker_tmp` schema does not actually need to exist in your database! \n\n GRANT\n SELECT,\n INDEX,\n INSERT,\n DROP,\n CREATE TEMPORARY TABLES\n ON looker_tmp.* TO 'looker'@'%';\n -- Note that the looker_tmp schema does not need to actually exist,\n -- even though these permission grants are still needed\n\nSetting the `max_allowed_packet` variable\n-----------------------------------------\n\nFor MySQL, set the MySQL `max_allowed_packet` variable to its maximum value, 1073741824, to prevent \"SQLException: Packet for query is too large\" errors.\n\nCreating the Looker connection to your database\n-----------------------------------------------\n\nAfter completing the database configuration, you can connect to the database from Looker. Follow these steps to create the connection from Looker to your database:\n\n1. In the **Admin** section of Looker, select **Connections** , and then click **Add Connection**.\n2. From the **Dialect** drop-down menu, select your database dialect name: **MySQL** , **MySQL 8.0.12+** , **MariaDB** , **SingleStore** , or **SingleStore 7+**.\n\n | **Note:** If you are on a [Looker (Google Cloud core)](/looker/docs/looker-core-overview) instance and you don't see your dialect listed in the **Dialect** drop-down menu, see the [Looker (Google Cloud core) documentation](/looker/docs/looker-core-dialects#supported_dialects_for) to verify that the dialect is supported for Looker (Google Cloud core) instances.\n3. Fill out the connection details. The majority of the settings are common to most database dialects. See the [Connecting Looker to your database](/looker/docs/connecting-to-your-db) documentation page for information.\n\n4. To verify that the connection is successful, click **Test** . See the [Testing database connectivity](/looker/docs/testing-db-connectivity) documentation page for troubleshooting information.\n\n5. To save these settings, click **Connect**.\n\nFeature support\n---------------\n\nFor Looker to support some features, your database dialect must also support them.\n\nMySQL supports the following features as of Looker 25.14:\n\nMySQL 8.0.12+ supports the following features as of Looker 25.14:\n\nMariaDB supports the following features as of Looker 25.14:\n\nSingleStore supports the following features as of Looker 25.14:\n\nSingleStore 7+ supports the following features as of Looker 25.14:"]]