Tmux cheatsheet: https://gist.github.com/MohamedAlaa/2961058
Last active
August 26, 2016 05:28
-
-
Save maestrofx/1f4eb64c7adc2da941c9d281f769133b to your computer and use it in GitHub Desktop.
Cheatsheet Bundles
create new user and privileges;
CREATE USER username IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* to 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
import .sql to DB:
mysql -u username -p database_name < file.sql
mysql> use db_name;
mysql> source backup-file.sql;
change user password
[false] SET PASSWORD FOR 'user-name-here'@'hostname-name-here' = PASSWORD('new-password-here');
[false] UPDATE mysql.USER SET Password=PASSWORD('new-password-here') WHERE USER='user-name-here' AND Host='host-name-here';
***Challenges
- importing large CSV files (100 GB) to my mysql
- http://stackoverflow.com/questions/1768893/upload-95-gb-csv-file-into-mysql-myisam-table-via-load-data-infile-csv-engine-a
Problems#1 ERROR 13 (HY000)
mysql> LOAD DATA INFILE 'transactions.csv' INTO TABLE transactions FIELDS TERMINATED by ',' LINES TERMINATED BY '\r\n' IGNORE 1 LINES (chain, dept, category, company, brand, date, productsize, productmeasure, purchasequantity, purchaseamount );
ERROR 13 (HY000): Can't get stat of '/var/lib/mysql/transactions/transactions.csv' (Errcode: 2)
ref:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment