Import A Database Dump MySql Terminal
To import a database dump use this command. mysql -u [username] -p -h localhost [database] < db_backup.sql Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To import a database dump use this command. mysql -u [username] -p -h localhost [database] < db_backup.sql Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To delete records in mysql use this terminal command. DELETE FROM [table] WHERE [column] = [value]; Delete all records without dropping the table. This will also reset the increment number value. DELETE FROM [table]; Delete all records in a table. truncate table [table]; Remove table columns. ALTER TABLE [table] DROP COLUMN [column]; Deleting tables. DROP TABLE Read More
To find records containing something use this command. SELECT * FROM [table] WHERE [column] LIKE ‘%[value]%’; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To select specific records in terminal use this code. SELECT * FROM [table] WHERE [column] = [value]; You can also use these selectors. Less Than < Greater Than > Not Equal To != And and Or or Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To count and select group records in terminal use this command. SELECT *, (SELECT COUNT([column]) FROM [table]) AS count FROM [table] GROUP BY [column]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To count records enter this command. Take out square brackets and replace names accordingly. SELECT COUNT([column]) FROM [table]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To select parts of records use this command. SELECT [column], [another-column] FROM [table]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To explain records use this command. Take out brackets and replace table with your table name. EXPLAIN SELECT * FROM [table]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
In order to access your the mysql part in your terminal you will enter something like this. Access monitor: mysql -u [username] -p; (will prompt for password) This will get you logged into the mysql part in your terminal. Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
A1WEBSITEPRO Social Media Pages
Here are my social media pages, lets hook up!