Page 1 of 1

mysql -u root -p

PostPosted: 09. October 2011 16:54
by Kutakizukari
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?

Re: mysql -u root -p

PostPosted: 10. October 2011 19:40
by JonB
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
8)

Re: mysql -u root -p

PostPosted: 18. November 2011 08:37
by nplinux
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
/opt/lampp/bin/mysql


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
/etc/apparmor.d/abstractions/mysql
/etc/mysql
/run/lock/subsys/mysql
/opt/lampp/var/mysql
/opt/lampp/var/mysql/mysql
/opt/lampp/bin/mysql
/opt/lampp/lib/mysql
/opt/lampp/lib/perl5/site_perl/5.10.1/i686-linux/DBD/mysql
/opt/lampp/lib/perl5/site_perl/5.10.1/i686-linux/auto/DBD/mysql
/opt/lampp/licenses/mysql
/opt/lampp/share/mysql


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

hope this help :)