Friday, September 19, 2014

restoring huge sql file from comman line mysql in MAC OSX.


Install xampp
stop mac default apache server if its running using command "sudo apachectl stop"
Open configuration panel of xampp
start mysql from manage server option

open ~/.profile by using
nano ~/.profile
copy following text to .profile
export
PATH=/opt/local/bin:/opt/local/sbin:/Applications/xampp/xamppfiles/bin:$PATH

save and exit t using  ctrl + o , ctrl x


type in terminal, mysql -h localhost -u root -p 789798

you will be logged in to mysql console.
 mysql> create database test;

mysql> use database test;

mysql> source /path/to/sql/file/test1.sql



No comments:

Post a Comment