How do I start the MySQL console in XAMPP?












16















The XAMPP installation is done. XAMPP is up and running.



What about the MySQL console?
How is possible to start the MySQL console to run some special SQL statements?










share|improve this question

























  • Remember there are a lot better ways to deploy web server in Ubuntu than XAMPP. They're also easier and more reliable. Create a new question if you want to know the process.

    – Richard Rodriguez
    Jan 13 '12 at 20:29
















16















The XAMPP installation is done. XAMPP is up and running.



What about the MySQL console?
How is possible to start the MySQL console to run some special SQL statements?










share|improve this question

























  • Remember there are a lot better ways to deploy web server in Ubuntu than XAMPP. They're also easier and more reliable. Create a new question if you want to know the process.

    – Richard Rodriguez
    Jan 13 '12 at 20:29














16












16








16


5






The XAMPP installation is done. XAMPP is up and running.



What about the MySQL console?
How is possible to start the MySQL console to run some special SQL statements?










share|improve this question
















The XAMPP installation is done. XAMPP is up and running.



What about the MySQL console?
How is possible to start the MySQL console to run some special SQL statements?







mysql console






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 23 '13 at 11:05









Nanne

5,42933347




5,42933347










asked Jan 13 '12 at 19:50









Claus KaldeichClaus Kaldeich

81113




81113













  • Remember there are a lot better ways to deploy web server in Ubuntu than XAMPP. They're also easier and more reliable. Create a new question if you want to know the process.

    – Richard Rodriguez
    Jan 13 '12 at 20:29



















  • Remember there are a lot better ways to deploy web server in Ubuntu than XAMPP. They're also easier and more reliable. Create a new question if you want to know the process.

    – Richard Rodriguez
    Jan 13 '12 at 20:29

















Remember there are a lot better ways to deploy web server in Ubuntu than XAMPP. They're also easier and more reliable. Create a new question if you want to know the process.

– Richard Rodriguez
Jan 13 '12 at 20:29





Remember there are a lot better ways to deploy web server in Ubuntu than XAMPP. They're also easier and more reliable. Create a new question if you want to know the process.

– Richard Rodriguez
Jan 13 '12 at 20:29










7 Answers
7






active

oldest

votes


















24














just start mysql using the command



example: sudo /opt/lampp/lampp startmysql



and find path of mysql , it will be placed in bin directory of lampp, then login



example: /opt/lampp/bin/mysql -u root






share|improve this answer


























  • that is perfect ans for linux xampp

    – Murtuza Zabuawala
    Jun 16 '18 at 4:44



















5














From the terminal type mysql -uUSER -pPASSWORD DATABASE which is:



mysql The actual command to use mysql



-uUSER is what user will connect. The -u is the parameter for the user and the USER part is the actual name of the user.



-pPASSWORD is the password for that user. the -p is the parameter for the password and the PASSWORD is the actual password.



the DATABASE part is optional. Is just if you want to connect directly to a particular database. For example, let us say the user cyrex with password ubuntu wants to connect to the database linux, you would type this:



mysql -ucyrex -pubuntu linux (User is cyrex, password is ubuntu and the database is linux)



if you do not add the database you can eventually go to it by using the use statement of mysql or searching for the database with show databases;






share|improve this answer



















  • 1





    +1: This is the usual solution, but I'm afraid that XAMPP doesn't actually deploy mysql like this. I don't use XAMPP so I'm not sure, but my friend has it and I hate its every bit. If my assumptions are true, your solution might not work for the OP, but it's still correct.

    – Richard Rodriguez
    Jan 13 '12 at 20:34



















1














Maybe you're wondering about the package Apache Friends Xampp. The only way init is MySql



~$ sudo /opt/lampp/lampp startmysql


If it's something






share|improve this answer































    1














    The latest version of Xampp's Control Panel has a shell button, click that and it may show a dialog box saying that the #bat file needs to be created, and if it should create it now.. You should say Yes.



    After that, it will open a console window.
    From that console window you can easily access mysql by typing the following.



    mysql -u mysqluser --p mysqlpass



    in my own personal installation i use the below (because i don't have a pass set for user @root).



    mysql -u root



    Btw, if it isn't obvious already I am using windows, so there could be some differences in the ubuntu version.



    Hope this helps someone..






    share|improve this answer































      1














      First use this command in shell (Ubuntu):



      ubuntu@ubuntu-PowerEdge-2850:~$ sudo /opt/lampp/lampp startmysql 


      Second use this command in shell (Ubuntu):



      ubuntu@ubuntu-PowerEdge-2850:~$ /opt/lampp/bin/mysql -u root -p database < "/opt/lampp/htdocs/database.sql" 


      Enter password: (Press Enter)






      share|improve this answer


























      • Why are you importing a database.sql file and the question was specific to just starting the console?

        – Parto
        Apr 1 '16 at 9:05



















      0














      My solution is:



      sudo /opt/lampp/lampp status
      sudo /opt/lampp/lampp startmysql
      sudo /opt/lampp/lampp status
      cd /opt/lampp/bin
      ./mysql -h localhost test





      share|improve this answer

































        0














        To start the Apache, MySQL and ProFTPD server you have to just type the following command.



         ~$ sudo /opt/lampp/lampp start


        To open the MySQL or MariaDB console (Terminal) you have to just type the following command.



         ~$ sudo /opt/lampp/bin/mysql





        share|improve this answer
























          protected by Community Jan 28 at 14:45



          Thank you for your interest in this question.
          Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



          Would you like to answer one of these unanswered questions instead?














          7 Answers
          7






          active

          oldest

          votes








          7 Answers
          7






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          24














          just start mysql using the command



          example: sudo /opt/lampp/lampp startmysql



          and find path of mysql , it will be placed in bin directory of lampp, then login



          example: /opt/lampp/bin/mysql -u root






          share|improve this answer


























          • that is perfect ans for linux xampp

            – Murtuza Zabuawala
            Jun 16 '18 at 4:44
















          24














          just start mysql using the command



          example: sudo /opt/lampp/lampp startmysql



          and find path of mysql , it will be placed in bin directory of lampp, then login



          example: /opt/lampp/bin/mysql -u root






          share|improve this answer


























          • that is perfect ans for linux xampp

            – Murtuza Zabuawala
            Jun 16 '18 at 4:44














          24












          24








          24







          just start mysql using the command



          example: sudo /opt/lampp/lampp startmysql



          and find path of mysql , it will be placed in bin directory of lampp, then login



          example: /opt/lampp/bin/mysql -u root






          share|improve this answer















          just start mysql using the command



          example: sudo /opt/lampp/lampp startmysql



          and find path of mysql , it will be placed in bin directory of lampp, then login



          example: /opt/lampp/bin/mysql -u root







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 23 '12 at 3:10









          Jorge Castro

          36.8k106422617




          36.8k106422617










          answered Aug 23 '12 at 2:51









          RashiRashi

          24122




          24122













          • that is perfect ans for linux xampp

            – Murtuza Zabuawala
            Jun 16 '18 at 4:44



















          • that is perfect ans for linux xampp

            – Murtuza Zabuawala
            Jun 16 '18 at 4:44

















          that is perfect ans for linux xampp

          – Murtuza Zabuawala
          Jun 16 '18 at 4:44





          that is perfect ans for linux xampp

          – Murtuza Zabuawala
          Jun 16 '18 at 4:44













          5














          From the terminal type mysql -uUSER -pPASSWORD DATABASE which is:



          mysql The actual command to use mysql



          -uUSER is what user will connect. The -u is the parameter for the user and the USER part is the actual name of the user.



          -pPASSWORD is the password for that user. the -p is the parameter for the password and the PASSWORD is the actual password.



          the DATABASE part is optional. Is just if you want to connect directly to a particular database. For example, let us say the user cyrex with password ubuntu wants to connect to the database linux, you would type this:



          mysql -ucyrex -pubuntu linux (User is cyrex, password is ubuntu and the database is linux)



          if you do not add the database you can eventually go to it by using the use statement of mysql or searching for the database with show databases;






          share|improve this answer



















          • 1





            +1: This is the usual solution, but I'm afraid that XAMPP doesn't actually deploy mysql like this. I don't use XAMPP so I'm not sure, but my friend has it and I hate its every bit. If my assumptions are true, your solution might not work for the OP, but it's still correct.

            – Richard Rodriguez
            Jan 13 '12 at 20:34
















          5














          From the terminal type mysql -uUSER -pPASSWORD DATABASE which is:



          mysql The actual command to use mysql



          -uUSER is what user will connect. The -u is the parameter for the user and the USER part is the actual name of the user.



          -pPASSWORD is the password for that user. the -p is the parameter for the password and the PASSWORD is the actual password.



          the DATABASE part is optional. Is just if you want to connect directly to a particular database. For example, let us say the user cyrex with password ubuntu wants to connect to the database linux, you would type this:



          mysql -ucyrex -pubuntu linux (User is cyrex, password is ubuntu and the database is linux)



          if you do not add the database you can eventually go to it by using the use statement of mysql or searching for the database with show databases;






          share|improve this answer



















          • 1





            +1: This is the usual solution, but I'm afraid that XAMPP doesn't actually deploy mysql like this. I don't use XAMPP so I'm not sure, but my friend has it and I hate its every bit. If my assumptions are true, your solution might not work for the OP, but it's still correct.

            – Richard Rodriguez
            Jan 13 '12 at 20:34














          5












          5








          5







          From the terminal type mysql -uUSER -pPASSWORD DATABASE which is:



          mysql The actual command to use mysql



          -uUSER is what user will connect. The -u is the parameter for the user and the USER part is the actual name of the user.



          -pPASSWORD is the password for that user. the -p is the parameter for the password and the PASSWORD is the actual password.



          the DATABASE part is optional. Is just if you want to connect directly to a particular database. For example, let us say the user cyrex with password ubuntu wants to connect to the database linux, you would type this:



          mysql -ucyrex -pubuntu linux (User is cyrex, password is ubuntu and the database is linux)



          if you do not add the database you can eventually go to it by using the use statement of mysql or searching for the database with show databases;






          share|improve this answer













          From the terminal type mysql -uUSER -pPASSWORD DATABASE which is:



          mysql The actual command to use mysql



          -uUSER is what user will connect. The -u is the parameter for the user and the USER part is the actual name of the user.



          -pPASSWORD is the password for that user. the -p is the parameter for the password and the PASSWORD is the actual password.



          the DATABASE part is optional. Is just if you want to connect directly to a particular database. For example, let us say the user cyrex with password ubuntu wants to connect to the database linux, you would type this:



          mysql -ucyrex -pubuntu linux (User is cyrex, password is ubuntu and the database is linux)



          if you do not add the database you can eventually go to it by using the use statement of mysql or searching for the database with show databases;







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 13 '12 at 20:16









          Luis AlvaradoLuis Alvarado

          146k138486654




          146k138486654








          • 1





            +1: This is the usual solution, but I'm afraid that XAMPP doesn't actually deploy mysql like this. I don't use XAMPP so I'm not sure, but my friend has it and I hate its every bit. If my assumptions are true, your solution might not work for the OP, but it's still correct.

            – Richard Rodriguez
            Jan 13 '12 at 20:34














          • 1





            +1: This is the usual solution, but I'm afraid that XAMPP doesn't actually deploy mysql like this. I don't use XAMPP so I'm not sure, but my friend has it and I hate its every bit. If my assumptions are true, your solution might not work for the OP, but it's still correct.

            – Richard Rodriguez
            Jan 13 '12 at 20:34








          1




          1





          +1: This is the usual solution, but I'm afraid that XAMPP doesn't actually deploy mysql like this. I don't use XAMPP so I'm not sure, but my friend has it and I hate its every bit. If my assumptions are true, your solution might not work for the OP, but it's still correct.

          – Richard Rodriguez
          Jan 13 '12 at 20:34





          +1: This is the usual solution, but I'm afraid that XAMPP doesn't actually deploy mysql like this. I don't use XAMPP so I'm not sure, but my friend has it and I hate its every bit. If my assumptions are true, your solution might not work for the OP, but it's still correct.

          – Richard Rodriguez
          Jan 13 '12 at 20:34











          1














          Maybe you're wondering about the package Apache Friends Xampp. The only way init is MySql



          ~$ sudo /opt/lampp/lampp startmysql


          If it's something






          share|improve this answer




























            1














            Maybe you're wondering about the package Apache Friends Xampp. The only way init is MySql



            ~$ sudo /opt/lampp/lampp startmysql


            If it's something






            share|improve this answer


























              1












              1








              1







              Maybe you're wondering about the package Apache Friends Xampp. The only way init is MySql



              ~$ sudo /opt/lampp/lampp startmysql


              If it's something






              share|improve this answer













              Maybe you're wondering about the package Apache Friends Xampp. The only way init is MySql



              ~$ sudo /opt/lampp/lampp startmysql


              If it's something







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jan 13 '12 at 21:39









              AlejoNextAlejoNext

              941210




              941210























                  1














                  The latest version of Xampp's Control Panel has a shell button, click that and it may show a dialog box saying that the #bat file needs to be created, and if it should create it now.. You should say Yes.



                  After that, it will open a console window.
                  From that console window you can easily access mysql by typing the following.



                  mysql -u mysqluser --p mysqlpass



                  in my own personal installation i use the below (because i don't have a pass set for user @root).



                  mysql -u root



                  Btw, if it isn't obvious already I am using windows, so there could be some differences in the ubuntu version.



                  Hope this helps someone..






                  share|improve this answer




























                    1














                    The latest version of Xampp's Control Panel has a shell button, click that and it may show a dialog box saying that the #bat file needs to be created, and if it should create it now.. You should say Yes.



                    After that, it will open a console window.
                    From that console window you can easily access mysql by typing the following.



                    mysql -u mysqluser --p mysqlpass



                    in my own personal installation i use the below (because i don't have a pass set for user @root).



                    mysql -u root



                    Btw, if it isn't obvious already I am using windows, so there could be some differences in the ubuntu version.



                    Hope this helps someone..






                    share|improve this answer


























                      1












                      1








                      1







                      The latest version of Xampp's Control Panel has a shell button, click that and it may show a dialog box saying that the #bat file needs to be created, and if it should create it now.. You should say Yes.



                      After that, it will open a console window.
                      From that console window you can easily access mysql by typing the following.



                      mysql -u mysqluser --p mysqlpass



                      in my own personal installation i use the below (because i don't have a pass set for user @root).



                      mysql -u root



                      Btw, if it isn't obvious already I am using windows, so there could be some differences in the ubuntu version.



                      Hope this helps someone..






                      share|improve this answer













                      The latest version of Xampp's Control Panel has a shell button, click that and it may show a dialog box saying that the #bat file needs to be created, and if it should create it now.. You should say Yes.



                      After that, it will open a console window.
                      From that console window you can easily access mysql by typing the following.



                      mysql -u mysqluser --p mysqlpass



                      in my own personal installation i use the below (because i don't have a pass set for user @root).



                      mysql -u root



                      Btw, if it isn't obvious already I am using windows, so there could be some differences in the ubuntu version.



                      Hope this helps someone..







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 14 '13 at 10:57









                      Zubair1Zubair1

                      1112




                      1112























                          1














                          First use this command in shell (Ubuntu):



                          ubuntu@ubuntu-PowerEdge-2850:~$ sudo /opt/lampp/lampp startmysql 


                          Second use this command in shell (Ubuntu):



                          ubuntu@ubuntu-PowerEdge-2850:~$ /opt/lampp/bin/mysql -u root -p database < "/opt/lampp/htdocs/database.sql" 


                          Enter password: (Press Enter)






                          share|improve this answer


























                          • Why are you importing a database.sql file and the question was specific to just starting the console?

                            – Parto
                            Apr 1 '16 at 9:05
















                          1














                          First use this command in shell (Ubuntu):



                          ubuntu@ubuntu-PowerEdge-2850:~$ sudo /opt/lampp/lampp startmysql 


                          Second use this command in shell (Ubuntu):



                          ubuntu@ubuntu-PowerEdge-2850:~$ /opt/lampp/bin/mysql -u root -p database < "/opt/lampp/htdocs/database.sql" 


                          Enter password: (Press Enter)






                          share|improve this answer


























                          • Why are you importing a database.sql file and the question was specific to just starting the console?

                            – Parto
                            Apr 1 '16 at 9:05














                          1












                          1








                          1







                          First use this command in shell (Ubuntu):



                          ubuntu@ubuntu-PowerEdge-2850:~$ sudo /opt/lampp/lampp startmysql 


                          Second use this command in shell (Ubuntu):



                          ubuntu@ubuntu-PowerEdge-2850:~$ /opt/lampp/bin/mysql -u root -p database < "/opt/lampp/htdocs/database.sql" 


                          Enter password: (Press Enter)






                          share|improve this answer















                          First use this command in shell (Ubuntu):



                          ubuntu@ubuntu-PowerEdge-2850:~$ sudo /opt/lampp/lampp startmysql 


                          Second use this command in shell (Ubuntu):



                          ubuntu@ubuntu-PowerEdge-2850:~$ /opt/lampp/bin/mysql -u root -p database < "/opt/lampp/htdocs/database.sql" 


                          Enter password: (Press Enter)







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Apr 1 '16 at 9:05









                          techraf

                          2,77092035




                          2,77092035










                          answered Apr 1 '16 at 6:38









                          Faiz RasoolFaiz Rasool

                          111




                          111













                          • Why are you importing a database.sql file and the question was specific to just starting the console?

                            – Parto
                            Apr 1 '16 at 9:05



















                          • Why are you importing a database.sql file and the question was specific to just starting the console?

                            – Parto
                            Apr 1 '16 at 9:05

















                          Why are you importing a database.sql file and the question was specific to just starting the console?

                          – Parto
                          Apr 1 '16 at 9:05





                          Why are you importing a database.sql file and the question was specific to just starting the console?

                          – Parto
                          Apr 1 '16 at 9:05











                          0














                          My solution is:



                          sudo /opt/lampp/lampp status
                          sudo /opt/lampp/lampp startmysql
                          sudo /opt/lampp/lampp status
                          cd /opt/lampp/bin
                          ./mysql -h localhost test





                          share|improve this answer






























                            0














                            My solution is:



                            sudo /opt/lampp/lampp status
                            sudo /opt/lampp/lampp startmysql
                            sudo /opt/lampp/lampp status
                            cd /opt/lampp/bin
                            ./mysql -h localhost test





                            share|improve this answer




























                              0












                              0








                              0







                              My solution is:



                              sudo /opt/lampp/lampp status
                              sudo /opt/lampp/lampp startmysql
                              sudo /opt/lampp/lampp status
                              cd /opt/lampp/bin
                              ./mysql -h localhost test





                              share|improve this answer















                              My solution is:



                              sudo /opt/lampp/lampp status
                              sudo /opt/lampp/lampp startmysql
                              sudo /opt/lampp/lampp status
                              cd /opt/lampp/bin
                              ./mysql -h localhost test






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited May 28 '17 at 20:09









                              Zanna

                              50.9k13137241




                              50.9k13137241










                              answered May 28 '17 at 19:34









                              Sergio EllerbrackeSergio Ellerbracke

                              1




                              1























                                  0














                                  To start the Apache, MySQL and ProFTPD server you have to just type the following command.



                                   ~$ sudo /opt/lampp/lampp start


                                  To open the MySQL or MariaDB console (Terminal) you have to just type the following command.



                                   ~$ sudo /opt/lampp/bin/mysql





                                  share|improve this answer






























                                    0














                                    To start the Apache, MySQL and ProFTPD server you have to just type the following command.



                                     ~$ sudo /opt/lampp/lampp start


                                    To open the MySQL or MariaDB console (Terminal) you have to just type the following command.



                                     ~$ sudo /opt/lampp/bin/mysql





                                    share|improve this answer




























                                      0












                                      0








                                      0







                                      To start the Apache, MySQL and ProFTPD server you have to just type the following command.



                                       ~$ sudo /opt/lampp/lampp start


                                      To open the MySQL or MariaDB console (Terminal) you have to just type the following command.



                                       ~$ sudo /opt/lampp/bin/mysql





                                      share|improve this answer















                                      To start the Apache, MySQL and ProFTPD server you have to just type the following command.



                                       ~$ sudo /opt/lampp/lampp start


                                      To open the MySQL or MariaDB console (Terminal) you have to just type the following command.



                                       ~$ sudo /opt/lampp/bin/mysql






                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Dec 28 '17 at 10:23









                                      vidarlo

                                      10.8k52748




                                      10.8k52748










                                      answered Dec 28 '17 at 9:26









                                      CheTan NeveCheTan Neve

                                      11




                                      11

















                                          protected by Community Jan 28 at 14:45



                                          Thank you for your interest in this question.
                                          Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                          Would you like to answer one of these unanswered questions instead?



                                          Popular posts from this blog

                                          Questions related to Moebius Transform of Characteristic Function of the Primes

                                          List of scandals in India

                                          Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?