MySQL defaults to port 3306 when installed but sometimes for another reason, it may be listening on a different port. In this post, I list some ways in which you can find out which port your MySQL instance is running on. Using the MySQL configuration file to determine which port it is running on If you are running linux, then this is an easy one liner. On my test machine, my … [Read more...] about How to Determine Which Port MySQL is Running On
MySQL Replication Events – Statement versus Row-Based Formats
In a recent post, I briefly touched upon mysql replication events. It is important to know the advantages and disadvantages of each type. There are two types of replication event: Statement based – these are the write operations. They written to the binary log as SQL statements. Row based – these are the row changes and they are written to the binary log as complete … [Read more...] about MySQL Replication Events – Statement versus Row-Based Formats
MySQL Replication Use Cases
In my last post, I summarized when MySQL replication is typically implemented. I now want to expand on that and talk about MySQL replication use cases. Scaling out using MySQL Replication Let's take a typical example, the application is read-heavy versus writes. The server is under heavy read load and you want to reduce that. You have optimized indexes etc all you can but the … [Read more...] about MySQL Replication Use Cases
What is MySQL Replication and How Does It Work?
MySQL replication, a.k.a MySQL database replication provides the facility to make replicas of databases. The ability to make exact copies of databases and keep them in real-time sync as changes are made at the "master" provides a number of advantages. In summary these are: Scaling out a database application Reducing database backup impact Facilitate reporting w … [Read more...] about What is MySQL Replication and How Does It Work?
T-SQL – How to Select Top N Rows for Each Group Using ROW_NUMBER()
I've recently been working on a data migration project and have found myself utilizing the ROW_NUMBER() function in SQL Server a lot. This function has been around since SQL Server 2005 and at its core, provides a way to provide sequential numbering for rows returned by a query. One of the requirements for an export process was to return the most recent two customer o … [Read more...] about T-SQL – How to Select Top N Rows for Each Group Using ROW_NUMBER()