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

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















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










share|improve this question
























  • 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-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
















0















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










share|improve this question
























  • 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-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














0












0








0








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










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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


















  • 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-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

















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











1 Answer
1






active

oldest

votes


















1














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





share|improve this answer






















    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
    );



    );













    draft saved

    draft discarded


















    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









    1














    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





    share|improve this answer



























      1














      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





      share|improve this answer

























        1












        1








        1







        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





        share|improve this answer













        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






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 28 at 15:34









        RoVoRoVo

        3,407317




        3,407317



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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






            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)