MySQL Help
MySQL Help
• You can start the MySQL shell from Applications menu. To launch MySQL shell, choose
◦ Applications → Programming → Mysql
• Now you can see a terminal window asking for password to continue ,
By default no password is set for MySQL root user in XAMPP. So, here you just hit Enter
key.
Once you set a password for MySQL root user, you should provide that password to
continue. (When passwords are typed in terminal window, nothing will be displayed)
If lampp (XAMPP) is not running in you computer you can't start MySQL in this way.
Then you have to start lampp manually.
1
To start lampp, open a terminal and run the following command.
sudo /opt/lampp/lampp start
You can open 'terminal', in three ways.
1. Press Ctrl+Alt+T,
2. Applications → Accessories → Terminal
3. Right click on Desktop or in the working folder and choose 'Open in Terminal' from the
context menu
/opt/lampp/bin/mysql -uroot
• If you have set password to MySQL then run the following command in a terminal:
Eg. /opt/lampp/bin/mysql -uroot -proot ( here, username and password are 'root')
If you want to edit or remove your lampp files, you have to stop the XAMPP before doing so.
• To start lampp, open a terminal and run the following command.
sudo /opt/lampp/lampp stop
XAMPP is installed in in the directory /opt/lampp. You can access this directory in the following
way.
Places → Computer → File System → opt → lampp
2
Renaming your XAMPP directory, if needed
To backup your lampp directory (which is situated in the opt directory of the your File
System and it contains the web site and databases you created),
• open the folder lampp_files in your HOME.
• Double click the file lampp-backup.sh and click Run in Terminal.
• Then a box will appear asking your password. Give administrative password of your
system and press OK .
3
In this lampp-backup folder you can see the compressed lampp as lampp.tar.gz and the
script lampp-install.sh to install it in other computers
• Copy the file 'folder named lampp-backup to the computer where the lampp is to be
installed.
• Open the folder and set execute permission to the file install-lampp.sh, if needed.
• Run the script 'install-lampp.sh' (double click → Run in Terminal)
• If you want lampp to start automatically on boot run the script 'lampp-start-at-boot.sh'
In the default installation, XAMPP has no passwords set and it is not recommended to run
XAMPP with this configurations. To make XAMPP secure, passwords are to be set.
• To set passwords to XAMPP , run the following commands
sudo /opt/lampp/lampp start ( to start XAMPP)
sudo /opt/lampp/lampp security and follow the instructions displayed.