Category Archives: cmd comment

Shell command for dump mysql database

shell_exec("mysqldump --opt --user=database_user_name --password=database_password --host=hostname database_name > path/$(date '+%m%d%Y-%H%M')__database_name_to_save.sql");

CMD for php web developing

Hi,

I am sharing some useful cmd comment for windows. Might helps some one which specially help me. If anyone know more please share with me which will be a great news for me. 😛


//create database 
> mysql -uuser -ppassword -e "create database databasename"


//import database from mysql admin 
> mysql -uuser -p database_name < filename_with_path_of_sql

//export database to a table
> mysqldump -uuser -ppassword database_name > import_file_name_with_extention


%d bloggers like this: