[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Testing database connectivity for customer-hosted instances\n\nWhen you're troubleshooting a new environment, it is often helpful to isolate the various components in play and test them in isolation as simply as possible.\n\nFor [customer-hosted](/looker/docs/glossary#customer-hosted) Looker instances, you can test the connectivity between your Looker server and your database using Telnet on your Looker server to create a TCP connection. The advantage of using Telnet is that there are no configuration files to modify and no authentication is required. Telnet either makes the connection or it does not.\n\nOnce you know that the database is accessible, you can move on to testing using applications such as your database's built-in client, or Looker.\n\n### Installing Telnet\n\nSome hosts may come with Telnet pre-installed. To test this, run this command on your Looker server: \n\n telnet ?\n\nYou should see something like this: \n\n usage: telnet [-l user] [-a] [-s src_addr] host-name [port]\n\nIf you get a \"command not found\" error, you will need to install Telnet.\n\nOn Ubuntu: \n\n sudo apt-get install telnet\n\nOn Redhat/CentOS: \n\n yum install telnet\n\n### Default ports\n\nYou will need to know on which port your database is running. The following table\nlists the default ports for a number of platforms, although your database may be\nconfigured to run on a different port. Consult your database administrator.\n\n### Connecting to your database with Telnet\n\nTo test the connection to your database, run the `telnet hostname port` on your Looker server. For example, if you're running MySQL on the default port and your database name is **mydb** , the command would be `telnet mydb 3306`.\n\nIf the connection is working, you will see something similar to this: \n\n Trying 10.10.10.10...\n Connected to mydb.\n Escape character is '^]'.\n\nIf the connection is NOT working, you will see something like one of these: \n\n Trying 10.10.10.10...\n telnet: Unable to connect to remote host: Connection timed out\n\n Trying 127.0.0.1...\n telnet: Unable to connect to remote host: Connection refused\n\n telnet: could not resolve mydb/telnet: Name or service not known\n\nIf you're able to Telnet from your Looker server to your database server's port, you can rule out basic connectivity issues.\n\nOther troubleshooting tips\n--------------------------\n\nIf the Telnet check is not successful, consider the following:\n\n- Is the hostname correct?\n- Are the database and Looker server configured to allow the network traffic between them? Check any installed firewall software on both hosts.\n- Are all the networks between the Looker server and the database hosts configured to allow the network traffic? Check firewalls and network Access Control Lists (ACLs).\n- Are all the networks between the Looker server and the database hosts configured correctly to route traffic between the hosts?\n- Is the database server running, is it listening on the correct port, and is it configured to allow connections from the Looker server?\n\nIf you're still having trouble, contact Looker Support for assistance."]]