Error using csvsql utility in ps csvkit python package on Mac Yosemite

I am new to python and mysql. I am trying to use the csvsql utility in the python csvkit library on Mac OS X Yosemite to create a table in my mysql database and load the data. When i try to run

csvsql --blanks -d "|" -e "utf8" --db mysql://root: mysqlpassword@localhost :3306/MyDBName --table mytablename --insert /Users/victoria/Documents/iWHW/MyCSVFileName.csv 

I get:

You do not have the required database backend installed for the connection string you are trying to use. Available include:

Postgresql: pip install psycopg2 MySQL: pip install MySQL-python

For more information on connection strings and other backends, see the SQLAlchemy dialect documentation at:

http://www.sqlalchemy.org/docs/dialects/

The problem is that I installed MYSQL-python using pip and installed it correctly. I find it difficult to understand why this error persists. Any help is appreciated.

+5
source share
1 answer

I had the same problem and I decided: Make sure that you have only one MySQL installation in your path. I had 2 MySQL server installations, one via brew and the other manually, and / usr / local / bin / mysql pointed to the wrong version. I updated the symlink to my working mysql version and the error went away.

0
source

Source: https://habr.com/ru/post/1212583/


All Articles