File/Pos Replication : Skip Slave's sql_thread error
[COMMAND]
For binlog file & position based replication setup, To skip the
slave's sql_thread error, run below command.
stop slave; set global sql_slave_skip_counter=1; start
slave; select sleep(3); show slave status\G
Recently, I was working on one of the support ticket where customer was complaining that when he change datadir location by copying datadir from C: to F:, set mysql permissions and changing location in my.ini, he could not able to start mysql. Even no error msg in MySQL error log OR application log that why it doesn’t start.
We have checked all the required steps mentioned in documentations and blog posts but still the issue was not getting resolved. Finally, one of my colleague suggested to read this forum post.
https://forums.mysql.com/read.php?169,659235,659254#msg-659254
and we found out that NETWORK SERVICE permission is required for datadir. By default, it will be given to the C:\ but not for other drives. So when we change any datadir to other drive like E:\ or F:\, we …
[Read more]During our presentation at Percona Live 2019 Intel and its software partners will introduce the audience to the work we’re doing to enable an open-source framework, we call Cloud Native Database. This is a collaborative effort between Intel, Rockset, PlanetScale, MariaDB and Percona.
Through the presentation the audience will be introduced to a set of principles and architectural elements that define what we mean by Cloud Native Database. We will discuss Rockset’s RocksDB-Cloud library and how it works with Facebook’s MyRocks storage engine. We also will cover …
[Read more]
set --server-id to enable either a master or a slave
Below issue can be faced, when we run CHANGE MASTER command to
setup replication.
mysql> change master to
master_host='xx.xx.xx.xx',master_user='rep_user',master_password="xxxxxxx",
master_log_file='db-01-test-bin.000064',master_log_pos=95854072,master_auto_position=0;
ERROR 1794 (HY000): Slave is not configured or failed to
initialize properly. You must at least set --server-id to enable
either a master or a slave. Additional error messages can be
found in the MySQL error log.
Solution :- Here It is assumed, We have already set server-id
parameter value different on master and slave node but still, we
have the above error.
It happens once, you performed the server packages upgrade(like
from 5.6 to 5.7) and just started MySQL service and going to run
CHANGE MASTER command.
So, to solve this issue, Run mysql_upgrade command …
(In the previous post, Part 3, we covered Compaction.)
In this blog post, we continue on our series of exploring MyRocks mechanics by looking at the configurable server variables and column family options. In our last post, I explained at a high level how data moves from its initial disk-written files into the full data set structure of MyRocks using a process called compaction. In this post, we’re going to look a little closer at two important features that are leveraged as data cascades down through this compaction process: bloom filters and compression.
Bloom filters
Before we approach how bloom filters are used in MyRocks, we need to know what a bloom filter is. The short definition is that a bloom filter is a space-efficient data structure used to tell you if an …
[Read more]MySQL (really) supports CHECK CONSTRAINT since version 8.0.16. In this article I will show you 2 things: - An elegant way to simulate check constraint in MySQL 5.7 & 8.0. - How easy & convenient it is to use CHECK constraints in 8.0.16.
MySQL Server generates several logs that can help you monitor the activities of the server. However, once these logs are enabled, they can grow in size and start taking up too much disk space. This is why it’s important to have an automated way of archiving and preserving MySQL log files for a certain duration, as well as deleting the old ones. In this blog post, we describe some best practices for setting up and managing MySQL error logs, general logs and slow query logs for your MySQL deployments.
Setting Up MySQL Server Logging
Let’s look at how to setup the following 3 types of logs:
Error Log
Logs all the problems encountered during starting, running, or stopping mysqld. This log can be enabled by having the following option in /etc/my.cnf file:
- …
“Hey, what’s going on with my applications? I installed a newer version of MySQL. I have queries that perfectly run with the older version and now I have a lot of errors.”
This is a question some customers have asked me after upgrading MySQL. In this article, we’ll see what one of the most frequent causes of this issue is, and how to solve it.
We are talking about this error:
ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.web_log.user_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Have you ever seen it?
SQL_MODE
As the first thing let me introduce the concept of SQL_MODE.
MySQL can work using different SQL modes that affect the syntax of the queries and validation checks. Based on the configured value of the …
[Read more]It’s not long now before we’ll be gathering in Austin TX for this year’s Percona Live event. It’s the only conference of its type dedicated entirely to open source databases – of all marques. From a community perspective, we have a few updates to share.
Community Dinner
We’re happy to say that PlanetScale have stepped up to the plate (!) and are sponsoring this year’s community dinner alongside Percona. This year we are taking to the water and consequently numbers are limited to 100 attendees. If you are keen to join us, be sure to not miss the boat. 😉
The speakers’ perspective
For speakers who also enjoy writing, there’s an …
[Read more]In a previous post I showed that by default when authentication_ldap_simple communicates with a Windows Domain Controller (or any other LDAP service), then the password is transmitted unencrypted during authentication.
This time I’ll demonstrate how to close this loophole. A pre-requisite is that the Domain Controller needs to be configured to accept secure connections. This is done by installing a certificate, the process is well documented elsewhere so I won’t repeat it here.
There are two different ways to configure secure communication. The first method is to set …
[Read more]