We have covered session management in ExpressJs using a global variable technique which of course will not work in case of shared server or concurrent execution of HTTP requests which is the most familiar production scenario. Codeforgeek readers requested to provide a solution for this issue and the optimal one is to use external session […]
We have covered session management in ExpressJs using global variable technique which of course will not work in case of shared server or concurrent execution of http requests which is most familiar production scenario.
Codeforgeek readers requested to provide solution for these issue and the optimal one is to use external session storage which is not dependent on application requests, answer is Redis cause this is the light weight and easy to use NoSQL database.
In this tutorial i am going to explain how to design and code session oriented express web applications by using Redis as external session storage.
To get familiar with Session handling in ExpressJS I recommend to read our first article …
[Read more]Introduction In this article, we are going to see how a relational database executes SQL statements and prepared statements. SQL statement lifecycle The main database modules responsible for processing a SQL statement are: the Parser, the Optimizer, the Executor. A SQL statement execution looks like in the following diagram. Parser The Parser checks the SQL statement and ensures its validity. The statements are verified both syntactically (the statement keywords must be properly spelled and following the SQL language guidelines) and semantically (the referenced tables and column do exist in the database). During... Read More
The post How does a relational database execute SQL statements and prepared statements appeared first on …
[Read more]
I have had some requests to write some blogs on the basics of
using PHP and MySQL together. This will not be a series for
the experienced as it will start at a level where I will go into
a lot of details but expect very few prerequisites from the
reader. If this is not you, please move on. If it is you
and you read something you do not understand, please contact me
to show me where I assumed too much.
PHP and MySQL are both in their mid twenties and
both vital in the worlds of developers. With the big
improvements in PHP 7 and MySQL 8, I have found a lot of
developers flocking to both but stymied by the examples they see
as their are many details not explained. So let's get to the
explaining!
1. Use the latest software
If you are not using PHP 7.2 or 7.3 (or maybe 7.1) then you are
missing out in features and performance. The PHP 5.x series
is deprecated, no longer support, and …
Wondering which databases are trending in 2019? We asked hundreds of developers, engineers, software architects, dev teams, and IT leaders at DeveloperWeek to discover the current NoSQL vs. SQL usage, most popular databases, important metrics to track, and their most time-consuming database management tasks. Get the latest insights on MySQL, MongoDB, PostgreSQL, Redis, and many others to see which database management systems are most favored this year.
SQL vs. NoSQL
As any database administrator knows, the first question you have to ask yourself is whether to use a SQL or NoSQL database for your application. …
[Read more]- Replication used to replicate data from the Master node to a slave node[Replica].
- By default Replication is asynchronous.
- It uses binary logs for reading data from the Master node and relay log on slave[Replica].
- Depending on the configuration, you can replicate all databases, selected databases, or even selected tables within a database.
Replication Methods:
-
File-based Replication:
The traditional method is based on replicating events from the master’s binary log, and requires the log files and positions in them to be synchronized between master and slave.
-
GTID Replication:
The newer method based on global transaction identifiers (GTIDs) is transactional and therefore does not require working with log files or positions within …
[Read more]In Generic binary Installation method, we are extracting compressed tar files of MySQL and later we can do customization for MySQL setup as per our requirement. Like having different data directory, log directory etc.
MySQL Generic Binaries can be used to install MySQL on Unix/Linux platforms.
MySQL Installation has a dependency on the libaio library. Make sure that is there on a server before mysql install.
-
Create a mysql user and group, which we will use as a service account for the mysql server.
shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
-
Extract MySQL binaries TAR to mysql base directory for example in /mysql dir
-
Create require directories and set appropriate permissions.
shell> cd mysql
…
[Read more]Want to deploy WordPress 5.0 on the Now platform by ZEIT? Our friends over at ZEIT’s Now global serverless deployment platform whipped up a great tutorial for WordPress5-on-Now using cheap MySQL hosting instances from ScaleGrid. With such strong interest in this installation, we decided to write up the steps to configure your MySQL database on the ScaleGrid side to get you up and running ever faster with WordPress on Now.
Leave your comments: https://t.co/exuBzSHkHM
@now/wordpress summary:
◆ λ size = 13mb
◆ Just needs `wp-config.php`
◆ All static assets output directly to CDN …
The next two weeks are a big change for me compared to the last
two weeks. The last two weeks I was in Belgium and now I am
in Miami before heading to the Dominican Republic. The one
thing in common is that I am speaking on the MySQL Document
Store.
SunshinePHP has become a favorite conference for
many PHP developers for many reasons and this morning I will be
running a three hour tutorial on using the PECL MySQL X DevAPI
and the MySQL Document Store with PHP and then have a one hour
talk later in the show. Plus I am joined by the amazing Kathy
Forte who will speak on Driving Innovation With MySQL 8.0 and
Docker.
Pycaribbean
is a new show hoping to foster a growing developer community into
the area. And i will be showing how to use the MySQL
Document Store with Python.All opinions …
In a MySQL hosting replication setup, the parameter Seconds_Behind_Master (SBM), as displayed by the SHOW SLAVE STATUS command, is commonly used as an indication of the current replication lag of the slave. In this blog post, we examine how to understand and interpret this value in various situations.
Possible Values of Seconds Behind Master
The value of SBM, as explained in the MySQL documentation, depends on the state of the MySQL slave in general, and the states of MySQL slave SQL_THREAD and IO_THREAD in particular. While IO_THREAD connects with the master and reads the updates, SQL_THREAD applies these updates on the slave. Let’s examine the possible values of SBM during different states of the MySQL Slave.
When SBM Value is Null
- SBM is …