-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting environment variables. #40
Comments
Hi, Assuming you are using Linux or a Mac, the environment variables need to be set at the start:
|
Hello, Thanks for your reply, i guess it was simpler than i thought it would be. Running this:
Produces this: `{ Error: connect ECONNREFUSED ::1:3306 ` |
Is your server running on localhost? |
As far as i’m aware.
Is there anything special I need to set from the “Mysql” side of this? I’ve created a database named fares with the username/pwd allowing for root.
From: Linus Norton
Sent: 16 September 2018 08:41
To: planarnetwork/dtd2mysql
Cc: Lerring; Author
Subject: Re: [planarnetwork/dtd2mysql] Setting environment variables. (#40)
Is your server running on localhost?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Nothing special. As far as I can see the connection is being refused so it sounds like MySQL is either not running or running on a different port. The default is 3306. Maybe try setting |
Hi, I am running in MacOS and I have the same trouble and I have tried all the above solutions. But I still get errors: $ DATABASE_USERNAME=root DATABASE_PASSWORD=****** DATABASE_NAME=fares dtd2mysql --fares-clean { Error: Unknown database 'fares' Looks like it couldn't find the database. I would appreciate any solutions. Thanks. |
In this case it looks like it can connect to the server but the |
Hi linusnorton, |
Unless you are specifying a remote database server it will assume that there is a server running locally with a database set up called I believe you need to install mysql or mariadb and then run the |
Although it's not clear from the error message, it is failing to connect to the SFTP server. You will need to set your DTD credentials with |
I'll have another look at attempting this when i get the time, could be i was missing SFTP Usernames / Passwords also |
Thank you for the replies, I also found that to |
Sign up to http:https://data.atoc.org/ |
I have no problem to use my username and password to login the above webpage and download the data (as the image). However, I still got error. Any idea how it happends? eduroam-int-dhcp-97-183-81:dtd2mysql pnc$ DATABASE_NAME=fares SFTP_USERNAME=PNCHEN SFTP_PASSWORD=********* dtd2mysql --get-fares |
Can you try connecting manually? I believe the default SFTP server is set to to DTD you might need to use a different one. You can set |
I am not sure if this setting of SFTP server is correct? It looks like the port or something else is incorrect. Could you please advice me how to alter it? Or any other issues I have to solve? eduroam-int-dhcp-97-183-81:dtd2mysql pnc$ |
It looks like you're setting |
Hi,
I'm Having trouble setting the environment variables. i have ran:
dtd2mysql DATABASE_NAME=fares
dtd2mysql DATABASE_USERNAME=root
dtd2mysql SET DATABASE_NAME=fares
dtd2mysql SET DATABASE_USERNAME=root
and the only response i get back is the default list of things to type
when i run
dtd2mysql --fares-clean
i get
Error: Please set the DATABASE_NAME environment variable. at Container.get databaseConfiguration [as databaseConfiguration] (/usr/local/lib/node_modules/dtd2mysql/dist/src/cli/Container.js:111:19) at Container.getDatabaseConnection (/usr/local/lib/node_modules/dtd2mysql/dist/src/cli/Container.js:104:82) at Container.descriptor.(anonymous function) (/usr/local/lib/node_modules/dtd2mysql/node_modules/memoized-class-decorator/index.js:28:42) at Container.getCleanFaresCommand (/usr/local/lib/node_modules/dtd2mysql/dist/src/cli/Container.js:60:69) at Container.descriptor.(anonymous function) (/usr/local/lib/node_modules/dtd2mysql/node_modules/memoized-class-decorator/index.js:28:42) at Container.getCommand (/usr/local/lib/node_modules/dtd2mysql/dist/src/cli/Container.js:29:47) at Container.descriptor.(anonymous function) (/usr/local/lib/node_modules/dtd2mysql/node_modules/memoized-class-decorator/index.js:28:42) at Object.<anonymous> (/usr/local/lib/node_modules/dtd2mysql/dist/src/index.js:6:6) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10)
Could i get some assistance please.
The text was updated successfully, but these errors were encountered: