Fein, habe die Lösung bekommen.


The problem is that the user you are using has not enough permissions. The CSV file is being read from the data directory of the MySQL server and you are executing the script with user 'gutschy', but the MySQL server is (probably) running using the system user 'mysql'.

However, you probably want to load the data a bit differently. You want to use the LOAD DATA LOCAL INFILE (note the 'LOCAL' keyboard). This means that the file will be uploaded to the MySQL server and then imported.

Here are the relevant changes to your code:

con = mdb.connect('localhost', 'user', 'passw', 'pizzadb2', charset='utf8'
local_infile=1)

..
with con:
..
cur.execute("LOAD DATA LOCAL INFILE 'Adressliste_forum1_v4.csv'\
..
For this to work, however, you need to change the MySQL server configuration. On Debian I like to do it adding an extra option file /etc/mysql/conf.d/server.cnf:

[mysqld]
local-infile=1
Restart the MySQL server, and try your script using LOAD DATA LOCAL INFILE. Permissions should be OK.