Showing entries 111 to 120 of 253
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Blog (reset)
MySQL EXTRACT() method for specific DATE and TIME values

Date and time values are some of the most important datatypes in an RDBMS. From tracking order dates to payroll hours, DATE and DATETIME datatypes are used in all types of applications. At times as a Developer, you may need only certain portions of a DATE or DATETIME value. In MySQL, the EXTRACT() function can provide you with a specific component of a DATE or DATETIME value depending on which INTERVAL is given as a parameter. Continue reading to see example EXTRACT() queries for understanding…

Photo by Omar Al-Ghossen on Unsplash

[Read more]
Dynamic MySQL CREATE TABLE statement with pandas and pyodbc

Have you ever had to type out a massive CREATE TABLE statement by hand? One with dozens of columns? Maybe several dozens of columns? There are likely some GUI tools to help with large CREATE TABLE commands. Or, other drag-n-drop types of software that I am not familiar with. What if you could write a few lines of Python code and take care of a huge CREATE TABLE statement with way less effort than typed manually? Interested? Continue reading and see how using pandas, pyodbc, and MySQL…

Photo by Vorsen Furniture on Unsplash

OS, Software, and DB used:

  • OpenSuse Leap 15.1
[Read more]
3 MySQL Commands Developers should know.

If you are a developer working in a MySQL environment, this blog post is for you. I share 3 MySQL commands or statements that you should know. That is a bold statement, I know. Turns out, once you do know (of) these commands, you will use them all the time. They minimize guesswork which leads to better productivity in other facets of your programming and querying workflow. I use them myself almost daily and am sure you will too once you see how simple they are to use. So why should you know them? Continue reading and find out…

Photo by hannah joshua on Unsplash

OS, Software, and DB used:

  • OpenSuse Leap 15.1
[Read more]
TRIM() string function in MySQL – with examples.

In this post, I’ll cover examples of the MySQL TRIM() function. TRIM() removes specific characters – or spaces – from a given string, at either: the beginning, ending, or potentially in both locations depending on several factors. With an optional keyword argument that controls which character(s) – if any – are removed, TRIM() can be tricky so let’s gain understanding with several easy-to-digest examples…

Photo by Peter Beukema on Unsplash

OS, Software, and DB used:

  • OpenSuse Leap 15.1
  • MySQL 8.0.20

Self-Promotion:

If you enjoy …

[Read more]
Sorting associative arrays in PHP with array_multisort() – New learning

If you write MySQL queries, at some point you are going to have to provide query results in a specific order. To impose any ordering in MySQL (this applies to SQL overall and is not directed only at MySQL), you have to use the ORDER BY clause. Without it, there is no guaranteed order. The database is free to send back query results in any order. As I learn PHP, I make it a point to explore both the MySQL side, along with the PHP side in regards to similar type tasks and the efficiency of each. So far in my PHP journey, I have found that arrays are used quite extensively. In this post, I’ll cover array_multisort() – one of many in-built PHP functions – used for sorting arrays. In the context of the example data for this post, the arrays are populated by an unordered MySQL query. Let’s see one example of how you can establish a sorting order in a PHP …

[Read more]
Improved security audit features in Galera Cluster for MySQL 5.7.30, and an updated 5.6.48

Codership is pleased to announce a new Generally Available (GA) release of the multi-master Galera Cluster for MySQL 5.6 and 5.7, consisting of MySQL-wsrep 5.6.48 (release notes, download) and MySQL-wsrep 5.7.30 (release notes, download) with a new Galera Replication library 3.30 (release notes, download), implementing wsrep API version 25. This release incorporates all changes to MySQL 5.6.48 and 5.7.30 respectively, making it a MySQL High Availability solution.

A highlight of this release is that with MySQL 5.7.30, you will now have access to using the Percona audit log plugin, which will help with monitoring and logging connection and query activity that has been performed on specific servers. This implementation is provided as an alternative to the MySQL Enterprise Audit Log Plugin.

The Galera Replication library 3.30 has an enhancement to ensure that upon GCache recovery, all available space will be reclaimed in the …

[Read more]
Galera Cluster 4 for MySQL 8 is Generally Available!

Codership is proud to announce the first Generally Available (GA) release of Galera Cluster 4 for MySQL 8 and improve MySQL High Availability a great deal. The current release comes with MySQL 8.0.19 and includes the Galera Replication Library 4.5 with wsrep API version 26. You can download it now (and note that we have packages for various Linux distributions). 

Galera 4 and MySQL 8.0.19 have many new features, but here are some of the highlights:

  • Streaming replication to support large transactions by splitting transaction replication then applying them in smaller fragments. You can use this feature to load data faster, as data is written to all nodes simultaneously (or not at all in case of a failure in any single node).
  • Improved …
[Read more]
Installing Galera on Amazon Linux 2 for Geo-distributed Multi-master MySQL

We recently covered Installing Galera Cluster 4 with MySQL 8 on Ubuntu 18.04 , the new Galera version for MySQL High Availability. We got a request to see if we would be able to install it on Amazon Linux 2, and the short answer is yes, we are able to deploy Galera Cluster on Amazon Linux 2.

We have even published Installing a Galera Cluster on AWS guide for Geo-distributed MySQL Multi-master clustering which covers how to install a 3-node Galera Cluster on CentOS 7 to achieve disaster recovery . It turns out, Amazon Linux 2 tends to be quite compatible with this article ( …

[Read more]
Installing Galera Cluster 4 with MySQL 8 on Ubuntu 18.04

Since the beta of Galera Cluster 4 with MySQL 8 has been released, we’ve had people asking questions as to how to install it on Ubuntu 18.04. This blog post will cover just that.

Prerequisites

  • All 3 nodes need to have Ubuntu 18.04 installed
  • Firewall (if setup) needs to accept connections on 3306, 4444, 4567, 4568 (a default setup has the firewall disabled)
  • AppArmor disabled (this is as simple as executing: systemctl stop apparmor and systemctl disable apparmor).

Installation and Configuration

We have good installation documentation as well as a quick how to get this installed in AWS (though this is CentOS centric).

First, you will need to ensure that the …

[Read more]
Announcing the Release Candidate of MySQL 8.0 + Galera 4

A time for new beginnings beckons upon us, and Codership is pleased to announce the much anticipated Release Candidate of MySQL 8.0 that comes with Galera 4. It comes with MySQL 8.0.19 and includes the Galera Replication Library 4.5 Release Candidate and wsrep API version 26. 

 

Galera 4 and MySQL 8.0.19 have many new features, but here are some of the highlights:

  • Streaming replication to support large transactions by splitting transaction replication then applying them in smaller fragments.
  • Improved foreign key support, as write set certification rules are optimised and there will be a reduction in the number of foreign key related false conflicts in certifications.
  • Group commit is …
[Read more]
Showing entries 111 to 120 of 253
« 10 Newer Entries | 10 Older Entries »