MySQL

MySQL is an open-source relational database management system. Its name is a combination of "My", the name of co-founder Michael Widenius's daughter, and "SQL", the abbreviation for Structured Query Language.

By toswebdev, 9 February, 2024
Introduction:

In the ever-expanding digital landscape, understanding the size of your website and database is crucial for effective management and optimization. In this blog post, we'll explore two essential aspects: checking the size of your website data and determining the size of your database.

Checking the Size of Your Website Data:

Method 1: Hosting Control Panel

Most web hosting providers offer a control panel such as cPanel, which provides an easy way to check your website's data size.

By toswebdev, 20 December, 2021

You can add to bookmarks this page to always have a cheat sheet on hand on how to execute MySQL queries select in Drupal 8 or 9.

Get single value:

$query = \Drupal::database()->select('node_field_data', 'n');
$query->addField('n', 'nid');
$query->condition('n.title', 'About Us');
$query->range(0, 1);
$nid = $query->execute()->fetchField();

Get an entry in the array:

Tags

By toswebdev, 19 September, 2021

Here command changes your database according to your project and imports a large database very smoothly using the below command.

/applications/MAMP/library/bin/mysql -u root -p example_db < /Applications/MAMP/htdocs/example_db.mysql

After Run above command, you have to just add the PHPMyAdmin password if you set otherwise press enter. wait for a while for the import process.

Tags