Monday, November 21, 2022

Backup and restore MySQL databases

Here is the article.

 As you use XAMPP, you might find that you need to backup or restore a MySQL database. There are two easy ways to do this with XAMPP: using the browser-based phpMyAdmin tool or using MySQL’s command-line tools. This guide describes both options.


Friday, November 18, 2022

MySQL | Fail to start | XAMPP


2022-11-18 15:41:35 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions

2022-11-18 15:41:35 0 [Note] InnoDB: Uses event mutexes

2022-11-18 15:41:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.11

2022-11-18 15:41:35 0 [Note] InnoDB: Number of pools: 1

2022-11-18 15:41:35 0 [Note] InnoDB: Using SSE2 crc32 instructions

2022-11-18 15:41:35 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M

2022-11-18 15:41:35 0 [Note] InnoDB: Completed initialization of buffer pool

2022-11-18 15:41:35 0 [Note] InnoDB: 128 out of 128 rollback segments are active.

2022-11-18 15:41:35 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2022-11-18 15:41:35 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2022-11-18 15:41:35 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.

2022-11-18 15:41:35 0 [Note] InnoDB: Waiting for purge to start

2022-11-18 15:41:35 0 [Note] InnoDB: 10.4.24 started; log sequence number 24322347; transaction id 11085

2022-11-18 15:41:35 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool

2022-11-18 15:41:35 0 [Note] Plugin 'FEEDBACK' is disabled.

2022-11-18 15:41:35 0 [Note] Server socket created on IP: '::'.

How to Install Redis For PHP in Windows?

Here is the article.

Redis is Remote Dictionary Server. It is an open-source fast performance data structure store. It is used for caching, session management & gaming etc. Redis is basically installed in Linux only. But by using other method we can install it in Windows also. But before that you need to install PHP in your device.

How to Set Up a Redis Server And Use With PHP

Here is the article.

This PHP tutorial helps to work the Redis module with php, We will install Redis server into windows and PHP extension of redis into xampp. This tutorial also has a simple PHP script to communicate with redis and php.

I am using redis in PHP application to create a Cache system for faster access to data. This means that Redis is fast, but is also non-volatile.I am using php_redis client but you can use other redis clients as well like Predis.

Redis as an advanced key-value database storage system, Redis can also support complex data structures like strings, hashes, lists, sets, sorted sets, bitmaps and hyperlogs as its key values. It’s often referred to as a NoSQL database.

What is Redis

Redis is an open source(BSD licensed), in-memory data structure store, used as a database, cache and message broker written in C. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with redis queries.

Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

We will download redis for window from Here. You can download redis separately for windows32 and windows 64. You can get redis command information from Redis Commands Docs.

Also checkout other tutorials of PHP Cache,

How To install Redis on Windows

We will follow the following steps to install redis server into windows.

  • Download redis server from the official website.
  • Extract the zip file of the downloaded redis file.
  • Place the unzipped file into d:\redis directory.
  • Run redis-server.exe from d:\redis directory.
  • Then Run redis-cli.exe from d:\redis directory.

How to enable Redis extension in Xampp  

We can enable redis PHP extension by following steps:

  • Download php_redis.dll file from PECL libs. Download the extension as per your current PHP version.
  • Copy the php_redis.dll and paste it to the following folder in XAMPP Server extension directory(D:\XAMPP\php\ext).
  • Open the php.ini file and add extension=php_redis.dll line to this file.
  • Restart XAMPP server
  • Open phpinfo() of XAMPP server and search Redis, if found that means you successfully integrated Redis with PHP.

Simple PHP Redis Example

We will create a simple PHP script that will set the key into redis and get the key value from Redis server. The Redis() method helps to create instance of redis. The $redis->set(key, val) method is used to store value against the key name. The $redis->get(keyname) method is used to get the stored value of the passed key name.

try {
//create redis instance
$redis = new Redis();
//connect with server and port
$redis->connect('localhost', 6379);
//set value
$redis->set('website', 'www.phpflow.com');
//get value
$website = $redis->get('website');
//print www.phpflow.com
echo $website;
} catch (Exception $ex) {
echo $ex->getMessage();
}

PHP version

I like to install Redis for my XAMPP installed on Windows operating system. 

https://stackoverflow.com/questions/49463762/how-to-know-the-version-of-php-is-used-on-xampp

http://localhost:8080/dashboard/phpinfo.php

PHP version 8.1.6

Wednesday, November 16, 2022

How To Set Up Redis as a Cache for MySQL with PHP on Ubuntu 20.04

Here is the article. 


How to Install and Configure Redis on WordPress (Boost Your Site’s Performance)

Here is the article.

Redis is among the top WordPress caching tools to speed up your website. And that’s why it is globally available on every Cloudways server as an optional installation.

Cloudways believes in combining fast speeds, high performance, stability, and great support on its WordPress servers. Thus, it offers a PHP-powered stack with multiple cache layers, and the Redis Object Cache is a part of that layer.

This blog focuses on how to use Redis cache on your WordPress site and improve the site’s performance via cache plugins like Breeze. For more technically-sound users, this article also covers how to use the Redis Object Cache with W3TC.

Optimize WordPress Database Using Plugins

 Here is the article. 

When it comes to WordPress, many complex tasks can easily be done by using a plugin. A number of free and paid WordPress database optimization plugins are available online. I recommend the following two plugins that can be used to optimize WordPress databases.

1. Breeze

Breeze is a lightweight high-performance WordPress optimize plugin developed by Cloudways. It is a free plugin and comes pre-installed with WordPress installation in Cloudways.


How to Set Up a Redis Server And Use With PHP

Here is the article.

How To Enable Redis Extension In Xampp

We can enable redis PHP extension by following steps:

  • Download php_redis.dll file from PECL libs. Download the extension as per your current PHP version.
  • Copy the php_redis.dll and paste it to the following folder in XAMPP Server extension directory(D:\XAMPP\php\ext).
  • Open the php.ini file and add extension=php_redis.dll line to this file.
  • Restart XAMPP server
  • Open phpinfo() of XAMPP server and search Redis, if found that means you successfully integrated Redis with PHP.

Total Household Debt Reaches $16.51 trillion in Q3 2022

 Total Household Debt Reaches $16.51 trillion in Q3 2022

PRESS RELEASE

Total Household Debt Reaches $16.51 trillion in Q3 2022; Mortgage and Auto Loan Originations Decline

Year-over-year increase in credit card balances is largest in more than 20 years
November 15, 2022

NEW YORK—The Federal Reserve Bank of New York's Center for Microeconomic Data today issued its Quarterly Report on Household Debt and Credit . The Report shows an increase in total household debt in the third quarter of 2022, increasing by $351 billion (2.2%) to $16.51 trillion. Balances now stand $2.36 trillion higher than at the end of 2019, before the pandemic recession. The report is based on data from the New York Fed's nationally representative Consumer Credit Panel.

Mortgage balances rose by $282 billion in the third quarter of 2022 and stood at $11.67 trillion at the end of September, representing a $1 trillion increase from the previous year. Credit card balances also increased by $38 billion. The 15% year-over-year increase in credit card balances represents the largest in more than 20 years. Auto loan balances increased by $22 billion in the third quarter, consistent with the upward trajectory seen since 2011. Student loan balances slightly declined and now stand at $1.57 trillion. In total, non-housing balances grew by $66 billion.

Mortgage originations, which include refinances, stood at $633 billion in the third quarter, representing a $126 billion decline from the second quarter and a return to pre-pandemic volumes. The volume of newly originated auto loans was $185 billion, a slight reduction from the previous quarter but still elevated compared to the average volumes seen through the 2018-2019 period. Aggregate limits on credit card accounts increased by $82 billion and now stand at $4.3 trillion.

"Credit card, mortgage, and auto loan balances continued to increase in the third quarter of 2022 reflecting a combination of robust consumer demand and higher prices," said Donghoon Lee, Economic Research Advisor at the New York Fed. "However, new mortgage originations have slowed to pre-pandemic levels amid rising interest rates."

The share of current debt becoming delinquent increased for nearly all debt types, following two years of historically low delinquency transitions. The delinquency transition rate for credit cards and auto loans increased by about half a percentage point, similar to increases seen in the second quarter.

The New York Fed also issued an accompanying Liberty Street Economics blog post looking at trends in credit card balances and delinquencies by age and income of borrowers.

The Quarterly Report includes a summary of key takeaways and their supporting data points. Overarching trends from the report's summary include:

Housing Debt

  • There was $633 billion in newly originated mortgage debt in Q3 2022. After two years of historically high volumes of mortgage originations, the Q3 volume more closely resembles pre-pandemic volumes. 
  • Although the foreclosure moratoria have been lifted nationally, new foreclosures have stayed very low since the CARES Act moratorium was put into place. About 28,500 individuals had new foreclosure notations on their credit reports.

Student Loans

  • Outstanding student loan debt stood at $1.57 trillion in Q3 2022. The decline likely reflects some of the discharged debt due to the Closed School Discharge and Public Service Loan Forgiveness programs, offsetting the typical seasonal originations with the start of the academic year.
  • About 4% of aggregate student debt was 90+ days delinquent or in default in Q3 2022. The lower level of student debt delinquency reflects the continued repayment pause on student loans, which is scheduled to end on January 1, 2023.

Household Debt and Credit Developments as of Q3 2022


CATEGORY
QUARTERLY CHANGE * (BILLIONS $)ANNUAL CHANGE**
(BILLIONS $)
TOTAL AS OF Q3 2022 (TRILLIONS $)
MORTGAGE DEBT(+) $282(+) $997$11.67
HOME EQUITY LINE OF CREDIT (+) $3 (+) $5$0.32
STUDENT DEBT (-) $15(-) $10$1.57         
AUTO DEBT(+) $22(+) $81$1.52
CREDIT CARD DEBT(+) $38(+) $121$0.93
OTHER(+) $21(+) $68$0.49
TOTAL DEBT(+) $351(+) $1262$16.51

*Change from Q2 2022 to Q3 2022
** Change from Q3 2021 to Q3 2022

Flow into Serious Delinquency (90 days or more delinquent)


CATEGORY 1
Q3 2021Q3 2022
MORTGAGE DEBT0.27%0.50%
HOME EQUITY LINE OF CREDIT0.25%0.51%
STUDENT LOAN DEBT1.08%1.04%
AUTO LOAN DEBT1.57%2.02%
CREDIT CARD DEBT3.24%3.69%
OTHER2.84%3.55%
ALL0.70%0.94%

About the Report

The Federal Reserve Bank of New York's Household Debt and Credit Report provides unique data and insight into the credit conditions and activity of U.S. consumers. Based on data from the New York Fed's Consumer Credit Panel, a nationally representative sample drawn from anonymized Equifax credit data, the report provides a quarterly snapshot of household trends in borrowing and indebtedness, including data about mortgages, student loans, credit cards, auto loans and delinquencies. The report aims to help community groups, small businesses, state and local governments and the public to better understand, monitor, and respond to trends in borrowing and indebtedness at the household level. Sections of the report are presented as interactive graphs on the New York Fed's Household Debt and Credit Report web page and the full report is available for download.

1 Rates represent annualized shares of balances transitioning into delinquency. Flow into serious delinquency is computed as the balances that have newly become at least 90 days late in the reference quarter divided by the balances that were current of less than 90 days past due in the previous quarter.

Contact
Mariah Measey
(347) 978-3071
Mariah.Measey@ny.frb.org