Ideally you should let mysql read the config file as per the example here: http://stackoverflow.com/questions/5344396/how-to-use-mysql-defaults-file-my-cnf-with-sqlalchemy