Category Archives: MySql

MySQL is an open-source relational database management system (RDBMS) that is widely used for web applications and other software projects. It is a free software under the GNU General Public License, which means it can be used, modified, and distributed freely.

MySQL is known for its reliability, scalability, and performance, making it a popular choice for large-scale web applications. It supports a range of features, including data indexing, transaction processing, and support for multiple storage engines.

MySQL is also highly customizable, with a range of configuration options that can be adjusted to meet the needs of specific applications. It can be integrated with a range of programming languages, including PHP, Python, and Java, making it a versatile option for developers.

One of the main benefits of MySQL is its community support, which provides a wealth of resources, including forums, documentation, and tutorials. It is also frequently updated and maintained, with regular security patches and bug fixes.

Overall, MySQL is a powerful and flexible RDBMS that is ideal for web applications and other software projects. Its open-source nature, scalability, and customization options make it a popular choice among developers and businesses alike.

How To Make A Free Website Backup PHP & MySql

This post covers how to make a free website backup. Once finished you will be able to download a complete website backup zip file. This will also include your database. This task is very easy but I am going to explain the process in detail. Update: Backed by popular demand I was asked to do Read More

Custom Column Output Names Terminal MySql

For Custom Column Output Names Terminal MySQL, when selecting data from a table using the SELECT statement, you can customize the output column names. This can be useful when the column names in the table are not descriptive enough or when you want to format the output in a specific way. Custom Column Output Names Read More

Update Records In MySql Terminal

To update a record you can use this command. UPDATE [table] SET [column] = ‘[updated-value]’ WHERE [column] = [value]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408

Select With Custom Order Limit Terminal MySql

To select with a customer order and limit the results use this command. SELECT * FROM [table] WHERE [column] ORDER BY [column] ASC LIMIT [value]; You can order by ascending. ASC Or you can order by descending. DESC Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408

Select A Range MySql Terminal

To select a range use this code. Take out the brackets and replace the values. SELECT * FROM [table] WHERE [column] BETWEEN [value1] and [value2]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408

Select Records Starting & Ending With Value MySql Terminal

To find records that start and end with a certain value use this command. SELECT * FROM [table] WHERE [column] LIKE ‘[val_ue]’; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408

Select Records Starting With A Value MySql Terminal

To find something that starts with a certain string use this code. SELECT * FROM [table] WHERE [column] LIKE ‘[value]%’; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408

Export A database Dump Terminal MySql

To export a database use this command in terminal. mysqldump -u [username] -p [database] > db_backup.sql If that does not work for you then you may have created a user in cPanel or some other website management application. You may have to use the –no-tablespaces tag. The syntax looks like this mysqldump –no-tablespaces -h localhost Read More

Import A database Dump Terminal MySql

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

Delete Records MySql Terminal Command

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

Select Records Containing Terminal MySql

To find records containing something use this command. SELECT * FROM [table] WHERE [column] LIKE ‘%[value]%’; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408

Selecting Specific Records MySql Terminal Command

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

Counting Records MySql Terminal Command

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

Selecting Parts Of Records MySql Terminal Command

To select parts of records use this command. SELECT [column], [another-column] FROM [table]; Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408