Monday, August 12, 2013

Import Sql file from Command Prompt in xampp

first copy your sql file and paste to bin directory of xampp/mysql

Then go to your xampp location->mysql->bin in command prompt and write.

mysql -u username -p (here 'username' is the username of the database) then press enter

It will ask a password of your database. Enter your password and hit enter. Then write

use database_name (here 'database_name' is the name of the database)

Then give the path of your source sql file.

source filename.sql

Friday, July 12, 2013

Installing Ruby, Rubygems, Compass and Sass in Ubuntu 12.04 LTS

Open Terminal - Ctrl + Alt + t

Login as root - sudo -s (this will ask for you a password)

After entered the password. In the terminal write this command -

For installing ruby :-

apt-get install ruby-full build-essential

For installing rubygems :-

apt-get install rubygems

For installing compass :-

gem install compass

For installing sass :-

gem install sass

check you sass

sass -v

Note: If there is an error you probably need to the following line export PATH=$PATH:/var/lib/gems/1.8/bin  in the end of your ./bashrc

How to do it

nano ./bashrc
append the line in the end export PATH=$PATH:/var/lib/gems/1.8/bin in the end of your ./bashrc
close your terminal and start it again

Install lampp in Ubuntu 12.04 LTS

First download lampp from the link mentioned below :-

After download :-

Open Terminal - Ctrl + Alt + t

Login as root - sudo -s (this will ask for you a password)

After entered password. In the terminal write this command -

tar xvfz xampp-linux-1.x.x.tar.gz -C /opt

This process will install xampp in the following directory - /opt/lampp/

Now give the permission to htdocs folder to read and write operation -

chmod 777 -R /opt/lampp/htdocs/

Start services of lampp write this command in the terminal

/opt/lampp/lampp start

Checking :-


For stop its services

/opt/lampp/lampp stop

Sometime after insallation finished when we go to (phpmyadmin) section -


It will throw an error message. For solving this issue write following command in the terminal :-

chmod 777 -R /opt/lampp/etc/extra/

gedit /opt/lampp/etc/extra/httpd-xampp.conf

It will open httpd-xampp.conf in the editor named gedit now put this line

Require all granted

After this line

<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny

In the terminal write this command to change the permission of the directory /opt/lampp/etc/extra/

chmod 777 -R /opt/lampp/etc/extra/

And its all done. Now enjoy it..