Showing entries 61 to 70 of 984
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: database (reset)
Node.js MySQL Error

While I blogged about how to setup Node.js and MySQL almost two years ago, it was interesting when a student ran into a problem. The student said they’d configured the environment but were unable to use Node.js to access MySQL.

The error is caused by this import statement:

const mysql = require('mysql') 

The student got the following error, which simply says that they hadn’t installed the Node.js package for MySQL driver.

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'mysql'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object. (/home/student/Data/cit325/oracle-s/lib/Oracle12cPLSQLCode/Introduction/query.js:4:15)
    at Module._compile …
[Read more]
MySQL DATE() Function with examples

The MySQL DATE() function is a built-in function you use to extract just the date portion from a DATE or DATETIME value. Learn how to use the DATE() function in this blog post…

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Image by MaeM from Pixabay

MySQL DATE() Function Syntax

The …

[Read more]
OpenLampTech issue #29 – Substack Repost

The OpenLampTech newsletter is going to the next level with more content than you can imagine so stay tuned! Enjoy this week’s newsletter and share this edition. Thank you for reading the publication!

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Get ready for great MySQL, PHP, and LAMP stack content. In this week’s OpenLampTech issue #29 newsletter we have articles on:

  • The Linux passwd file
  • 5 PHP tips to write better code
  • Another top-notch video on WordPress Full Site Editing
  • 17 Laravel performance tips …
[Read more]
MySQL Partitioned Tables

MySQL Partitioned Tables

Learning Outcomes

  • Learn about List Partitioning.
  • Learn about Range Partitioning.
  • Learn about Columns Partitioning.
  • Learn about Hash Partitioning.
  • Learn about Key Partitioning.
  • Learn about Subpartitioning.

Lesson Material

MySQL supports partitioning of tables. It supports range, list, hash, and key partitioning. Range partitioning lets you partition based on column values that fall within given ranges. List partitioning lets you partition based on columns matching one of a set of discrete values. Hash partitioning lets you partition based on the return value from a user-defined expression (the result from a stored SQL/PSM function). Key partitioning performs like hash partitioning, but it lets a user select one or more columns from the …

[Read more]
Range-based Filtering With the BETWEEN Operator in MySQL

This post covers filtering in the WHERE clause conditional using the MySQL BETWEEN operator. Continue reading this excerpt of premium MySQL content I’m creating for anyone to learn how to use MySQL…

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Suggested Reading

Visit any of these MySQL beginner-friendly articles for additional free learning resources:

[Read more]
OpenLampTech issue #27 – Substack Repost

Welcome back to this week’s OpenLampTech newsletter issue. In addition to the great PHP/MySQL content, I’ve edited one of the sections so there is a new feel to the publication. Enjoy reading the content!

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

In OpenLampTech issue #27, you will find coverage on:

  • PHP nonces
  • WordPress backup plugin comparison
  • MySQL deadlocks
  • A free MySQL eBook link
  • And, much …
[Read more]
Determine All Calendar Days in a Month with MySQL

Watch this quick in-depth video short and learn how to find all the calendar days for a specific month using built-in MySQL date functions and recursive Common Table Expressions (CTEs). This is a repost of a free article over on my Kofi page as part of the “MySQL Learning Tier” membership

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Image by  …

[Read more]
OpenLampTech issue #26 – Substack Repost

Your one-stop source for excellent PHP/MySQL technical content is here again this week for your reading pleasure. Enjoy this selection of articles I read and learned something from this week. Thank you for being here!

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

OpenLampTech issue #26 has great articles covering:

  • PHP Laravel try/catch
  • WordPress block patterns
  • How to backup and restore a MySQL database
  • PHP redirection
  • And, much much …
[Read more]
MySQL Windows DSN

Almost a Ripley’s Believe It or Not. An prior data science student told me that his new IT department setup a Windows component that let him connect his Excel Spreadsheets to their production MySQL database without a password. Intrigued, I asked if it was a MySQL Connector/ODBC Data Source Configuration, or DSN (Data Source Name)?

He wasn’t sure, so I asked him to connect to PowerShell and run the following command:

Get-Item -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\MySQL

It returned something like this (substituting output from one of my test systems):

    Hive: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI


Name                           Property
----                           --------
MySQL                          Driver      : C:\Program Files\MySQL\Connector ODBC 8.0\myodbc8w.dll
                               DESCRIPTION : MySQL ODBC Connector
                               SERVER      : …
[Read more]
Multiple WHERE Clause Conditionals Using the MySQL AND Logical Operator

Oftentimes, you need multiple filter conditionals in a WHERE clause in order to target specific rows of data. Continue reading this blog post and learn how to use the AND logical operator in WHERE clause queries…

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Practice Data

For the practice queries in this post, I’m using the ‘category’ table from the well-known Sakila database:

SELECT *
FROM category;

[Read more]
Showing entries 61 to 70 of 984
« 10 Newer Entries | 10 Older Entries »