I found an answer here: How do I start the MySQL console in XAMPP? but it is not working for me.
First if I go to the folder
/opt/lampp/bin/
if I then call
mysql -u root
Then I get notified that this command is unknown. I don't understand why.
However, I can do
./mysql -u root
but then for some reason MariaDB
gets started:
So whats the correct way to access MySQL from terminal?
Best Answer
The reason your not able to start it
mysql -u root -p
is because the folder location/opt/lampp/
isn't in included in your path. Add this line to your.bashrc
file:Then close it and
source
it with:If no errors comes from the above
source
command then you can now domysql -u root -p
from your terminal.