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
To select record in terminal for mysql use this command. Change the value of table and take out the brackets. SELECT * FROM [table]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
For date time input use this function. NOW() Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
If you’re working with a MySQL database, you may find that you need to add a new column to a table. Fortunately, adding a column to a MySQL table is a straightforward process that we will do using the MySQL terminal command. Here’s how: Open the MySQL terminal First, open the MySQL terminal and connect Read More
To insert a record use this command in terminal. Customize the values. INSERT INTO [table] ([column], [column]) VALUES (‘[value]’, [value]’); Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To create a new table with columns use this command. CREATE TABLE [table] ([column] VARCHAR(120), [another-column] DATETIME); Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To see all indexes on a table enter this code. show index from [table]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
To show the table structure in terminal use this code. describe [table]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408
A1WEBSITEPRO Social Media Pages
Here are my social media pages, lets hook up!