在presto 0.210 以后配置mysql.properties的時候,對於jdbc-url屬性配置后面要加上對應要鏈接的database connection-url=jdbc:mysql://127.0.0.1:3306/presto_test
但是在0.210之前的版本如果加上這個就會拋出異常 Caused by: java.lang.IllegalArgumentException: Database (catalog) must not be specified in JDBC URL for MySQL connector
如圖:
當使用的presto版本低於0.210以下的需要把connection-url=jdbc:mysql://127.0.0.1:3306/presto_test 后面的database去掉即是不要presto_test改為connection-url=jdbc:mysql://127.0.0.1:3306 即可