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 …
In Part I, we introduced a High Availability (HA) framework for MySQL hosting and discussed various components and their functionality. Now in Part II, we will discuss the details of MySQL semisynchronous replication and the related configuration settings that help us ensure redundancy and consistency of the data in our HA setup. Make sure to check back in for Part III where we will review various failure scenarios that could arise and the way the framework responds and recovers from these conditions.
What is MySQL Semisynchronous Replication?
Simply put, in a …
[Read more]I have already explained about Express.js tutorial and creating simple app with it. As promised in that post i thought to come up with another Express.js tutorial with MySQL. But again, explaining just the concept about library is not enough and this is not even why codeforgeek exits. So i thought to come up with […]
Have you been experiencing slow MySQL startup times in GTID mode? We recently ran into this issue on one of our MySQL hosting deployments and set out to solve the problem. In this blog, we break down the issue that could be slowing down your MySQL restart times, how to debug for your deployment, and what you can do to decrease your start time and improve your understanding of GTID-based replication.
How We Found The Problem
We were investigating slow MySQL startup times on a low-end, disk-based MySQL 5.7.21 deployment which had GTID mode enabled. The system was part of a master-slave pair and was under a moderate write load. When restarting during a scheduled maintenance, we …
[Read more]