Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-107

syntax error when running airflow initdb with mysql connection

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.7.0
    • Fix Version/s: None
    • Component/s: database
    • Labels:

      Description

      Not sure if I've setup my mysql database correctly or not, assume that you just specify a connection string to a mysql server and port? In any case, I'm getting a syntax error when running 'airflow initdb'

        cursor.execute(statement, parameters)
        File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 226, in execute
        File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
      sqlalchemy.exc.ProgrammingError: (_mysql_exceptions.ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connection (\n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\tconn_id VARCHAR(250), \n\tconn' at line 1") [SQL: u'\nCREATE TABLE connection (\n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\tconn_id VARCHAR(250), \n\tconn_type VARCHAR(500), \n\thost VARCHAR(500), \n\t`schema` VARCHAR(500), \n\tlogin VARCHAR(500), \n\tpassword VARCHAR(500), \n\tport INTEGER, \n\textra VARCHAR(5000), \n\tPRIMARY KEY (id)\n)\n\n']
      

      python 2.7.11,
      mysqlclient 1.3.7,
      sqlalchemy 1.0.12
      mysql Ver 14.14 Distrib 5.5.14, for Linux (x86_64) using EditLine wrapper
      Server version: 5.0.27-max MySQL Community Edition - Experimental (GPL)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              james.yoo+airflow@gmail.com James Yoo
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: