root@vps:~# /opt/lampp/lampp startmysql
XAMPP: Starting MySQL...already running.
root@vps:~# mysql
-bash: mysql: command not found
I have installed XAMPP/LAMPP on my ubuntu 12.04 server. MySQL is running but when I type mysql in command it says command not found. Now, how should i access mysql
When i tried this :
root@vps:/bin# cd /opt/lampp/bin
root@vps:/opt/lampp/bin# ./mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.24 Source distribution
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
it is working. Why cannot i access it directly by typing mysql at command
Run these commands on terminal:
Now mysql has become a legal command on your system. you will get something like this :