Friday, May 20, 2011

Import/Export Large MYSQL Databases


When working with MYSQL I often use phpMyAdmin, which is a nice GUI way to manipulate my database. But some operations won't work in phpMyAdmin when the database is too large. In particular, you can't import or export really large databases using phpMyAdmin. So sometimes you need to do things on the command line.
So I thought I'd document some of the command line snippets we use frequently. In the following, replace [USERNAME] with your mysql username, [DBNAME] with your database name, [/path_to_file/DBNAME] with the path and name of the file used for the database dump, and [/path_to_mysql/] with the path to mysql bin (like /Applications/MAMP/Library/bin/).

Copy/Export a Large Database

MYSQL has no 'Copy' function. You create a copy by dumping the database with mysqldump.
To dump the database and gzip it at the same time, use the following. This will prompt you for your password.


mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz 

Source Link:

Thursday, May 19, 2011

php codeigniter Eclipse


  1. Download XAMPP and unzip it to your C drive. (If you use Windows Vista, you will need to unzip it one directory down. Common practice is to create a folder title "XAMPP" and unzip there.)
  2. Download CodeIgniter and unzip it to your C drive in a folder named "CodeIgniter".
  3. Open the CodeIgniter folder. There will be a subfolder named "CodeIgniter[version number]". Create a second copy of that subfolder within the CodeIgniter folder (Copy_of_CodeIgniter).
  4. Open Eclipse and set the workspace to any folder other than XAMPP/htdocs (or in Windows Vista, XAMPP/xampp/htdocs).
  5. In eclipse, select File/New/Create New Project/PHP Project
  6. Select the option to "Create from Existing Source", and using the browse button, navigate to C:/CodeIgniter/Copy_of_CodeIgniter". Name the project something meaningful and save.
  7. Switch Eclipse's workspace the htdocs folder withn your XAMPP directory.
  8. From the menu in Eclipse, select File/Import/General/"Import existing projects into workspace".
  9. Browse to C:/CodeIgniter and select Copy_of_CodeIgniter. The project you created should appear in the list of projects and it should be automatically selected for copying.
  10. IMPORTANT! Check the option "copy files into workspace" before finishing the project import.
  11. Now the project will be in htdocs, the default XAMPP web directory. To verify, in your browser typehttp://localhost/PROJECT_NAME and you should see the CodeIgniter welcome page. Your project is ready for editing.
These steps will assist you in setting up the original project. Future projects can be created by starting at step 8.


Download Eclipse:
eclipse-php-helios-SR1-win32.zip
http://www.eclipse.org/pdt/downloads/ 

--------------------------------------------
for integrating codeigniter with eclipse see this video

http://www.youtube.com/watch?v=MzvSA0hq3Ts

very good link--
http://www.associatedcontent.com/article/2378460/setting_up_a_codeigniter_project_in_pg2.html?cat=15