Login into Mysql without startx

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











up vote
0
down vote

favorite












I have had install Damn small Linux(DSL) 10 in Virtual Box with MySQL 5. I created already a database with a Table and Data in it. I can access it over the terminal with the following line:



mysql -u dsl


During this, DSL is startes with startx (GUI). But if I start DSL without startx (its not anymore in .bash_profile) I'll get access to DSL over the Terminal (tty1) automatically.



The Problem at this point. If DSL started without startx, its not possible to get access to Mysql by give in the line:



mysql -u dsl


The Screenshot is here:
enter image description here
How its possible to solve this problem.







share|improve this question




















  • Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
    – xenoid
    Dec 7 '17 at 23:06














up vote
0
down vote

favorite












I have had install Damn small Linux(DSL) 10 in Virtual Box with MySQL 5. I created already a database with a Table and Data in it. I can access it over the terminal with the following line:



mysql -u dsl


During this, DSL is startes with startx (GUI). But if I start DSL without startx (its not anymore in .bash_profile) I'll get access to DSL over the Terminal (tty1) automatically.



The Problem at this point. If DSL started without startx, its not possible to get access to Mysql by give in the line:



mysql -u dsl


The Screenshot is here:
enter image description here
How its possible to solve this problem.







share|improve this question




















  • Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
    – xenoid
    Dec 7 '17 at 23:06












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have had install Damn small Linux(DSL) 10 in Virtual Box with MySQL 5. I created already a database with a Table and Data in it. I can access it over the terminal with the following line:



mysql -u dsl


During this, DSL is startes with startx (GUI). But if I start DSL without startx (its not anymore in .bash_profile) I'll get access to DSL over the Terminal (tty1) automatically.



The Problem at this point. If DSL started without startx, its not possible to get access to Mysql by give in the line:



mysql -u dsl


The Screenshot is here:
enter image description here
How its possible to solve this problem.







share|improve this question












I have had install Damn small Linux(DSL) 10 in Virtual Box with MySQL 5. I created already a database with a Table and Data in it. I can access it over the terminal with the following line:



mysql -u dsl


During this, DSL is startes with startx (GUI). But if I start DSL without startx (its not anymore in .bash_profile) I'll get access to DSL over the Terminal (tty1) automatically.



The Problem at this point. If DSL started without startx, its not possible to get access to Mysql by give in the line:



mysql -u dsl


The Screenshot is here:
enter image description here
How its possible to solve this problem.









share|improve this question











share|improve this question




share|improve this question










asked Dec 7 '17 at 13:10









Doan

63




63











  • Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
    – xenoid
    Dec 7 '17 at 23:06
















  • Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
    – xenoid
    Dec 7 '17 at 23:06















Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
– xenoid
Dec 7 '17 at 23:06




Not an answer to your question, but these days, VirtualBox+DSL is very often replaceable by a much lighter (and faster to start) Docker container. You'll find containers with MySQL pre-installed and other containers with an admin interface to it.
– xenoid
Dec 7 '17 at 23:06










3 Answers
3






active

oldest

votes

















up vote
2
down vote













That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.



When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.



Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.

To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.






share|improve this answer



























    up vote
    0
    down vote













    One possible option is to add



    /usr/local/mysql/bin 


    to your PATH by running



    export PATH=$PATH;/usr/local/mysql/bin


    else by adding this path to your ~/.bash_profile



    But you can also type the whole path to mysql utility



    /usr/local/mysql/bin/mysql -u dsl


    By default installing Mysql it's not updating by anyway the PATH.



    Hope this helps






    share|improve this answer



























      up vote
      0
      down vote













      Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as



      /usr/local/mysql/bin/mysql -u dsl





      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',
        convertImagesToLinks: false,
        noModals: false,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        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%2f409471%2flogin-into-mysql-without-startx%23new-answer', 'question_page');

        );

        Post as a guest






























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        2
        down vote













        That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.



        When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.



        Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.

        To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.






        share|improve this answer
























          up vote
          2
          down vote













          That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.



          When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.



          Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.

          To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.






          share|improve this answer






















            up vote
            2
            down vote










            up vote
            2
            down vote









            That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.



            When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.



            Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.

            To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.






            share|improve this answer












            That looks like a PATH issue. When you type a command name in the terminal like you do when typing mysql, actually the terminal is trying to find it in folder specified in the PATH variable, and I guess that variable doesn't contain the same folder when you're running X and when you are not.



            When you are running with X, and you can use mysql, type whereis -b mysql, you should get something like /path/to/mysql or similar.



            Then go into your no-X session and type that full path /path/to/mysql -u dsl and it should work.

            To make it permanent you have to modify your .bash_profile if you are using bash. Write a line like this : export PATH='/path/to:$PATH and then from the command line . .bash_profile or reconnect yourself.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 7 '17 at 13:32









            Pierre-Alain TORET

            31617




            31617






















                up vote
                0
                down vote













                One possible option is to add



                /usr/local/mysql/bin 


                to your PATH by running



                export PATH=$PATH;/usr/local/mysql/bin


                else by adding this path to your ~/.bash_profile



                But you can also type the whole path to mysql utility



                /usr/local/mysql/bin/mysql -u dsl


                By default installing Mysql it's not updating by anyway the PATH.



                Hope this helps






                share|improve this answer
























                  up vote
                  0
                  down vote













                  One possible option is to add



                  /usr/local/mysql/bin 


                  to your PATH by running



                  export PATH=$PATH;/usr/local/mysql/bin


                  else by adding this path to your ~/.bash_profile



                  But you can also type the whole path to mysql utility



                  /usr/local/mysql/bin/mysql -u dsl


                  By default installing Mysql it's not updating by anyway the PATH.



                  Hope this helps






                  share|improve this answer






















                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    One possible option is to add



                    /usr/local/mysql/bin 


                    to your PATH by running



                    export PATH=$PATH;/usr/local/mysql/bin


                    else by adding this path to your ~/.bash_profile



                    But you can also type the whole path to mysql utility



                    /usr/local/mysql/bin/mysql -u dsl


                    By default installing Mysql it's not updating by anyway the PATH.



                    Hope this helps






                    share|improve this answer












                    One possible option is to add



                    /usr/local/mysql/bin 


                    to your PATH by running



                    export PATH=$PATH;/usr/local/mysql/bin


                    else by adding this path to your ~/.bash_profile



                    But you can also type the whole path to mysql utility



                    /usr/local/mysql/bin/mysql -u dsl


                    By default installing Mysql it's not updating by anyway the PATH.



                    Hope this helps







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 7 '17 at 13:34









                    admstg

                    344




                    344




















                        up vote
                        0
                        down vote













                        Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as



                        /usr/local/mysql/bin/mysql -u dsl





                        share|improve this answer
























                          up vote
                          0
                          down vote













                          Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as



                          /usr/local/mysql/bin/mysql -u dsl





                          share|improve this answer






















                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as



                            /usr/local/mysql/bin/mysql -u dsl





                            share|improve this answer












                            Assuming you don't need to do it regularly, the easiest way is to invoke mysql with the full path as



                            /usr/local/mysql/bin/mysql -u dsl






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 7 '17 at 22:56









                            PiedPiper

                            591210




                            591210



























                                 

                                draft saved


                                draft discarded















































                                 


                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409471%2flogin-into-mysql-without-startx%23new-answer', 'question_page');

                                );

                                Post as a guest













































































                                Popular posts from this blog

                                Peggy Mitchell

                                Palaiologos

                                The Forum (Inglewood, California)