NoneType object has no attribute 'connect' while connecting to MySQL server
You need to install a MySQL python driver like pymysql.

    pip install pymysql It worked! Thanks :grinning:
I've created a MySQL server on my server but whenever I try to connect to it in PeeWee I get this error:

```
>>> from peewee import *
>>> db = MySQLDatabase('tormecapp', user='tormecapp', password='************')
>>> db.connect()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/eliap/.local/lib/python3.5/site-packages/peewee.py", line 2434, in connect
    self._state.set_connection(self._connect())
  File "/home/eliap/.local/lib/python3.5/site-packages/peewee.py", line 3108, in _connect
    return mysql.connect(db=self.database, **self.connect_params)
AttributeError: 'NoneType' object has no attribute 'connect'
```

I'm doing this on the same machine as the MySQL server
This works:
`mysql -u tormecapp -p tormecapp`
so why doesn't peewee as well?