How to import SQL file to MySQL using Command Line

Deve­lopers, database administrators, and individuals involved with database­s often need to import SQL file­s into a MySQL database for various reasons such as updating or configuring the database­. These SQL files typically include­ significant data, table structures, and require­d configurations that enable smooth setup or modification of a database­ instance.

GUIs can be use­d to import SQL files, but using Command Line Interface (CLI) has advantages. It’s faster and more­ efficient with greate­r flexibility and various scenarios such as remote­ server work or integration with scripts and automate­d processes.

This article guide­s the reader on how to import SQL file­s to MySQL using Command Line. Whether a MySQL ne­wbie or an experie­nced user looking to improve database­ management skills, mastering this te­chnique allows efficient handling of SQL file­ imports and ensures smooth data manageme­nt in all projects.

I am using XAMPP in Windows for accessing the database using phpMyAdmin.

How to import SQL file to MySQL using Command Line

Read more

How to Store Array in MySQL with PHP

An array is a special variable that allows storing one or more values in a single variable e.g. – holding usernames or details in an Array.

They are easier to access and manipulate.

Sometimes, require to store Array in the MySQL database and retrieve it.

In this tutorial, I show how you can store an Array in the MySQL database and read it with PHP.

How to Store Array in MySQL with PHP

Read more

Integrate CKEditor to HTML page and save to MySQL with PHP

CKEditor is a WYSIWYG HTML editor.

It makes HTML textarea lot more user-friendly by providing various features like – adding images, writing HTML code, formatting text, etc.

This can also be added to HTML containers.

It does not depend on other libraries like – jQuery and can be used in 3 different modes – Article Editor, Document Editor, and Inline Editor.

Different options are available to customize the editor.

In this tutorial, I am adding Article and Inline mode CKEditor on the same page and save it to MySQL database on submit with PHP.

Integrate CKEditor to HTML page and save to MySQL with PHP

Read more