after install xampp,how to access mysql by terminal?

Problems with the Linux version of XAMPP, questions, comments, and anything related.

after install xampp,how to access mysql by terminal?

Postby cbook » 02. September 2009 06:18

i have installed xampp,and all the service are ok.
now,i want to login mysql by shell instruction,not by phpmyadmin.
how can i do?
cbook
 
Posts: 18
Joined: 19. August 2009 10:16

Re: after install xampp,how to access mysql by terminal?

Postby Wiedmann » 02. September 2009 09:34

http://dev.mysql.com/doc/refman/5.1/en/mysql.html
(This tool is located in /opt/lampp/bin.)
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: after install xampp,how to access mysql by terminal?

Postby cbook » 02. September 2009 09:51

Wiedmann wrote:http://dev.mysql.com/doc/refman/5.1/en/mysql.html
(This tool is located in /opt/lampp/bin.)


when i input mysql my db_name on terminal,the terminal output:"can not connect to loacl mysql through socket '/var/lib/mysql/mysql.sock'(2)"
how to resolve it .
cbook
 
Posts: 18
Joined: 19. August 2009 10:16

Re: after install xampp,how to access mysql by terminal?

Postby Wiedmann » 02. September 2009 10:03

Use the "mysql" tool from XAMPP, and not that one from your system.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: after install xampp,how to access mysql by terminal?

Postby cbook » 02. September 2009 10:59

Wiedmann wrote:Use the "mysql" tool from XAMPP, and not that one from your system.

how to use the mysql tool from xampp?please teach me a bit.thank you!
cbook
 
Posts: 18
Joined: 19. August 2009 10:16

Re: after install xampp,how to access mysql by terminal?

Postby Wiedmann » 02. September 2009 11:19

how to use the mysql tool from xampp?

Wiedmann wrote:(This tool is located in /opt/lampp/bin.)

-->
Code: Select all
/opt/lampp/bin/mysql
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: after install xampp,how to access mysql by terminal?

Postby cbook » 02. September 2009 11:26

Wiedmann wrote:
how to use the mysql tool from xampp?

Wiedmann wrote:(This tool is located in /opt/lampp/bin.)

-->
Code: Select all
/opt/lampp/bin/mysql

i have try it ,the error is "can not connect to loacl mysql through socket '/opt/lampp/var/mysql/mysql.sock'(2)"
cbook
 
Posts: 18
Joined: 19. August 2009 10:16

Re: after install xampp,how to access mysql by terminal?

Postby Wiedmann » 02. September 2009 11:39

"can not connect to loacl mysql through socket '/opt/lampp/var/mysql/mysql.sock'(2)"

So you have to start the XAMPP MySQL server.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: after install xampp,how to access mysql by terminal?

Postby cbook » 02. September 2009 12:38

Wiedmann wrote:
"can not connect to loacl mysql through socket '/opt/lampp/var/mysql/mysql.sock'(2)"

So you have to start the XAMPP MySQL server.

now ,i konw the different version using different instruction.
now if i want to query some information from the datatabe "user" belonged to the database "testor",i write the code as follows:
first step:"\r testor"
second step"select * from user"
……
the result is right.

but now i want to create a new database,how to write the code.
i can't find the instruction.
cbook
 
Posts: 18
Joined: 19. August 2009 10:16

Re: after install xampp,how to access mysql by terminal?

Postby Wiedmann » 02. September 2009 12:49

Maybe you want read:
Chapter 3. Tutorial http://dev.mysql.com/doc/refman/5.1/en/tutorial.html
:?:
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: after install xampp,how to access mysql by terminal?

Postby cbook » 02. September 2009 12:54

i have resolved it by using the code "create database bugtracker",
only directly input it after"mysql>".
haha,thanks for your help.
good night, sir.
cbook
 
Posts: 18
Joined: 19. August 2009 10:16


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 8 guests