Skip to main content

Posts

Showing posts from January, 2015

Common Command

Mysql: Create database with default character set, encoding: create database DB_NAME default character set utf8 default collate  utf8_general_ci; import mysql -u root -p DB_NAME < dump.sql mysql -u root -p DB_NAME < dump.sql /Application/MAMP/Library/bin/mysql /Application/MAMP/Library/bin/mysqlimport MAMP (MAC OSX + Apache + Mysql + PHP) PostgreSQL Others Export: mysqldump -u root -p Tutorials > tut_backup.sql Dump a table in DB: $ mysqldump -u root -p Tutorials php_tutorials asp_tutorials > tut_backup.sql Link stackoverflow  how-do-you-mysqldump-specific-tables Dump many DB : mysqldump -u root -p --databases Tutorials Articles Comments > content_backup.sql mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION; mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%' ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION; mysql> GRANT ...