3

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

lychee
  • 1,771
  • 3
  • 21
  • 31

4 Answers4

6

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
Derrick
  • 3,669
  • 5
  • 35
  • 50
2

On my system this solved my problem

sudo /opt/lampp/lampp startmysql
/opt/lampp/bin/mysql -u username
lychee
  • 1,771
  • 3
  • 21
  • 31
1

For Bitnami LAMP stack

/opt/lampstack-7.1.23-0/mysql/bin/mysql -u root -p
vijay
  • 731
  • 5
  • 15
0

A good start would be to run which mysql to locate the binary and check if it is actually installed. If it is missing try re-installing.

Kostas Drk
  • 335
  • 2
  • 7