You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a database newbie. I'm currently trying to create a db with mysql+aiomysql by reading a local csv file.
I thought the correct way of doing this was using the command LOAD DATA LOCAL INFILE, therefore I connect to the database like this:
database = Database('mysql+aiomysql://{user}:{passwd}@{host}/{db}?local-infile=1'.format( #try also with local_infile=1
host='xxx',
user='xxx',
passwd='xxx',
db='xxx'))
await database.connect()
with ?local-infile=1 to enable client's side local data. I also did SET GLOBAL local_infile = true to enable it on server's side. Finally, I also set secure-file-priv = "".
Nonetheless, when I execute "LOAD DATA LOCAL INFILE '/home/routes.txt' INTO TABLE routes;" I get this error "pymysql.err.OperationalError: (3948, 'Loading local data is disabled; this must be enabled on both the client and server sides')".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm a database newbie. I'm currently trying to create a db with mysql+aiomysql by reading a local csv file.
I thought the correct way of doing this was using the command LOAD DATA LOCAL INFILE, therefore I connect to the database like this:
database = Database('mysql+aiomysql://{user}:{passwd}@{host}/{db}?local-infile=1'.format( #try also with local_infile=1
host='xxx',
user='xxx',
passwd='xxx',
db='xxx'))
await database.connect()
with ?local-infile=1 to enable client's side local data. I also did SET GLOBAL local_infile = true to enable it on server's side. Finally, I also set secure-file-priv = "".
Nonetheless, when I execute "LOAD DATA LOCAL INFILE '/home/routes.txt' INTO TABLE
routes
;" I get this error "pymysql.err.OperationalError: (3948, 'Loading local data is disabled; this must be enabled on both the client and server sides')".What am I missing here?
Beta Was this translation helpful? Give feedback.
All reactions