DBA Diaries

Thoughts and experiences of a DBA working with SQL Server and MySQL

How to Setup MySQL Master Master Replication

Posted on April 4, 2018 Written by Andy Hayes 1 Comment

mysql master master replication

MySQL master master replication, also known as "mysql chained replication", "multi master replication or "mysql daisy chaining replication" is an extension of mysql replication allowing the creation of multiple master servers that can then be masters of multiple slaves. In this post, I demonstrate how to setup mysql master master replication. In a multi master mysql configuration, bar the first master server, each additional master acts as both a master and slave. Therefore, it is possible to create new masters from each additional slave added. Take a look at this diagram which helps to … [Continue reading]

Filed Under: MySQL Administration Tagged With: mysql, replication

How To Use SQL to Convert a STRING to an INT

Posted on November 25, 2017 Written by Andy Hayes Leave a Comment

sql convert string to int

Using SQL to convert a string to an int is used in a variety of situations. You may have text data that you cannot alter at the source and you need to get some accurate answers from it. You may also have text data that you want to insert to an integer column. There could be other reasons too. There is an easy solution to this and I will show you examples in both SQL Server and MySQL. How to Convert a String to Number Using T-SQL in SQL Server Let us create some data first to demonstrate this: If I create some data like the following and then try to order it from lowest number to … [Continue reading]

Filed Under: SQL Tips and Tricks Tagged With: mysql, sql server

How to set up MySQL Replication Tutorial

Posted on November 11, 2017 Written by Andy Hayes 1 Comment

setup mysql replication master config file

One may setup MySQL replication typically either to scale out, facilitate reporting or to provide backups of MySQL databases. I wrote a post about this before. The whole process relies on binary logs which are output to a location on the master … [Continue reading]

Filed Under: MySQL Administration Tagged With: mysql

How to Use SQL CASE for Conditional Logic in Your SQL Queries

Posted on May 15, 2017 Written by Andy Hayes Leave a Comment

SQL CASE sample data

SQL CASE provides the author of the query with the ability to perform conditional logic in their SQL queries for SELECT, INSERT, UPDATE, DELETE. It is also possible to use it with SET, IN, HAVING, ORDER BY and WHERE. It comes in two formats: … [Continue reading]

Filed Under: All Articles, SQL Tips and Tricks Tagged With: mysql, sql server, t-sql

  • 1
  • 2
  • 3
  • …
  • 22
  • Next Page »

Categories

  • All Articles (82)
  • Career Development (8)
  • MySQL Administration (18)
  • MySQL Performance (2)
  • SQL Server Administration (24)
  • SQL Server News (3)
  • SQL Server Performance (14)
  • SQL Server Security (3)
  • SQL Tips and Tricks (19)

Top 10 Popular Posts

  • Using sp_change_users_login to fix SQL Server orphaned users
  • How to shrink tempdb
  • MySQL SHOW USERS? – How to List All MySQL Users and Privileges
  • How to Transfer Logins to Another SQL Server or Instance
  • How to Delete Millions of Rows using T-SQL with Reduced Impact
  • T-SQL – How to Select Top N Rows for Each Group Using ROW_NUMBER()
  • New T-SQL features in SQL Server 2012 – OFFSET and FETCH
  • How to Kill All MySQL Processes For a Specific User
  • Using exec sp_who2 to help with SQL Server troubleshooting
  • How to move tempdb

Recent Posts

  • How to Setup MySQL Master Master Replication
  • How To Use SQL to Convert a STRING to an INT
  • How to set up MySQL Replication Tutorial
  • How to Use SQL CASE for Conditional Logic in Your SQL Queries
  • Using ISNULL in SQL Server to Replace NULL Values

Search

Connect

  • Twitter
  • Facebook
  • Google+
  • RSS

About

  • Cookie Policy
  • Disclaimer
  • About
Copyright © ‘2021’ DBA Diaries built on the Genesis Framework

This site uses cookies. We assume you are happy with cookies but click the link if you are not. Close