How can I get rid of these comments in a MySQL dump?

WHOA! These aren’t really comments even though they look that way. They are conditional-execution tokens. Take this line: /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; If the version of mySQL is 4.00.14 or higher, then the MySQL server will run this statement. This magic comment syntax is documented in the Comment Syntax section of the manual. You … Read more

Node.js: SyntaxError: Cannot use import statement outside a module

In order to use the import syntax (ESModules), you need to add the following to your package.json at the top level: { // … “type”: “module” } If you are using a version of Node earlier than 13, you additionally need to use the –experimental-modules flag when you run the program: node –experimental-modules program.js

mysqldump – Export structure only without autoincrement

You can do this : mysqldump -u root -p -h <db-host> –opt <db-name> -d –single-transaction | sed ‘s/ AUTO_INCREMENT=[0-9]*\b//’ > <filename>.sql As mentioned by others, If you want sed to works properly, add the g (for global replacement) parameter like this : mysqldump -u root -p -h <db-host> –opt <db-name> -d –single-transaction | sed ‘s/ … Read more

set environment variable in python script

bash: LD_LIBRARY_PATH=my_path sqsub -np $1 /path/to/executable Similar, in Python: import os import subprocess import sys os.environ[‘LD_LIBRARY_PATH’] = “my_path” # visible in this process + all children subprocess.check_call([‘sqsub’, ‘-np’, sys.argv[1], ‘/path/to/executable’], env=dict(os.environ, SQSUB_VAR=”visible in this subprocess”))

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)