title: InvalidRequestError: VARCHAR requires a length on dialect mysql
body: <p>I am trying to create a remote database using mysql on an Ubuntu machine running 12.04.</p>
  
  <p>It has a root user with remote login enabled and no password.I have started the server.</p>
  
  <p>output of </p>
  
  <pre><code>sudo netstat -tap | grep mysql
  </code></pre>
  
  <p>shows </p>
  
  <pre><code>tcp        0      0 localhost:mysql         *:*                     LISTEN      13246/mysqld
  </code></pre>
  
  <p>I have created a database called nwtopology using (as mentioned root doesn't have a password yet.)</p>
  
  <pre><code> create database nwtopology
   grant all privileges on *.* to root@192.168.129.221
   FLUSH PRIVILEGES;
  </code></pre>
  
  <p>From the client machine that also runs Ubuntu 12.04 I use a python script to connect to the remote mysql database using sqlalchemy.</p>
  
  <pre><code>from pox.core import core
  import pox.openflow.libopenflow_01 as of
  import re
  import datetime
  import time
  from sqlalchemy import create_engine, ForeignKey
  from sqlalchemy import Column, Date, Integer, String
  from sqlalchemy.ext.declarative import declarative_base
  from sqlalchemy.orm import relationship, backref
  from sqlalchemy import create_engine
  from sqlalchemy.orm import sessionmaker
  from sqlalchemy.sql.expression import exists
  
  log = core.getLogger()
  engine = create_engine('mysql://root@192.168.129.139/nwtopology', echo=False)
  Base = declarative_base()
  Session = sessionmaker(bind=engine)
  session = Session()
  
  class SourcetoPort(Base):
      """"""
      __tablename__ = 'source_to_port'
      id = Column(Integer, primary_key=True)
      port_no        = Column(Integer)
      src_address    = Column(String,index=True)
  
      #-----------------------------------------
      def __init__(self, src_address,port_no):
          """"""
          self.src_address = src_address
          self.port_no     = port_no
  
  
  #create tables
  Base.metadata.create_all(engine)
  </code></pre>
  
  <p>The last line </p>
  
  <pre><code>Base.metadata.create_all(engine)
  </code></pre>
  
  <p>returns the error</p>
  
  <pre><code> File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/compiler.py", line 1699, in visit_string
      return self.visit_VARCHAR(type_)
    File "/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py", line 1654, in visit_VARCHAR
      self.dialect.name)
  InvalidRequestError: VARCHAR requires a length on dialect mysql
  </code></pre>
  
  <p>What does this mean? how can I set VARCHAR length on mysql? I am very new to sqlalchemy and mysql.</p>