![]() ![]() Next, create a products table by running: Once the database is created, you will see the following output: In this tutorial we’ll name it test_company: Then, run the following command to create a database. To do this, SSH in to your server and then run the following command to log in to your MySQL server as root:Įnter the root password of your MySQL database and hit ENTER to continue. You’ll start off by creating a sample database for your project. ![]() For this tutorial, it isn’t necessary to create virtual hosts, so you can skip Step 4. Apache, MySQL, and PHP set up by following the guide on How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 18.04.An Ubuntu 18.04 server configured using the Initial Server Setup with Ubuntu 18.04 and a non-root user with sudo privileges.To follow along with this guide, you will need the following: In this tutorial, you will use the MySQL BLOB data type to store images with PHP on Ubuntu 18.04. Retrieving data is faster, and when creating records you can be sure that data validation rules and referential integrity are maintained especially when using MySQL transactions. Creating backups is also more seamless since you can create a single MySQL dump file that contains all your data. The scheme also centralizes the database, making it more portable and secure because the data is isolated from the file system. This programming approach eliminates the need for creating a separate file system for storing images. This is where the MySQL BLOB data type comes in. When creating applications that require a tightly-coupled database where images should be in sync with related data (for example, an employee portal, a student database, or a financial application), you might find it convenient to store images such as students’ passport photos and signatures in a MySQL database alongside other related information. IntroductionĪ Binary Large Object ( BLOB) is a MySQL data type that can store binary data such as images, multimedia, and PDF files. The author selected Girls Who Code to receive a donation as part of the Write for DOnations program. ![]()
0 Comments
Leave a Reply. |