How to send data from Raspberry pi to Remote SQL DB without installing mysql or mysql Client

Clash Royale CLAN TAG#URR8PPP
Hi I am new to Linux environment I would like send some port checking data and a timestamp ( both saved as a variable) to my remote Mysql DB running on a linux Node machine . I don't want install sql or sql client in Pi because the device having enough load already
shell-script raspberry-pi mysql tcp
add a comment |
Hi I am new to Linux environment I would like send some port checking data and a timestamp ( both saved as a variable) to my remote Mysql DB running on a linux Node machine . I don't want install sql or sql client in Pi because the device having enough load already
shell-script raspberry-pi mysql tcp
You seem to have previously asked a question about transferring files to a remote server. Using the same approach, you could collect your data into a local file first, and then send it across.
– Haxiel
Feb 28 at 15:10
maybe rsyslog with MySQL? see opensourceforu.com/2015/10/…
– Bodo
Feb 28 at 15:23
Can you ssh from the pi to the database server?
– RoVo
Feb 28 at 15:24
If you just want to insert the data into MySQL on your server then you can just installmysql-community-clienton your Raspberry Pi. It won't use many resources. That will just provide themysqlcommand which you can use to connect themysqlon your server after you've allowed remote connections. Another way is to installphpmyadminon the server and use the web interface to enter data. You can alsosshinto the server and input the data that way as previously mentioned.
– Nasir Riley
Feb 28 at 15:46
add a comment |
Hi I am new to Linux environment I would like send some port checking data and a timestamp ( both saved as a variable) to my remote Mysql DB running on a linux Node machine . I don't want install sql or sql client in Pi because the device having enough load already
shell-script raspberry-pi mysql tcp
Hi I am new to Linux environment I would like send some port checking data and a timestamp ( both saved as a variable) to my remote Mysql DB running on a linux Node machine . I don't want install sql or sql client in Pi because the device having enough load already
shell-script raspberry-pi mysql tcp
shell-script raspberry-pi mysql tcp
edited Feb 28 at 15:44
GAD3R
27.5k1858114
27.5k1858114
asked Feb 28 at 14:55
Vishnu v.nairVishnu v.nair
33
33
You seem to have previously asked a question about transferring files to a remote server. Using the same approach, you could collect your data into a local file first, and then send it across.
– Haxiel
Feb 28 at 15:10
maybe rsyslog with MySQL? see opensourceforu.com/2015/10/…
– Bodo
Feb 28 at 15:23
Can you ssh from the pi to the database server?
– RoVo
Feb 28 at 15:24
If you just want to insert the data into MySQL on your server then you can just installmysql-community-clienton your Raspberry Pi. It won't use many resources. That will just provide themysqlcommand which you can use to connect themysqlon your server after you've allowed remote connections. Another way is to installphpmyadminon the server and use the web interface to enter data. You can alsosshinto the server and input the data that way as previously mentioned.
– Nasir Riley
Feb 28 at 15:46
add a comment |
You seem to have previously asked a question about transferring files to a remote server. Using the same approach, you could collect your data into a local file first, and then send it across.
– Haxiel
Feb 28 at 15:10
maybe rsyslog with MySQL? see opensourceforu.com/2015/10/…
– Bodo
Feb 28 at 15:23
Can you ssh from the pi to the database server?
– RoVo
Feb 28 at 15:24
If you just want to insert the data into MySQL on your server then you can just installmysql-community-clienton your Raspberry Pi. It won't use many resources. That will just provide themysqlcommand which you can use to connect themysqlon your server after you've allowed remote connections. Another way is to installphpmyadminon the server and use the web interface to enter data. You can alsosshinto the server and input the data that way as previously mentioned.
– Nasir Riley
Feb 28 at 15:46
You seem to have previously asked a question about transferring files to a remote server. Using the same approach, you could collect your data into a local file first, and then send it across.
– Haxiel
Feb 28 at 15:10
You seem to have previously asked a question about transferring files to a remote server. Using the same approach, you could collect your data into a local file first, and then send it across.
– Haxiel
Feb 28 at 15:10
maybe rsyslog with MySQL? see opensourceforu.com/2015/10/…
– Bodo
Feb 28 at 15:23
maybe rsyslog with MySQL? see opensourceforu.com/2015/10/…
– Bodo
Feb 28 at 15:23
Can you ssh from the pi to the database server?
– RoVo
Feb 28 at 15:24
Can you ssh from the pi to the database server?
– RoVo
Feb 28 at 15:24
If you just want to insert the data into MySQL on your server then you can just install
mysql-community-client on your Raspberry Pi. It won't use many resources. That will just provide the mysql command which you can use to connect the mysql on your server after you've allowed remote connections. Another way is to install phpmyadmin on the server and use the web interface to enter data. You can also ssh into the server and input the data that way as previously mentioned.– Nasir Riley
Feb 28 at 15:46
If you just want to insert the data into MySQL on your server then you can just install
mysql-community-client on your Raspberry Pi. It won't use many resources. That will just provide the mysql command which you can use to connect the mysql on your server after you've allowed remote connections. Another way is to install phpmyadmin on the server and use the web interface to enter data. You can also ssh into the server and input the data that way as previously mentioned.– Nasir Riley
Feb 28 at 15:46
add a comment |
1 Answer
1
active
oldest
votes
If you can ssh to the database server, you can run mysql directly on the server via ssh:
ssh user@dbserver
mysql -u USER -p PASSWORD
-e "insert into table (data, timestamp) VALUES ('$data','$timestamp') "
database-name
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503566%2fhow-to-send-data-from-raspberry-pi-to-remote-sql-db-without-installing-mysql-or%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you can ssh to the database server, you can run mysql directly on the server via ssh:
ssh user@dbserver
mysql -u USER -p PASSWORD
-e "insert into table (data, timestamp) VALUES ('$data','$timestamp') "
database-name
add a comment |
If you can ssh to the database server, you can run mysql directly on the server via ssh:
ssh user@dbserver
mysql -u USER -p PASSWORD
-e "insert into table (data, timestamp) VALUES ('$data','$timestamp') "
database-name
add a comment |
If you can ssh to the database server, you can run mysql directly on the server via ssh:
ssh user@dbserver
mysql -u USER -p PASSWORD
-e "insert into table (data, timestamp) VALUES ('$data','$timestamp') "
database-name
If you can ssh to the database server, you can run mysql directly on the server via ssh:
ssh user@dbserver
mysql -u USER -p PASSWORD
-e "insert into table (data, timestamp) VALUES ('$data','$timestamp') "
database-name
answered Feb 28 at 15:34
RoVoRoVo
3,407317
3,407317
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503566%2fhow-to-send-data-from-raspberry-pi-to-remote-sql-db-without-installing-mysql-or%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You seem to have previously asked a question about transferring files to a remote server. Using the same approach, you could collect your data into a local file first, and then send it across.
– Haxiel
Feb 28 at 15:10
maybe rsyslog with MySQL? see opensourceforu.com/2015/10/…
– Bodo
Feb 28 at 15:23
Can you ssh from the pi to the database server?
– RoVo
Feb 28 at 15:24
If you just want to insert the data into MySQL on your server then you can just install
mysql-community-clienton your Raspberry Pi. It won't use many resources. That will just provide themysqlcommand which you can use to connect themysqlon your server after you've allowed remote connections. Another way is to installphpmyadminon the server and use the web interface to enter data. You can alsosshinto the server and input the data that way as previously mentioned.– Nasir Riley
Feb 28 at 15:46