Accesing LAMPP mysql via the command line on linux

lychee picture lychee · Mar 7, 2015 · Viewed 9.1k times · Source

I've have installed LAMPP, I need to access MySQL from the terminal but I dont know how, because if I simply type mysql into the prompt it says the mysql program is not installed, but it has to be installed because it stands for Linux + Apache + MySQL + PHP + Perl. Thank

Answer

Sergio Ellerbracke picture Sergio Ellerbracke · May 28, 2017

My solution:

sudo /opt/lampp/lampp status

sudo /opt/lampp/lampp startmysql

sudo /opt/lampp/lampp status

cd /opt/lampp/bin

./mysql -h localhost test