Answer the question
In order to leave comments, you need to log in
How to correctly deploy multiple tables when reading from a .sql file?
There is a file .sql in which tables are described. There is a python3 script that reads from this file and executes what is read as a request. The module for working with the database is pymysql.
Error 1064 (syntax error) occurs when executing:
1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE TABLE `History` (\n\t`id` INT NOT NULL,\n\t`item_id` INT NOT NULL,\n\t`date` D' at line 15"
Answer the question
In order to leave comments, you need to log in
The solution was found: https://stackoverflow.com/questions/36946444/readi...
Apparently, execute cannot do a lot of requests at once, so you have to execute them one by one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question