mysql -u root -p

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

mysql -u root -p

Postby Kutakizukari » 09. October 2011 16:54

Running XAMPP for Linux 1.7.7 on Lubuntu 11.04.

Tried the following command in the terminal:

Code: Select all
mysql -u root -p

To which is returned:

Code: Select all
mysql -u root -p
The program 'mysql' can be found in the following packages:
 * mysql-client-core-5.1
 * mysql-cluster-client-5.1
Try: sudo apt-get install <selected package>

How can I connect to mysql in the terminal using XAMPP for Linux?
Posts: 9
Joined: 18. January 2009 05:28

Re: mysql -u root -p

Postby JonB » 10. October 2011 19:40

use this syntax:
as root or with sudo
cd /opt/lampp/bin
[root@localhost bin]# mysql -u root --password=yourpassword -S /opt/lampp/var/mysql/mysql.sock

Howto's -
[root@localhost bin]# mysql -?

Good Luck
User avatar
AF Moderator
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: mysql -u root -p

Postby nplinux » 18. November 2011 08:37

hello there.

you probably should use mysql service on which been installed in Xampp server.

try using this syntax (go as root);
Code: Select all

or else you can find where mysql located by typing;
Code: Select all
find / -name mysql

this will show you all the files which contain word 'mysql' as below;
Code: Select all
root@ubuntu:~# find / -name mysql

However most of the time the default installation of xampp locate mysql sevice in '/opt/lampp/bin/mysql'

hope this help :)
Posts: 1
Joined: 18. November 2011 08:26
Operating System: lunux ubuntu 11

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 6 guests