MyBlogPlanner

Import and export big db in linux

Monday, September 14th, 2009

Here is my short blog post lets share with my friends who are learning linux and want to import or export data to phpmyadmin using linux. So here is the code for that.

Data Export in linux

mysqldump -u dbusername -h dbhost -pdbpassword dbname > dbname.sql

Data Import in linux

mysql -u dbusername -h dbhost -pdbpassword dbname < dbname.sql

This will solve your problem when you are not able to upload or download db from user inetrface of phpmyadmin.

Create New joomla password function

Monday, April 27th, 2009

Let me show you how you can create joomla password function

Here is the exmaple how you can create joomla 1.5.x password function.

function FnGenerateNewPassword($Password)
{
jimport(’joomla.user.helper’);

$salt        = JUserHelper::genRandomPassword(32);
$crypt        = JUserHelper::getCryptedPassword($Password, $salt);
$password    = $crypt.’:’.$salt;
return  $password;

}

Hope this will help you in some program. :)