Re: [Maria-discuss] Query ambiguity

2018-05-17 Thread Karthick Subramanian
Check whether you really need a comma here:
*metrics_5.id ,*
*(SELECT *


Also in your screen shot, AS 'LT CPC`, there is no comma and you use
derived table in SELECT and trying to use JOIN in the FROM using this.

Sorry to say this, I think you can either break this logic into small
simple chunks and use SP to derive the logic in case you are not much
comfortable writing a complex SQL.

I think there is lot of syntax errors on it.


On Thu, May 17, 2018 at 10:05 AM, Dev C  wrote:

> Here is the full code and picture on what is required.
>
>  SELECT
>   campaigns_5.name AS `Campaign Name`,
>   adgroups_5.name AS `Adgroup Name`,
>   STNegData1W.query,
>   keywords_5.matchType AS `Match Type`,
>   Sum(metrics_5.clicks) AS `LT Clicks`,
>   Sum(metrics_5.costs) AS `LT Spend`,
>   Sum(metrics_5.orders) AS `LT Orders`,
>   metrics_5.sales AS `LT Sales`,
>   If(Sum(metrics_5.sales)=0,0,Sum(metrics_5.costs)/Sum(metrics_5.sales))
> AS `LT ACOS`,
>   If(Sum(clicks)=0,0,Sum(costs)/Sum(clicks)) AS `LT CPC`
> FROM (((keywords_5 INNER JOIN campaigns_5 ON keywords_5.campaignId =
> campaigns_5.campaignId) INNER JOIN adgroups_5 ON keywords_5.adGroupId =
> adgroups_5.adGroupId) INNER JOIN STNegData1W ON keywords_5.keywordId =
> STNegData1W.keywordId) INNER JOIN metrics_5 ON STNegData1W.metricId = 
> *metrics_5.id
> ,*
> *(SELECT *
>   STNegData4W.query,
>   STNegData4W.metricId,
>   STNegData4W.keywordId,
>   metrics_5.impressions
> FROM
>   (SELECT searchterm_5.query, searchterm_5.metricId,
> searchterm_5.keywordId, Sum(metrics_5.orders) AS `4W Orders`
> FROM searchterm_5 INNER JOIN metrics_5 ON searchterm_5.metricId =
> metrics_5.id
> GROUP BY searchterm_5.query, searchterm_5.metricId,
> searchterm_5.keywordId, metrics_5.created_at
> HAVING (((Sum(metrics_5.orders))=0) AND ((metrics_5.created_at) >
> DATE_SUB('2018-05-10',INTERVAL 28 DAY AS STNegData4W
>  INNER JOIN
>  metrics_5 ON STNegData4W.metricId = metrics_5.id
> GROUP BY STNegData4W.query, STNegData4W.metricId, STNegData4W.keywordId,
> metrics_5.impressions, metrics_5.created_at
> HAVING (((metrics_5.impressions)>0) AND ((metrics_5.created_at)>
> DATE_SUB('2018-05-10', INTERVAL 7 DAY AS STNegData1W
> GROUP BY campaigns_5.name, adgroups_5.name, STNegData1W.query,
> keywords_5.matchType, metrics_5.sales, campaigns_5.user_market_id, Right(
> campaigns_5.name,4)
> HAVING (((Sum(metrics_5.clicks))>5) AND ((campaigns_5.user_market_id)=12)
> AND ((Right(campaigns_5.name,4))="PFUS"))
>
> On Thu, May 17, 2018 at 4:06 PM, Pantelis Theodosiou 
> wrote:
>
>> What Rhys said, please post queries as text, not as images.
>>
>> The issue is likely due to the way you structured your query. You have
>> put a derived table in a random place (in the SELECT list).
>>
>> Please try to read about CTEs. It will help you design those complex
>> queries better and make them more readable and easy to edit:
>> https://mariadb.com/kb/en/library/with/
>>
>> Best regards
>>
>> Pantelis Theodosiou
>>
>> On Thu, May 17, 2018 at 11:23 AM,  wrote:
>>
>>> You're not making a lot of sense here. Please explain the "ambiguity".
>>> That's a fairly complex query so you should include as text.
>>>
>>>
>>>
>>> "Does not work" <- In the image. It helps if you include error message.
>>>
>>>
>>>
>>> *From:* Maria-discuss [mailto:maria-discuss-bounces+rhys.campbell=
>>> swisscom@lists.launchpad.net] *On Behalf Of *Dev C
>>> *Sent:* 17 May 2018 06:41
>>> *To:* maria-discuss@lists.launchpad.net; Maria Developers <
>>> maria-develop...@lists.launchpad.net>
>>> *Subject:* [Maria-discuss] Query ambiguity
>>>
>>>
>>>
>>> Hello
>>>
>>>
>>>
>>> I have query ambiguity as attached. Please help me on how to solve that.
>>>
>>>
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~maria-discuss
>>> Post to : maria-discuss@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~maria-discuss
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Query ambiguity

2018-05-17 Thread Karthick Subramanian
I think the OP needs to try a lot of googling and stackoverflow etc first
and break the heads first and then post it here if it's really required.
IMHO, if people start asking the SQL problems (mainly most of the sql
issues are knowledge gap related) here, then I think the quality of this
forum will be compromised.

On Thu, May 17, 2018, 6:36 AM Pantelis Theodosiou 
wrote:

> What Rhys said, please post queries as text, not as images.
>
> The issue is likely due to the way you structured your query. You have put
> a derived table in a random place (in the SELECT list).
>
> Please try to read about CTEs. It will help you design those complex
> queries better and make them more readable and easy to edit:
> https://mariadb.com/kb/en/library/with/
>
> Best regards
>
> Pantelis Theodosiou
>
> On Thu, May 17, 2018 at 11:23 AM,  wrote:
>
>> You're not making a lot of sense here. Please explain the "ambiguity".
>> That's a fairly complex query so you should include as text.
>>
>>
>>
>> "Does not work" <- In the image. It helps if you include error message.
>>
>>
>>
>> *From:* Maria-discuss [mailto:maria-discuss-bounces+rhys.campbell=
>> swisscom@lists.launchpad.net] *On Behalf Of *Dev C
>> *Sent:* 17 May 2018 06:41
>> *To:* maria-discuss@lists.launchpad.net; Maria Developers <
>> maria-develop...@lists.launchpad.net>
>> *Subject:* [Maria-discuss] Query ambiguity
>>
>>
>>
>> Hello
>>
>>
>>
>> I have query ambiguity as attached. Please help me on how to solve that.
>>
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~maria-discuss
>> Post to : maria-discuss@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~maria-discuss
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] SQL_MODE=ORACLE documentation

2018-03-05 Thread Karthick Subramanian
IMHO, putting pointers each others will help instead of putting Oracle
Syntax in the mainline pages. This may cause confusion for the people who
never used oracle in firsthand.

On Mon, Mar 5, 2018 at 2:11 PM, Alexander Barkov  wrote:

> Hello Federico,
>
> On 03/02/2018 07:12 PM, Federico Razzoli wrote:
>
>> With SQL_MODE='ORACLE' a completely new syntax has been introduced. Basic
>> syntax constructs of MariaDB become unavailable, but not all Oracle syntax
>> seems to be supported. Is there any plan to document the supported syntax?
>> Current documentation looks like an unfinished draft and doesn't save much
>> time for the poor user.
>>
>
> The difference between the native MariaDB (SQL/PSM based) syntax
> and the Oracle PL/SQL syntax is described as a summary here:
>
> https://mariadb.com/kb/en/library/sql_modeoracle-from-mariadb-103/
>
> Yes, the documentation will be improving.
>
> We need to decide if we want two separate SQL/PSM and PL/SQL pages
> on every topic.
>
> For example, for the WHILE loop syntax,
> do we need an new PL/SQL article similar to
> https://mariadb.com/kb/en/library/while/ ,
> or should we put the PL/SQL WHILE syntax directly
> on this page.
>
> What do you think would be more readable?
>
> I'm slightly inclined towards having separate pages
> for SQL/PSM and PL/SQL, with links to each other
> in the "See Also" section.
>
>
>
>
>
>> Regards,
>> Federico
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~maria-discuss
>> Post to : maria-discuss@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~maria-discuss
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] procedure to change database encryption with file_key_management plugin?

2018-02-26 Thread Karthick Subramanian
Hi Obsa,

Thank you for sharing this link, sounds interesting. In case you succeed
with this Vault implementation, kindly share us your experience (may be a
blog post on this). I am also looking for implementing something similar
without AWS KMS option.

Thank you.



On Tue, Feb 27, 2018 at 5:59 AM,  wrote:

> Sergei,
>
> Still looking for some alternative to AWS.
>
> I did find 'Vault', a well-established & active project
>
>https://www.vaultproject.io/intro/index.html
>
> which appears to be an on-premises alternative to AWS & HSMs
>
> with open sources here
>
>   https://github.com/hashicorp/vault
>
> and a "MariaDB Secrets Engine"
>
>   https://www.vaultproject.io/docs/secrets/databases/mysql-maria.html
>
> "The database secrets engine generates database credentials dynamically
> based on configured roles. It works with a number of different databases
> through a plugin interface. There are a number of builtin database types
> and an exposed framework for running custom database types for
> extendability. This means that services that need to access a database no
> longer need to hardcode credentials: they can request them from Vault, and
> use Vault's leasing mechanism to more easily roll keys."
>
> Has there been any work on a Vault-based MariaDB plugin with key
> management/rotation capabilities similar to that provided by the AWS
> offsite solution?
>
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Is this normal behaviour?

2018-01-04 Thread Karthick Subramanian
Thank you.

I noticed some anonymous user entries in mysql.user. I have executed the
mysql_secure_installation and removed those users as well.

On Thu, Jan 4, 2018 at 1:03 PM, Federico Razzoli <federico_...@yahoo.it>
wrote:

> Check table mysql.user: you probably have the account '%'@localhost. It's
> a pattern, and rot@localhost matches.
> When running SHOW DATABASES you see only the databases which you have some
> permissions.
>
> Federico
>
>
>
> ----------
> *Da:* Karthick Subramanian <ksubraman...@paycommerce.com>
> *A:* Maria Discuss <maria-discuss@lists.launchpad.net>
> *Inviato:* Giovedì 4 Gennaio 2018 6:01
> *Oggetto:* [Maria-discuss] Is this normal behaviour?
>
> All,
>
> When I tried to connect in centos 7 mariadb 10.2.11 server using root
> user, by mistake I gave wrong user name, but it connected successfully. I
> am not sure why. When I check show databases, it didnt list all DBs, but
> when I connect with root again, I can see all valid Dbs.
>
> Is this normal that even if I give wrong user, it authenticate into DB
> server from root.
>
> [root@ipaddr ~]# mysql -u rot
> Welcome to the MariaDB monitor.  Commands end with ; or \g.
> Your MariaDB connection id is 22
> Server version: 10.2.11-MariaDB MariaDB Server
>
> Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input
> statement.
>
> MariaDB [(none)]> show databases;
> ++
> | Database   |
> ++
> | information_schema |
> | test   |
> ++
> 2 rows in set (0.00 sec)
>
> MariaDB [(none)]> exit
> Bye
> [root@ipaddr~]# mysql -u root
> Welcome to the MariaDB monitor.  Commands end with ; or \g.
> Your MariaDB connection id is 24
> Server version: 10.2.11-MariaDB MariaDB Server
>
> Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input
> statement.
>
> MariaDB [(none)]> show databases;
> ++
> | Database   |
> ++
> | mydb01 |
> | information_schema |
> | mydb02  |
> | mysql  |
> | performance_schema |
> | test   |
> ++
> 6 rows in set (0.00 sec)
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to: maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help  : https://help.launchpad.net/ListHelp
>
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] Is this normal behaviour?

2018-01-03 Thread Karthick Subramanian
All,

When I tried to connect in centos 7 mariadb 10.2.11 server using root user,
by mistake I gave wrong user name, but it connected successfully. I am not
sure why. When I check show databases, it didnt list all DBs, but when I
connect with root again, I can see all valid Dbs.

Is this normal that even if I give wrong user, it authenticate into DB
server from root.

[root@ipaddr ~]# mysql -u rot
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 22
Server version: 10.2.11-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

MariaDB [(none)]> show databases;
++
| Database   |
++
| information_schema |
| test   |
++
2 rows in set (0.00 sec)

MariaDB [(none)]> exit
Bye
[root@ipaddr~]# mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 24
Server version: 10.2.11-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

MariaDB [(none)]> show databases;
++
| Database   |
++
| mydb01 |
| information_schema |
| mydb02  |
| mysql  |
| performance_schema |
| test   |
++
6 rows in set (0.00 sec)
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Install MariaDB repo official Centos-7

2017-11-27 Thread Karthick Subramanian
Can you check whether *systemctl start mysql* is working for you.

On Tue, Nov 28, 2017 at 4:27 AM, Wilmer Arambula <
tecnologiaterab...@gmail.com> wrote:

> Hi, install MariaDB from the official repository [mariadb.org] for
> Centos-7:
>
> 1.-  yum install MariaDB-server MariaDB-client
>
> When executing:
>
> 2.- systemctl start mariadb.service
>
> Error: Failed to start mariadb.service: Unit not found.
>
> Thks,
>
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] MariaDB upgrade 10.1 to 10.2 CentOS7

2017-11-13 Thread Karthick Subramanian
Hi Elena,

Do you think the yum update causing issue instead of yum remove and yum
install in the first place. Please advise.

On Nov 13, 2017 5:13 PM, "Karthick Subramanian" <
ksubraman...@paycommerce.com> wrote:

> Hi Elena,
>
> [root@one server ~]# rpm -qa | grep -iE 'mariadb|mysql'
> MariaDB-client-10.2.9-1.el7.centos.x86_64
> MariaDB-compat-10.2.9-1.el7.centos.x86_64
> MariaDB-common-10.2.9-1.el7.centos.x86_64
> MariaDB-server-10.2.9-1.el7.centos.x86_64
>
> [root@another server~]#  rpm -qa | grep -iE 'mariadb|mysql'
> pcp-pmda-mysql-3.10.6-2.el7.x86_64
> MariaDB-client-10.2.10-1.el7.centos.x86_64
> MariaDB-server-10.2.10-1.el7.centos.x86_64
> MariaDB-common-10.1.18-1.el7.centos.x86_64
>
>
>
> Steps:
>
> I did the upgrade in two servers:
>
> In both servers (both 10.1), I follow the below steps and got ssame
> unix-socket not loaded error.
>
> set-up repo:
>
> curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
>
> *yum update MariaDB-server MariaDB-client*
>
> MariaDB-Client installed successfully, but MariaDB-server thrown error
> that it couldn't update.
>
> then I remove the mariaDb-Server using below command:
>
> *yum remove MariaDB-server*
>
> then install:
>
> *yum install MariaDB-server*
>
> then mysql-upgrade:
>
> I got the error with unix-socket.
>
> Do you think yum update MariaDB-server caused this issue? Do I need to
> remove and then install, instead of update. Please advise.
>
>
>
>
>
> On Mon, Nov 13, 2017 at 4:49 PM, Elena Stepanova <ele...@montyprogram.com>
> wrote:
>
>> Hi Karthick,
>>
>> On 11/13/2017 11:11 AM, Karthick Subramanian wrote:
>>
>>> All,
>>>
>>> Did anyone face issues after upgrading the mariadb from 10.1 to 10.2 to
>>> login to root user as shown below:
>>>
>>> mysql -u root
>>>
>>> I got the error - unix_socket not loaded.
>>>
>>> I noticed that the unix_socket authentication is required after the
>>> upgrade for root login from localhost. Can anyone confirm whether this is
>>> part of the feature after upgrades.
>>>
>>
>> This is strange, upgrade to packages *provided by MariaDB* shouldn't do
>> it. Packages provided by another party could be a different story. Could
>> you please paste the output of rpm -qa | grep -iE 'mariadb|mysql' or alike?
>>
>>
>>> In my previous version:
>>>
>>> select user, plugin from mysql.user;
>>>
>>> +---+--+-+
>>> | Host  | User | plugin  |
>>> +---+--+-+
>>> | localhost | root ||
>>> 
>>>
>>> After upgrade:
>>>
>>> select user, plugin from mysql.user;
>>>
>>> +---+--+-+
>>> | Host  | User | plugin  |
>>> +---+--+-+
>>> | localhost | root | unix_socket |
>>> ---
>>>
>>
>> The other way round is more common -- some variations of 10.1 did set
>> unix_socket authentication for local root and could have it enabled by
>> default, and then after upgrade to regular 10.2 unix_socket would become
>> disabled while root would still require it.
>>
>> Is it possible that your previous installation points at a different data
>> directory, while the old one that 10.2 now uses had this kind of
>> configuration before?
>>
>> Regards,
>> Elena
>>
>>
>>
>>> Regards,
>>> Karthick
>>>
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~maria-discuss
>>> Post to : maria-discuss@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~maria-discuss
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] MariaDB upgrade 10.1 to 10.2 CentOS7

2017-11-13 Thread Karthick Subramanian
;)

I got what you are saying. Actually I manually write it in repo file
instead of pipe sudo bash, but for simplicity sake for the steps, I
mentioned from the instruction from the site.

But its a good pointer that you have mentioned about this.

On Mon, Nov 13, 2017 at 5:17 PM, Reindl Harald <h.rei...@thelounge.net>
wrote:

>
>
> Am 13.11.2017 um 12:43 schrieb Karthick Subramanian:
>
>> set-up repo:
>>
>> curl -sShttps://downloads.mariadb.com/MariaDB/mariadb_repo_setup  | sudo
>> bash
>>
> don't get me wrong but nobody right in his mind pipes a URL to sudo bash
> and if somebody put that as instructions on a website - well, better not
> say what i think
>
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] MariaDB upgrade 10.1 to 10.2 CentOS7

2017-11-13 Thread Karthick Subramanian
Hi Elena,

[root@one server ~]# rpm -qa | grep -iE 'mariadb|mysql'
MariaDB-client-10.2.9-1.el7.centos.x86_64
MariaDB-compat-10.2.9-1.el7.centos.x86_64
MariaDB-common-10.2.9-1.el7.centos.x86_64
MariaDB-server-10.2.9-1.el7.centos.x86_64

[root@another server~]#  rpm -qa | grep -iE 'mariadb|mysql'
pcp-pmda-mysql-3.10.6-2.el7.x86_64
MariaDB-client-10.2.10-1.el7.centos.x86_64
MariaDB-server-10.2.10-1.el7.centos.x86_64
MariaDB-common-10.1.18-1.el7.centos.x86_64



Steps:

I did the upgrade in two servers:

In both servers (both 10.1), I follow the below steps and got ssame
unix-socket not loaded error.

set-up repo:

curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash

*yum update MariaDB-server MariaDB-client*

MariaDB-Client installed successfully, but MariaDB-server thrown error that
it couldn't update.

then I remove the mariaDb-Server using below command:

*yum remove MariaDB-server*

then install:

*yum install MariaDB-server*

then mysql-upgrade:

I got the error with unix-socket.

Do you think yum update MariaDB-server caused this issue? Do I need to
remove and then install, instead of update. Please advise.





On Mon, Nov 13, 2017 at 4:49 PM, Elena Stepanova <ele...@montyprogram.com>
wrote:

> Hi Karthick,
>
> On 11/13/2017 11:11 AM, Karthick Subramanian wrote:
>
>> All,
>>
>> Did anyone face issues after upgrading the mariadb from 10.1 to 10.2 to
>> login to root user as shown below:
>>
>> mysql -u root
>>
>> I got the error - unix_socket not loaded.
>>
>> I noticed that the unix_socket authentication is required after the
>> upgrade for root login from localhost. Can anyone confirm whether this is
>> part of the feature after upgrades.
>>
>
> This is strange, upgrade to packages *provided by MariaDB* shouldn't do
> it. Packages provided by another party could be a different story. Could
> you please paste the output of rpm -qa | grep -iE 'mariadb|mysql' or alike?
>
>
>> In my previous version:
>>
>> select user, plugin from mysql.user;
>>
>> +---+--+-+
>> | Host  | User | plugin  |
>> +---+--+-+
>> | localhost | root ||
>> 
>>
>> After upgrade:
>>
>> select user, plugin from mysql.user;
>>
>> +---+--+-+
>> | Host  | User | plugin  |
>> +---+--+-+
>> | localhost | root | unix_socket |
>> ---
>>
>
> The other way round is more common -- some variations of 10.1 did set
> unix_socket authentication for local root and could have it enabled by
> default, and then after upgrade to regular 10.2 unix_socket would become
> disabled while root would still require it.
>
> Is it possible that your previous installation points at a different data
> directory, while the old one that 10.2 now uses had this kind of
> configuration before?
>
> Regards,
> Elena
>
>
>
>> Regards,
>> Karthick
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~maria-discuss
>> Post to : maria-discuss@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~maria-discuss
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] MariaDB upgrade 10.1 to 10.2 CentOS7

2017-11-13 Thread Karthick Subramanian
After the upgrade { 1) stop mariadb service, 2) yum remove and 3) yum
install mariadb-server }, I executed the script mysql_upgrade and I go the
unix_socket not loaded error.

# mysql_upgrade
> Version check failed. Got the following error when calling the 'mysql'
> command line client
> ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded
> FATAL ERROR: Upgrade failed


Later, I tried to mysqld-safe --skip-grant-tables and logged into MariaDB,
noticed that root user for localhost contains plugin as unix_socket.





On Mon, Nov 13, 2017 at 2:46 PM, Reindl Harald <h.rei...@thelounge.net>
wrote:

>
>
> Am 13.11.2017 um 10:11 schrieb Karthick Subramanian:
>
>> All,
>>
>> Did anyone face issues after upgrading the mariadb from 10.1 to 10.2 to
>> login to root user as shown below
>>
>
> did you run mysql_upgrade?
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] MariaDB upgrade 10.1 to 10.2 CentOS7

2017-11-13 Thread Karthick Subramanian
All,

Did anyone face issues after upgrading the mariadb from 10.1 to 10.2 to
login to root user as shown below:

mysql -u root

I got the error - unix_socket not loaded.

I noticed that the unix_socket authentication is required after the upgrade
for root login from localhost. Can anyone confirm whether this is part of
the feature after upgrades.

In my previous version:

select user, plugin from mysql.user;

+---+--+-+
| Host  | User | plugin  |
+---+--+-+
| localhost | root ||


After upgrade:

select user, plugin from mysql.user;

+---+--+-+
| Host  | User | plugin  |
+---+--+-+
| localhost | root | unix_socket |
---

Regards,
Karthick
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Time Zone help

2017-06-07 Thread Karthick Subramanian
Hi Rhys,

I found no records for the query you have shared. I tried to update tzdata
using yum update tzdata and reload the time zones tables and restart the db
server. Still no effect.

I think this time_zone_name doesn't store day light abbreviation (Ex: EDT,
CDT etc). But storing EST, CST etc.

MariaDB [mysql]> select * from time_zone_name where length(name) = 3;
+--+--+
| Name | Time_zone_id |
+--+--+
| CET  |  371 |
| EET  |  385 |
| EST  |  386 |
| GMT  |  490 |
| HST  |  495 |
| MET  |  515 |
| MST  |  516 |
| PRC  |  524 |
| ROC  |  571 |
| ROK  |  572 |
| UCT  |  575 |
| UTC  |  589 |
| WET  |  592 |
+--+--+


Can anyone execute in your system and see you are successful:

On Wed, Jun 7, 2017 at 4:19 PM, <rhys.campb...@swisscom.com> wrote:

> What does this return?
>
>
>
> SELECT * FROM time_zone_name WHERE `name` = 'EDT';
>
>
>
> This is not present on my system on Red Hat Enterprise Linux Server
> release 6.8 (Santiago). You'll need to manually insert this data or get a
> updates TZ file I guess.
>
>
>
> Rhys
>
>
>
> *From:* Maria-discuss [mailto:maria-discuss-bounces+rhys.campbell=
> swisscom@lists.launchpad.net] *On Behalf Of *Karthick Subramanian
> *Sent:* 07 June 2017 11:09
> *To:* Maria Discuss <maria-discuss@lists.launchpad.net>
> *Subject:* [Maria-discuss] Time Zone help
>
>
>
> All,
>
>
>
> I am facing some strange issue, I believe its due to my ignorant, would
> appreciate if you can help me out on this:
>
>
>
> DB Server system OS CentOS.
>
>
>
> I have loaded the timezone tables in mysql using:
>
>
>
> mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
>
> After loading, I have restrated the DB using systemctl restart mariadb:
>
>
>
> Then I have tried below in DB:
>
>
>
> select @@global.time_zone,@@system_time_zone;
>
>
>
> [image: Inline image 1]
>
>
>
> SELECT CONVERT_TZ( NOW(), @@global.time_zone , 'UTC' ), UTC_TIMESTAMP;
>
>
>
> [image: Inline image 3]
>
>
>
> SELECT CONVERT_TZ( NOW(), @@system_time_zone , 'UTC' ), UTC_TIMESTAMP;
>
>
>
> [image: Inline image 4]
>
>
>
> SELECT CONVERT_TZ( NOW(), 'EDT' , 'UTC' ), UTC_TIMESTAMP;
>
>
>
> [image: Inline image 2]
>
>
>
> For some reason, If I use named TZ in CONVERT_TZ function for FROM_TZ, its
> always showing NULL.
>
>
>
> Can anyone help me out what else i can do so I can pass the abbreviation
> or named TZ in FROM_TZ.
>
>
>
> Regards,
>
> Karthick
>
>
>
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] Time Zone help

2017-06-07 Thread Karthick Subramanian
All,

I am facing some strange issue, I believe its due to my ignorant, would
appreciate if you can help me out on this:

DB Server system OS CentOS.

I have loaded the timezone tables in mysql using:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

After loading, I have restrated the DB using systemctl restart mariadb:

Then I have tried below in DB:

select @@global.time_zone,@@system_time_zone;

[image: Inline image 1]

SELECT CONVERT_TZ( NOW(), @@global.time_zone , 'UTC' ), UTC_TIMESTAMP;

[image: Inline image 3]

SELECT CONVERT_TZ( NOW(), @@system_time_zone , 'UTC' ), UTC_TIMESTAMP;

[image: Inline image 4]

SELECT CONVERT_TZ( NOW(), 'EDT' , 'UTC' ), UTC_TIMESTAMP;

[image: Inline image 2]

For some reason, If I use named TZ in CONVERT_TZ function for FROM_TZ, its
always showing NULL.

Can anyone help me out what else i can do so I can pass the abbreviation or
named TZ in FROM_TZ.

Regards,
Karthick
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Ubuntu 16.04, Accidentally installed mariadb-server on top of mysql-server

2017-05-27 Thread Karthick Subramanian
If you currently log into Maria DB, execute *show variables like '%dir%'; *and
it ll show you a different value than your existing mysql's data dir.

In your MySQL conf file (usually server.conf in rhel for me), mention the
data dir as your old MySQL data dir (your dozen dbs location). Then restart
your mariadb, then you should able to see your dbs.


On May 28, 2017 3:21 AM,  wrote:

> Here is an update:  In /var/lib/ ,  I have these four directories:
>
> mysql
> mysql-5.7
> mysql-files
> mysql-keyring
>
> In the mysql-5.7 directory, I have found what appears to be my dozen or so
> databases that I created.  So yes, my data appears it was retained.  I have
> tarballed the data and am uploading it to an external device.  In the
> meantime, I am next working on bringing my data back in a way where an SQL
> server can see it.
>
> It doesn't even have to be a robust, long-term solution.  I was intending
> on switching it over on Monday.  I don't really care if it only sort of
> works, I just need to extract the data as an SQL file and go from there.
>
> Thanks,
>
> Rich
>
> On 5/27/2017 at 4:26 PM, rich.gre...@hushmail.com wrote:
> >
> >Hello,
> >
> >Guys, I did a bad one.  I only had one server remaining that still
> >had mysql installed and thinking I was logged into my laptop's
> >console, I executed apt-get install mariadb-server.
> >
> >I wasn't on my laptop.  I was logged into a virtual hosting server
> >and knocked eight sites offline including my wiki of all my HOWTO
> >documents ironically, describing how to install mariadb-server on
> >various platforms.
> >
> >I didn't notice anything was amiss until I saw a comment that it
> >was uninstalling mysql (which I knew wasn't on my laptop)
> >
> >I was able to log in using my old root password, but all my
> >databases were gone.
> >
> >Is there any hope for recovering the databases as they were
> >earlier today?
> >
> >Rich
> >
> >
> >___
> >Mailing list: https://launchpad.net/~maria-discuss
> >Post to : maria-discuss@lists.launchpad.net
> >Unsubscribe : https://launchpad.net/~maria-discuss
> >More help   : https://help.launchpad.net/ListHelp
>
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Partition a Huge table

2017-03-14 Thread Karthick Subramanian
Hi Suresh,


   - If the DML activities are not on the historical data (hot dataset and
   cold dataset), then shall we create a empty partitioned table and start
   populating the historical datasets into this new partitioned table using
   LOAD DATA INFILE method. {*Preferably we can do this activity in Slave
   DB. Even we can do this activity in master if we can exclude this new db
   from replication (created for partition purposes**)*}. So this will go
   in-parallel until we reach the hot dataset, that we can do one shot during
   any planned downtime. I believe this won't take much time as compared to
   your initial estimation of 24+ hours or so because we are doing the phase
   by phase data migration.


Can you also check this out:
https://mariadb.com/kb/en/mariadb/parallel-replication/#out-of-order-parallel-replication

You can consider running the partition creation in a separate replication
domain id so that this long running operation won't hinder the other
replication activities.

Ex:

SET SESSION gtid_domain_id=1 ALTER TABLE t ADD PARITION... SET SESSION
gtid_domain_id=0

"Normally, a long-running ALTER TABLE or other query will stall all
> following transactions, causing the slave to become behind the master as
> least as long time as it takes to run the long-running query. By using
> out-of-order parallel replication by setting the replication domain id,
> this can be avoided. The DBA/application must ensure that no conflicting
> transactions will be replicated while the ALTER TABLE runs."


Also I would like to understand your below statement:

> How safe its to alter table on slave and promote slave as master?

How do you take care of the data changes that's happening in this table in
master while you undergo these schema changes in slave (that you mentioned
will take 24 hours or so).

On Tue, Mar 14, 2017 at 10:38 AM, Suresh Rajagopal 
wrote:

> i have to modify primary for partitioning. pt-online-schema-change
> complaints about dropping primary.Still i can ignore the warning and
> proceed.
>
> Thanks
>
>
> --
> *From:* Guillaume Lefranc 
> *To:* Suresh Rajagopal ; Maria Discuss <
> maria-discuss@lists.launchpad.net>
> *Sent:* Monday, March 13, 2017 6:08 PM
> *Subject:* Re: [Maria-discuss] Partition a Huge table
>
> Use pt-online-schema-change.
>
> Best regards
> GL
>
> Le mar. 14 mars 2017 à 08:35, Suresh Rajagopal  a
> écrit :
>
> Hi,
>
> What is the fastest approach to partition a huge table with 2 additional
> columns? How safe its to alter table on slave and promote slave as master?
> It takes 25 hours to alter the table for now on slave.
>
> MariaDB Version : 10.1.18
> OS  : Centos 6
>
> Thanks
> Suresh
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Maria db read/write configuration issues

2017-03-09 Thread Karthick Subramanian
Follow these below 3 links (especially 3rd link):

https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Tutorials/MySQL-Replication-Read-Write-Splitting-Tutorial.md

https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Routers/ReadWriteSplit.md

https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Getting-Started/Configuration-Guide.md

there is some weightby clause that you can use to control the read write
split. Above 3 links will provide some idea on what you need to achieve,

On Thu, Mar 9, 2017 at 3:36 PM, Chaitanya Cheekate <
chaitanya.cheek...@vidyayug.com> wrote:

>
> Hi
>
> We have configured maxscale in our environment using the links http://
> karlssonondatabases.blogspot.in/2014/02/maxscale-for-rest-
> of-us-part-1.html, 2, 3 . We have two slaves and one master and the
> replication between them is working well. But after configuring read/write
> split the select queries are being executed in master itself, not routing
> to the slaves. Please find the attached documents of maxscale
> configuration, maxscale commands maxscale log and. Please help with
> maxscale read/write split.
> Attached documentsdetails
> 1. maxsconf.txt from the location /etc/maxscale.cnf
> 2. maxscale-commands.txt, coomands like maxadmin -pmariadb list
> servers, maxadmin -pmariadb list services, maxadmin -pmariadb show service
> "Splitter Service",
> 3. maxscale-log.txt from /var/log/maxscale
>
> Thanks
> Chaitu
>
>
> --
> Thanks.
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] MariaDB 10.0.30 now available

2017-03-08 Thread Karthick Subramanian
Thank you for the details. I understood now why we have multiple GA releases 
with different versions. My initial impression was - I need to use the GA 
release of higher version when it's available. 

Also in Mariadb customer portal dashboard, "download MariaDB" always shows 
latest higher version GA when I choose my OS version. So I thought that's the 
superior version available for production environment. Also my YUM update 
automatically choose the higher GA version of MariaDB from MariaDB enterprise 
repo. 

Thank you again for the details. 

> On Mar 9, 2017, at 12:43 AM, Reindl Harald <h.rei...@thelounge.net> wrote:
> 
> 
> 
>> Am 08.03.2017 um 19:44 schrieb Karthick Subramanian:
>> Sorry if this question seems silly:
>> 
>> Why we need to use 10.0.30 when we already have 10.1. Series with GA.
> 
> because 10.x is still supported and the whole world don't jump and fire out 
> the next major version of every piece of software and hope all is fine?
> 
> why do we need that many linux kernels with critical bugfixes when we have 
> 4.10.1?
> 
> https://www.kernel.org/
> 
>> Why don't we upgrade from 10.0 series to 10.1 GA series. Is there anything 
>> that fixed in 10.0.30 which yet to fix in 10.1.21 GA. Thank you for helping 
>> me to understand these different version series.
> 
> because nobody right in his mind blows out the next shiny major version 
> before tests? because that's the reason major/minor/revision exists at all
> 
> because LTS distributions exists for a good reason which means you won't see 
> anything but MAriaDB 5.5x ever on RHEL7
> 
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Change to innodb_large_prefix with respect to creating long indexes

2017-03-07 Thread Karthick Subramanian
Hi,

I come across similar situation today:

server version: 10.1.21-MariaDB
character_set_database   | utf8
character_set_filesystem | binary


Initially when I tried to create Unique Index on below columns, I got error
as max key length 762 bytes error:

col_1 varchar(500)
col_2 varchar(250)
col_3 varchar(5)

So I have changed the innodb_large_prefix=ON and innodb_file_format from
Antelop to Baracuda.

Even after changing to above settings, Still I am getting 762 bytes
limitation error. Even I tried to recreate the table with different name to
make sure the settings will apply to new tables, but still get the error.
So not sure what's really going on.

So I tried to change the col_1 datatype varchar(500) to varchar(250), its
successfully created. I thought the length calc will be on total keys (i.e.
3 column added together), but it doesn't seem to be.

Any thought on this,please.


On Tue, Mar 7, 2017 at 1:41 PM, Ian Gilfillan  wrote:

> On 07/03/2017 04:00, Marco Nicosia wrote:
>
>>
>> We noticed a change between MariaDB 10.1.18 and 10.1.20, but I haven't
>> been able to find anything in the changelogs or JIRA that would help me
>> understand what changed, and why.
>>
>> On 10.1.18, if I set `innodb_large_prefix=OFF` I can create indexes with
>> lengths greater than 767 bytes and MariaDB only issues a warning. If I
>> configure `innodb_large_prefix=ON` I get an error and the index fails to
>> create. This seems like a bug?
>>
>> On 10.1.20, mysql fails to create the index regardless of how
>> innodb_large_prefix is configured.
>>
>> We think that the result is that in 10.1.20, tables must be created or
>> altered to use `ROW_FORMAT DYNAMIC` or `ROW_FORMAT COMPRESSED` if they are
>> to contain an index with greater than 767 bytes in it.
>>
>> Is this the desired behavior? Was there a bug in 10.1.18 (and maybe
>> previous)?
>>
>> I'm trying to understand the context better so that when devs ask us why
>> index creation is failing, we give them the correct answer for why it used
>> to work, and what they should be doing differently now that we're on
>> 10.1.20.
>>
>>
>>
> I wonder if it's related to this commit, from 10.1.19:
> https://github.com/MariaDB/server/commit/d451d77
>
> I can't recreate the behaviour you mention from 10.1.18, but yes, it does
> seems like a bug, as the only way I'm aware of that indexes greater than
> 767 can be created is with innodb_large_prefix and its related
> requirements. Can you share your settings/statements that permitted this?
>
>
>
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Replication-manager + Maxscale

2017-03-02 Thread Karthick Subramanian
Hi Stephane,

Once I have tested my settings, I am planning to use it in production
version. That's why I thought of using GA release(
https://github.com/tanji/replication-manager/releases/tag/1.0.0).

But please send me for the below details, So I will test my settings:

OS : CentOS 7
Maria DB : 10.1.17
Maxscale : 2:0

Hi Guillaume,

Thank you for your input. In order to make MRM independent from Maxscale, I
don't need to configure to execute as script via mysql Monitor section of
maxscale for event=master_down?

Also can you share me some documentation to understand this better, I am
little bit new to this technology and facing little challenge
to understand these below:

Also I am planning to use pcs-corosync to make maxscale(Active-standby) HA.

Source: https://github.com/tanji/replication-manager/blob/develop/README.md


>- With monitor-less proxies, replication-manager can call scripts that
>set and reload the new configuration of the leader route. A common scenario
>is an VRRP Active Passive HAProxy sharing configuration via a network
>disk with thereplication-manager scripts
>
>
>- Using replication-manager as an API component of a group
>communication cluster. MRM can be called as a Pacemaker resource that moves
>alongside a VIP, the monitoring of the cluster is in this case already in
>charge of the GCC.
>
>
On Thu, Mar 2, 2017 at 10:02 PM, Stephane Varoqui <steph...@mariadb.com>
wrote:

> Hi Karthick,
>
>
> Please also use the upcoming release 1.1 with is the current dev release
> on github
> This is the best way to make this setup running
> I ‘ll send you a package
> if you tell me for what os ?
>
>
> /stephane
>
> Stéphane Varoqui, Senior Consultant
> Phone: +33 695-926-401, skype: svaroqui
> http://www.mariadb.com
>
>
>
>
> Le 2 mars 2017 à 17:26, Guillaume Lefranc <guilla...@adishatz.net> a
> écrit :
>
> Hi Karthick,
>
> (disclaimer: I am one of the authors of Replication Manager for MariaDB)
>
> you seem to be using outdated instructions. Please grab the 1.0.2 release
> for your distribution there:
> https://github.com/tanji/replication-manager/releases
>
> Replication Manager works best when used independently from MaxScale.
> Please read our documentation at https://github.com/tanji/
> replication-manager/blob/develop/README.md and let me know if you have
> any questions.
>
> Best
> Guillaume
>
> Le ven. 3 mars 2017 à 00:05, Karthick Subramanian <
> ksubraman...@paycommerce.com> a écrit :
>
>> Hi Experts,
>>
>> I have a 2 db server with one as master and another one as slave.
>>
>> Maxscale implemented with below monitor config:
>>
>> *[MySQL Monitor]*
>> *type=monitor*
>> *module=mysqlmon*
>> *servers=master1,slave1*
>> *monitor_interval=500*
>> *script=/usr/bin/replication-manager --user root:password --rpluser
>> replusr:password *
>> *--hosts $INITIATOR,$NODELIST --failover=force --interactive=false*
>> *events=master_down*
>>
>> When I shutdown master, failover is not automated. MRM (Replication
>> Manager) is not promoting the slave to master automatically.
>>
>> In maxscale log, I noticed below:
>>
>> *2017-03-02 03:33:36   notice : Executed monitor script
>> '/usr/bin/replication-manager --user root:password --rpluser
>> replusr:password --hosts $INITIATOR,$NODELIST --failover=force
>> --interactive=false' on event 'master_down'.*
>> *2017-03-02 03:33:36   error  : No Master can be determined.*
>>
>> Is this because I didn't have the quorum (no slave) since its one master
>> and one slave set-up. Is there any workaround.
>>
>> Regards,
>> Kart
>>
>> ___
>> Mailing list: https://launchpad.net/~maria-discuss
>> Post to : maria-discuss@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~maria-discuss
>> More help   : https://help.launchpad.net/ListHelp
>>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] Replication-manager + Maxscale

2017-03-02 Thread Karthick Subramanian
Hi Experts,

I have a 2 db server with one as master and another one as slave.

Maxscale implemented with below monitor config:

*[MySQL Monitor]*
*type=monitor*
*module=mysqlmon*
*servers=master1,slave1*
*monitor_interval=500*
*script=/usr/bin/replication-manager --user root:password --rpluser
replusr:password *
*--hosts $INITIATOR,$NODELIST --failover=force --interactive=false*
*events=master_down*

When I shutdown master, failover is not automated. MRM (Replication
Manager) is not promoting the slave to master automatically.

In maxscale log, I noticed below:

*2017-03-02 03:33:36   notice : Executed monitor script
'/usr/bin/replication-manager --user root:password --rpluser
replusr:password --hosts $INITIATOR,$NODELIST --failover=force
--interactive=false' on event 'master_down'.*
*2017-03-02 03:33:36   error  : No Master can be determined.*

Is this because I didn't have the quorum (no slave) since its one master
and one slave set-up. Is there any workaround.

Regards,
Kart
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] timestamp with time zone support mariaDB 10.1.14

2017-02-23 Thread Karthick Subramanian
Thank you Brian and Sergei.

Actually I have read that disclaimer on the top. But still I don't want to
believe that time zone support is not available in our Maria DB. I am
trying to convince myself the reality now.

Thank you all for your prompt response.


On Thu, Feb 23, 2017 at 8:11 PM, Brian Evans <grkni...@scent-team.com>
wrote:

> On 2/23/2017 9:11 AM, Karthick Subramanian wrote:
>
> Hi Experts,
>
> I got this error, not sure whether maria db supports time zone:
>
> MariaDB [devdb]> create table ts (dt datetime, tz timestamp with time zone
> );
> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
> that corresponds to your MariaDB server version for the right syntax to use
> near 'time zone)' at line 1
>
> My application team is looking for time zone support. Any thought please.
>
>
> TIMESTAMP columns are limited to the valid UNIX timestamps (and subject to
> the year 2038 problem) but adjust to the time_zone variable (global or
> session) automatically.
> DATETIME can store much more but you will need to store/retrieve
> consistent values with functions like CONVERT_TZ.
>
> By the way.. the SQL 99 is a copy of a book and not necessarily
> implemented in MariaDB.
> Please follow the documentation listed at https://mariadb.com/kb/en/
> mariadb/documentation/ for what is existing in MariaDB.
>
> Brian
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] timestamp with time zone support mariaDB 10.1.14

2017-02-23 Thread Karthick Subramanian
Hi Experts,

I got this error, not sure whether maria db supports time zone:

MariaDB [devdb]> create table ts (dt datetime, tz timestamp with time zone);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MariaDB server version for the right syntax to use
near 'time zone)' at line 1

My application team is looking for time zone support. Any thought please.

reference:

https://mariadb.com/kb/en/sql-99/temporal-data-types/#time-with-time-zone
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] mysqldump 10.1.16

2017-02-15 Thread Karthick Subramanian
Thank you Daniel for your information. This is awesome.

BTW, the script that you have mentioned "maria_add_gis_sp.sql" - where can
I get this.
How do we come to know in future for any fixes from MariaDB corp. Thank
you.

On Thu, Feb 16, 2017 at 9:39 AM, Daniel Black <daniel.bl...@au1.ibm.com>
wrote:

>
>
> On 15/02/17 19:02, Karthick Subramanian wrote:
> > All,
> >
> > I got a replciation problem and planned to take master server dump using
> > below command and tried to restore in slave server:
> >
> > mysqldump --skip-lock-tables --single-transaction --flush-logs
> > --hex-blob --master-data=1 -A --routines > ~/dump.sql
> >
> > I got into this error:
> > https://jira.mariadb.org/browse/MDEV-10119
> >
> > Then I tried this method:
> > http://lists.askmonty.org/pipermail/commits/2016-June/009504.html
> >
> > My question:
> >
> > Is it ok if the GIS procedure currently with definer as
> > definer=`root@localhost`
>
> yes. This is the proper state for the procedure.
>
> > instead of blank as definer=`` for the
>
> This is incorrect. Fix your Master_MariaDB. Drop the procedure and
> create again as per maria_add_gis_sp.sql
>
> > following two procs in mysql:
> >
>
> Use SHOW CREATE PROCEDURE mysql.AddGeometryColumn\G
>
> https://mariadb.com/kb/en/mariadb/show-create-procedure/
>
> to show information rather than selecting from the underlying tables.
>
> > Slave_MariaDB [(none)]> select db, name, definer from mysql.proc;
> > +-++-+
> > | db  | name   | definer |
> > +-++-+
> > | mysql   | AddGeometryColumn  | root@localhost  |
> > | mysql   | DropGeometryColumn | root@localhost  |
> >
> >
> > Master_MariaDB [(none)]> select db, name, definer from mysql.proc;
> > +-++-+
> > | db  | name   | definer |
> > +-++-+
> > | mysql   | AddGeometryColumn  | @   |
> > | mysql   | DropGeometryColumn | @   |
>
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] LOAD DATA LOCAL INFILE

2017-02-15 Thread Karthick Subramanian
Thank you Andrew.

I think I shouldn't think too much.

I don't know why I didn't think of setting this GLOBAL and reset back once
my load done.

This is actually works: SET GLOBAL local_infile = on

I dd lot of unwanted mess-up in the system by modifying the SELinux context
for the file to mysqldb_t etc. I think I have wasted lot of time instead of
asking forum upfront. Anyway, lot of learnings.

Thank you Andrew and Peter for your insights.



On Wed, Feb 15, 2017 at 7:57 PM, Andrew Garner <muza...@gmail.com> wrote:

> local-infile is both a client and a server flag - both must be enabled
> or you'll get an error.  mysql --local-infile=1 only enables the
> client support for this feature. Your MariaDB server likely has this
> disabled - perhaps as a security concern.
>
> I would inspect your my.cnf and update the value if you need this
> feature.   If you have sufficient privileges, you can enable this
> dynamically by running:
>
> mysql -e "SET GLOBAL local_infile = on"
>
> ~Andrew
>
> On Wed, Feb 15, 2017 at 8:05 AM, Karthick Subramanian
> <ksubraman...@paycommerce.com> wrote:
> > Typo:
> >
> > mysql -u root --local-infile=1
> >
> > I missed the double dashes (--). When you try with --, it will accept,
> but
> > as you said it doesn't have any effect on session level.
> >
> > I remember I did local infile successfully some 3 months back, but now
> its
> > not working. Not sure what version I used 3 months back. But currently
> its
> > 10.1.16.
> >
> >
> > On Wed, Feb 15, 2017 at 7:26 PM, Peter Laursen <peter_laur...@webyog.com
> >
> > wrote:
> >>
> >> According to
> >> https://dev.mysql.com/doc/refman/5.7/en/server-system-
> variables.html#sysvar_local_infile
> >> this variable has GLOBAL scope (and I don-t think mariaDB has changed
> >> anything here. The  SESSION-scope value is always inherited from the
> GLOBAL
> >> setting.
> >>
> >> 'local-infile' is also considered a security setting and as such it
> makes
> >> sense IMO that a user cannot change for his SESSION as she likes.
> >>
> >> Also I get this (on Windows)
> >>
> >> C:\Program Files\MariaDB 10.2\bin>mysql -u root -p local-infile=1
> >> Enter password: 
> >> ERROR 1049 (42000): Unknown database 'local-infile=1'
> >>
> >> Is it possible to specify a server variable on the commandline at all? I
> >> don't think so. At least I never heard about it.
> >>
> >> -- Peter
> >> -- Webyog
> >>
> >> On Wed, Feb 15, 2017 at 2:43 PM, Karthick Subramanian
> >> <ksubraman...@paycommerce.com> wrote:
> >>>
> >>> HI All,
> >>>
> >>> Even after enabling --local-infile=1 at mysql user login, I couldn't
> load
> >>> the file locally.
> >>>
> >>> mysql -u root --local-infile=1
> >>>
> >>> LOAD DATA LOCAL INFILE
> >>>
> >>> ERROR 1148 (42000): The used command is not allowed with this MariaDB
> >>> version
> >>>
> >>> show variables like '%local%';
> >>> +---+---+
> >>> | Variable_name | Value |
> >>> +---+---+
> >>> | local_infile  | OFF   |
> >>> +---+---+
> >>>
> >>> Even though i enable --local-infile=1, the local-infile still shows
> OFF.
> >>>
> >>> Pleaselet know how can I fix this.
> >>>
> >>>
> >>> ___
> >>> Mailing list: https://launchpad.net/~maria-discuss
> >>> Post to : maria-discuss@lists.launchpad.net
> >>> Unsubscribe : https://launchpad.net/~maria-discuss
> >>> More help   : https://help.launchpad.net/ListHelp
> >>>
> >>
> >
> >
> > ___
> > Mailing list: https://launchpad.net/~maria-discuss
> > Post to : maria-discuss@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~maria-discuss
> > More help   : https://help.launchpad.net/ListHelp
> >
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] LOAD DATA LOCAL INFILE

2017-02-15 Thread Karthick Subramanian
Typo:

mysql -u root --local-infile=1

I missed the double dashes (--). When you try with --, it will accept, but
as you said it doesn't have any effect on session level.

I remember I did local infile successfully some 3 months back, but now its
not working. Not sure what version I used 3 months back. But currently its
10.1.16.


On Wed, Feb 15, 2017 at 7:26 PM, Peter Laursen <peter_laur...@webyog.com>
wrote:

> According to https://dev.mysql.com/doc/refman/5.7/en/server-system-
> variables.html#sysvar_local_infile this variable has GLOBAL scope (and I
> don-t think mariaDB has changed anything here. The  SESSION-scope value is
> always inherited from the GLOBAL setting.
>
> 'local-infile' is also considered a security setting and as such it makes
> sense IMO that a user cannot change for his SESSION as she likes.
>
> Also I get this (on Windows)
>
> C:\Program Files\MariaDB 10.2\bin>mysql -u root -p local-infile=1
> Enter password: 
> ERROR 1049 (42000): Unknown database 'local-infile=1'
>
> Is it possible to specify a server variable on the commandline at all? I
> don't think so. At least I never heard about it.
>
> -- Peter
> -- Webyog
>
> On Wed, Feb 15, 2017 at 2:43 PM, Karthick Subramanian <
> ksubraman...@paycommerce.com> wrote:
>
>> HI All,
>>
>> Even after enabling --local-infile=1 at mysql user login, I couldn't load
>> the file locally.
>>
>> mysql -u root --local-infile=1
>>
>> LOAD DATA LOCAL INFILE
>>
>> ERROR 1148 (42000): The used command is not allowed with this MariaDB
>> version
>>
>> show variables like '%local%';
>> +---+---+
>> | Variable_name | Value |
>> +---+---+
>> | local_infile  | OFF   |
>> +---+---+
>>
>> Even though i enable --local-infile=1, the local-infile still shows OFF.
>>
>> Pleaselet know how can I fix this.
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~maria-discuss
>> Post to : maria-discuss@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~maria-discuss
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] ROLE and DEFAULT DATABASE

2017-02-09 Thread Karthick Subramanian
Hi,

Can anyone assist me on this below:

I have a database called appdb. I need to grant access to this db to
different users say: api_user, app_user, portal_user.

So I created a ROLE as APP_ROLE and GRANT as below:

GRANT SELECT, INSERT, UPDATE, DELETE ON APPDB.* TO APP_ROLE;

Later I assign the Role to user:

GRANT APP_ROLE TO API_USER@'%' IDENTIFIED BY 'YOU';

SET DEFAULT ROLE APP_ROLE TO API_USER@'%';

But the problem now is:

Application team want to choose the database when they establish
connection. But they couldn't use APPDB.

So they couldn't see  any db objects listed in APPDB. Is there a way we can
assign a default database also for user.
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] .Net + Entity Framework

2016-10-25 Thread Karthick Subramanian
Hi,

Anyone in this distribution mail list who actually uses .Net + Entity
Framework with Maria DB in their production environment, could you please
mail me separately. Would like to check with you on few clarification.
Thank you for being a community and helping each others.

Regards,
Karthick

On Wed, Oct 26, 2016 at 12:00 AM, Karthick Subramanian <
ksubraman...@paycommerce.com> wrote:

> All,
>
> Currently we are using below:
>
> .Net framework 4
> Entity Framework
> ODP .Net to Oracle DB
>
> New environment:
>
> .Net framework 4
> Entity Framework
> MariaDB 10.1.16
>
> We would like to know on how can we connect MariaDB for the above said
> framework .Net + Entity Framework. We are trying to find some sources
> online but couldn't figure it out. Can anyone share me on how can we
> establish connection between .Net Entity Framework to MariaDb and what
> connector we need to use and any sample code on how we connect. Your help
> will be highly appreciated.
>
> Regards,
> Karthick
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] .Net + Entity Framework

2016-10-25 Thread Karthick Subramanian
Hi GL,

Thanks for your assistance.

I am wondering whether this can be officially supported by Maria DB support
for enterprise customers in case if we face any issues wrt .net connector
(Ex: performance issues or similar) to connect to Maria DB.

On Wed, Oct 26, 2016 at 12:35 AM, Guillaume Lefranc <
guillaume.lefr...@mariadb.com> wrote:

> You may use the MySQL Connector/NET, there is plenty of documentation for
> it online.
> e.g. https://dev.mysql.com/doc/connector-net/en/
>
> GL
>
> On Tue, Oct 25, 2016 at 8:35 PM Karthick Subramanian <
> ksubraman...@paycommerce.com> wrote:
>
> All,
>
> Currently we are using below:
>
> .Net framework 4
> Entity Framework
> ODP .Net to Oracle DB
>
> New environment:
>
> .Net framework 4
> Entity Framework
> MariaDB 10.1.16
>
> We would like to know on how can we connect MariaDB for the above said
> framework .Net + Entity Framework. We are trying to find some sources
> online but couldn't figure it out. Can anyone share me on how can we
> establish connection between .Net Entity Framework to MariaDb and what
> connector we need to use and any sample code on how we connect. Your help
> will be highly appreciated.
>
> Regards,
> Karthick
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
> --
> Guillaume Lefranc
> Remote DBA Services Manager
> MariaDB Corporation
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Reg replication and commit

2016-10-14 Thread Karthick Subramanian
I didn't expect that autocommit = OFF will affect the replication feature.
I thought replication will be handled irrespective what commit type is
enabled in the DB Server.

So whenever I promote any new master from a slave, I have to taken care
this auto commit accordingly. Is my understanding correct?

Without mentioning in my.cnf file, is there a way we can handle this
behavior during start of the server, like mysqld --auto-commit=ON/OFF.
Thank you.

On Fri, Oct 14, 2016 at 5:11 PM, Karthick Subramanian <
ksubraman...@paycommerce.com> wrote:

> Hi All,
>
> I have the below topology:
>
> Master -> Slave (using GTID replication)
>
> Master -> Maxscale (Binlog Router)
>
> Maxscale -> DR Site (via binlog router)
>
>
> my.cnf is same across all sites:
>
> lower-case-table-names=1
> autocommit=0
>
> #replication variables
> log-bin=binlog
> binlog-format=ROW
> replicate_annotate_row_events=OFF
> binlog_annotate_row_events=OFF
>
>
> I have created a table and I could see on slave DB as well as at DR Site
> DB.
> When I INSERT records, this is not shown up in Slave DB as well DR Site
> DB. I have checked replication status and both are sync with master server
> binlog pos.
>
> But the rows reflected in slave and DR site DB only when we COMMIT on both
> Slave as well DR site DB.
>
> Below when I try at Slave DB:
>
> MariaDB [dr_repl]> select * from test_dr_repl;
> Empty set (0.00 sec)
>
> MariaDB [dr_repl]> commit;
> Query OK, 0 rows affected (0.00 sec)
>
> MariaDB [dr_repl]> select * from test_dr_repl;
> ++--+
> | id | val  |
> ++--+
> |  1 |1 |
> |  2 |2 |
> |  3 |3 |
> ++--+
> 3 rows in set (0.00 sec)
>
> I am wondering whether I did any weird mistake. Could anyone please help
> me to understand and a solution for this.
>
> Regards,
> Karthick
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] Reg replication and commit

2016-10-14 Thread Karthick Subramanian
Hi All,

I have the below topology:

Master -> Slave (using GTID replication)

Master -> Maxscale (Binlog Router)

Maxscale -> DR Site (via binlog router)


my.cnf is same across all sites:

lower-case-table-names=1
autocommit=0

#replication variables
log-bin=binlog
binlog-format=ROW
replicate_annotate_row_events=OFF
binlog_annotate_row_events=OFF


I have created a table and I could see on slave DB as well as at DR Site
DB.
When I INSERT records, this is not shown up in Slave DB as well DR Site DB.
I have checked replication status and both are sync with master server
binlog pos.

But the rows reflected in slave and DR site DB only when we COMMIT on both
Slave as well DR site DB.

Below when I try at Slave DB:

MariaDB [dr_repl]> select * from test_dr_repl;
Empty set (0.00 sec)

MariaDB [dr_repl]> commit;
Query OK, 0 rows affected (0.00 sec)

MariaDB [dr_repl]> select * from test_dr_repl;
++--+
| id | val  |
++--+
|  1 |1 |
|  2 |2 |
|  3 |3 |
++--+
3 rows in set (0.00 sec)

I am wondering whether I did any weird mistake. Could anyone please help me
to understand and a solution for this.

Regards,
Karthick
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] sharding with mariadb?

2016-10-05 Thread Karthick Subramanian
Hi,

Not sure, whether this sharding you are looking for or more complicated
one, below is simple sharding example:

https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-14/maxscale-simple-sharding-with-two-servers/

On Thu, Oct 6, 2016 at 1:06 AM, l vic <lvic4...@gmail.com> wrote:

> Isn't Maxscale a loadbalancer? Failed to see how you'd use it for db
> sharding.
>
> On Wed, Oct 5, 2016 at 3:19 PM, Karthick Subramanian <
> ksubraman...@paycommerce.com> wrote:
>
>> Instead of using Vitess, can't we use maxscale?
>>
>> Can anyone provide me comparision of Vitess Vs Maxscale. Thank you.
>>
>> On Wed, Oct 5, 2016 at 11:21 PM, l vic <lvic4...@gmail.com> wrote:
>>
>>> I wonder how to use sharding with symmetric replication... Does that
>>> mean I have to partition every database instance? Does it work with
>>> third-party tools, like Vitess (http://vitess.io/)?
>>> Thanks
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~maria-discuss
>>> Post to : maria-discuss@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~maria-discuss
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] sharding with mariadb?

2016-10-05 Thread Karthick Subramanian
Instead of using Vitess, can't we use maxscale?

Can anyone provide me comparision of Vitess Vs Maxscale. Thank you.

On Wed, Oct 5, 2016 at 11:21 PM, l vic  wrote:

> I wonder how to use sharding with symmetric replication... Does that mean
> I have to partition every database instance? Does it work with third-party
> tools, like Vitess (http://vitess.io/)?
> Thanks
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] Reg Maria DB + .Net Combination

2016-09-30 Thread Karthick Subramanian
All,

Can anyone share your experience or reference on below:


   1. Production system with Maria DB and .Net environment
   2. Transaction throughput, performance issues
   3. Any challenges in terms of connectors etc.

Thank you.

Regards,
Karthick
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Regarding ROLE

2016-09-29 Thread Karthick Subramanian
Kindly ignore this subject mail. Sorry for this. Its my mistake that I have
used wrong username to GRANT ROLE. Thank you.

On Thu, Sep 29, 2016 at 7:26 PM, Karthick Subramanian <
ksubraman...@paycommerce.com> wrote:

> All,
>
> When I GRANT ROLE to a USER, its throwing error:
>
> ERROR 1819 (HY000): Your password does not satisfy the current policy
> requirements
>
> +-+--+--
> --+
> | Level   | Code | Message
>|
> +-+--+--
> --+
> | Warning | 1819 | cracklib: it is WAY too short
>|
> | Error   | 1819 | Your password does not satisfy the current policy
> requirements |
> | Error   | 1961 | Cannot grant role 'developer' to: 'apiuser'@'some ip'.
>   |
> +-+--+--
> --+
>
> Can anyone guide me on how to tackle this? Thank you.
>
> Regards,
> Karthick
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] Regarding ROLE

2016-09-29 Thread Karthick Subramanian
All,

When I GRANT ROLE to a USER, its throwing error:

ERROR 1819 (HY000): Your password does not satisfy the current policy
requirements

+-+--++
| Level   | Code | Message
   |
+-+--++
| Warning | 1819 | cracklib: it is WAY too short
   |
| Error   | 1819 | Your password does not satisfy the current policy
requirements |
| Error   | 1961 | Cannot grant role 'developer' to: 'apiuser'@'some ip'.
|
+-+--++

Can anyone guide me on how to tackle this? Thank you.

Regards,
Karthick
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] Reg Audit Trail Implementation

2016-09-07 Thread Karthick Subramanian
All,

Before I reinvent a wheel again, thought of checking with you experts
whether any recommendation or suggestion for implementing audit trail
feature for your database. I am looking for any open source product/tool
for this purpose.

I thought of exploring audit plugin, but I am not sure whether we can
enable audit trail for the data changes in a tables. For example:

*ORDER table:*
ORDER_ID
PRODUCT_ID
QTY
ORDER_DATE
SHIP_DATE
DELIVERY_DATE
DELIVERY_ADDRESS

Any changes on the above table's data (rows), we need to capture the audit
trail like
TABLE_NAME,COLUMN_NAME,OLD_VALUE,NEW_VALUE,CHANGE_DATE,CHANGE_BY,HOST,APP,MODULE
etc.

Thank you,
Karthick
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] geo replication?

2016-08-23 Thread Karthick Subramanian
I am planning to try this out for our DR set-up:

Hope you can also achieve the same using below.

MaxScale for replication using binlogrouter option.

https://github.com/mariadb-corporation/MaxScale/blob/2.0/Documentation/Tutorials/Replication-Proxy-Binlog-Router-Tutorial.md



On Tue, Aug 23, 2016 at 4:52 PM, Reindl Harald 
wrote:

>
>
> Am 23.08.2016 um 13:17 schrieb l vic:
>
>> Is replication between different data  centers supported in MariaDB and
>> is it  supported in open source version, or in enterprise only?
>>
>
> why does MariaDB need to know anything about that?
>
> your slave can connect to the master or it can not, over WAN anyways a
> vpn-tunnel is highly recommened
>
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] Regarding Automatic fail-over - Maxscale

2016-08-16 Thread Karthick Subramanian
Hi All,

Can anyone help me to figure out this. I am planning to use Binlogrouter
for replication (single master and single slave topology). I read from
google forums for maxscale that with binlog router, it'snot possible to use
automatic failover. Did anyone try this.

>From google forum (
https://groups.google.com/forum/#!msg/maxscale/DnFT4eb0BbQ/cHQ3TLEfBAAJ;context-place=forum/maxscale
)
"With the 1.3.0 version of MaxScale, the binlogrouter accepts STOP SLAVE,
START SLAVE and CHANGE MASTER TO ... commands. These can be used to
change the master server but automating this process with the repmgr is
not currently possible. Since the binlogrouter supports the normal slave
management commands, using something like MHA could be possible:
https://code.google.com/p/mysql-master-ha/ "

Could anyone help me to understand whether I can use binlog router along
with automatic failover feature using maxscale. I have read this blog using
shell script we can achieve, but not sure whether with binlog router, it ll
work? (
https://mariadb.com/blog/mariadb-automatic-failover-maxscale-and-mariadb-replication-manager
)

Regards,
Karth
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Help on ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

2016-08-07 Thread Karthick Subramanian
Hi Sergei,

Thank you for your time on commenting on my question.

For others who may face this error in future and not yet find a solution
yet, below is the solution worked for me, its mostly due to SELINUX if you
are in Cent OS 7 or RHEL 7 or whatever version with SELINUX enabled:

-- if we get password policy not met error and error or warning says:

Warning message:

+-+--++
| Level   | Code | Message
   |
+-+--++
| Warning | 1819 | cracklib: error loading dictionary
  |
| Error   | 1819 | Your password does not satisfy the current policy
requirements |
+-+--++

Then this is due to SELinux issue. We have to set the context to grant
access to cracklib dir.
Description When using default settings cracklib tries to read the password
database from /usr/share/cracklib/. When using the standard SELINUX profile
mysqdl doesn't have access to that directory though.

You can use SHOW VARIABLES WHERE Variable_Name LIKE "%dir" to get the
cracklib dir name.

Workarounds:

* add additional access rules:
{code:bash}
semanage fcontext -a -t mysqld_etc_t "/usr/share/cracklib(/.*)?"
restorecon -Rv /usr/share/cracklib
{code}
* or copy cracklib dictionary to mysqld datadir and set
cracklib_password_check_dictionary accordingly

Thank you all for your time on helping me to resolve this.


On Sat, Aug 6, 2016 at 11:48 PM, Sergei Golubchik <s...@mariadb.org> wrote:

> Hi, Karthick!
>
> On Jul 03, Karthick Subramanian wrote:
> > Dear Experts,
> >
> > I almost tried all sort of combinations that I think of very difficult to
> > crack, but repeatedly failed to satisfy MariaDB not throw this error.
> >
> > Can anyone guide me on what is the specific needs for successful
> password.
> >
> > Warning message:
> >
> > +-+--+--
> --+
> > | Level   | Code | Message
>   |
> > +-+--+--
> --+
> > | Warning | 1819 | cracklib: error loading dictionary
>  |
> > | Error   | 1819 | Your password does not satisfy the current policy
> requirements |
> > +-+--+--
> --+
>
> Well, it says that in attempt to validate the password, cracklib has
> failed with an error message "error loading dictionary".
>
> May be the dictionary file is missing. May be it is corrupted.
> Use SHOW VARIABLES LIKE 'cracklib_password_check_dictionary' to see the
> location of the cracklib dictionary.
>
> Regards,
> Sergei
> Chief Architect MariaDB
> and secur...@mariadb.org
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] MariaDB Knowledge base - 500 error

2016-07-27 Thread Karthick Subramanian
Did anyone facing this 500 error while accessing the Maria DB Knowledge
Base. Thank you.

Don't know to whom we need to report this, so sending to this mail ID.
Sorry if it cause any inconvenient for others.

When we click the Support in MariaDb website, getting below error:

Database Error:


*There seems to be a problem connecting to the database server specified in
your configuration file. Please contact your local system administrator for
further assistance. *
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] New Question: InnoDB/XtraDB Configuration for optimum performance (MySQL 5.1 to MariaDB 10.1)

2016-07-21 Thread Karthick Subramanian
I am not sure about the specific needs. If its OLTP system (assumption made
based on - InnoDB usage), you can refer the below link:
http://www.tocker.ca/2013/09/17/what-to-tune-in-mysql-56-after-installation.html
Its specific to MySQL5.6, but I believe we can make sure its applicable
settings for MDB as well. Thank you.

On Thu, Jul 21, 2016 at 11:15 PM, AskMonty KB  wrote:

> Hello,
>
> A new question has been asked in "Moving to MariaDB" by rajeev_joshi_g.
> Please answer it at
> http://mariadb.com/kb/en/innodbxtradb-configuration-for-optimum-performance-mysql-51-to-mariadb-101/
> as the person asking the question may not be subscribed to the mailing list.
>
> 
> Hello, we were using MySQL 5.1 with MyISAM till now and now moving to
> MariaDB10.1. Instead of taking a Hop of MariaDB5.5, we will be removing
> MySQL after taking backup of data and then install MariaDB 10.1 & import
> the Data dump.
>
> We will also be changing our engine to InnoDB/XtrDB. May I know what are
> the configuration we need to take care of with regard to InnoDB/XTraDB for
> better/faster responses.
> 
>
> To view or answer this question please visit:
> http://mariadb.com/kb/en/innodbxtradb-configuration-for-optimum-performance-mysql-51-to-mariadb-101/
>
> ___
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Regarding DR site set-up

2016-07-05 Thread Karthick Subramanian
Hi Dipti,

We thought of keeping DR as simple as possible without MaxScale. When prod
data center is gone for some reason (total disaster which includes
application server as well as maxscale server because everything is from
that data center), DR will serve as a bare-minimum infrastructure for
business continuity.

So our current plan is:

- keep only one Maria DB server instance - (replicated as real-time from
production site to DR site)
- keep all the application servers pointing to this maria DB
- no max scale configuration at DR

All operation (including write) will be on this DR Site. We will sync-it up
later to the prod Db when its up. Please share your thought on this.

The reason we are not planning to use max scale at DR is - we are not going
to have any replication feature required in DR since its going to be a
single instance of maria db. All queries from app server will directly
connecting this maria DB without maxscale.

Regards,
Karthick

On Tue, Jul 5, 2016 at 7:56 PM, Dipti Joshi <dipti.jo...@mariadb.com> wrote:

> Karthick:
>
> Wanted to confirm what is your server configuration on  DR site ? Do you
> expect your write queries to continue on DR site  when production is down ?
>
> Regards,
> Dipti
>
> On Tue, Jul 5, 2016 at 8:16 AM, Dipti Joshi <dipti.jo...@mariadb.com>
> wrote:
>
>> Karthick,
>>
>> Also copying this conversation to maxsc...@googlegroups.com
>>
>> Based on your configuration, you should also setup your DR site similar
>> way as your product site, i.e. MaxScale in both locations.
>>
>> Regards,
>> Dipti
>>
>> On Tue, Jul 5, 2016 at 12:02 AM, Karthick Subramanian <
>> ksubraman...@paycommerce.com> wrote:
>>
>>> Dear Experts,
>>>
>>> I have a question on Max Scale requirement:
>>>
>>> In prod - we have two DB server as Primary(Master) and Secondary(Slave).
>>> Both being controlled via MaxScale.
>>>
>>> Do we need to really set it up similar way in DR site also? I meant - Do
>>> we need to keep Max Scale set it up in DR as well. Anyway, DR is going to
>>> be exceptional scenarios in which entire application servers also work out
>>> of DR site and we can still point all the app servers in DR site configured
>>> directly to access the Maria DB server at DR instead of Max Scale.
>>>
>>> Note: We are currently not using MaxScale for any complex needs, we are
>>> using MaxScale for normal routing like RW split etc.
>>>
>>> I know ideal is keep both Prod site and DR site equivalent. But as cost
>>> cutting on servers etc, shall we keep DR the way I mentioned. Could you
>>> please provide your opinion on this.
>>>
>>> Regards,
>>> Karthick
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~maria-discuss
>>> Post to : maria-discuss@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~maria-discuss
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] Help on ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

2016-07-03 Thread Karthick Subramanian
Dear Experts,

I almost tried all sort of combinations that I think of very difficult to
crack, but repeatedly failed to satisfy MariaDB not throw this error.

Can anyone guide me on what is the specific needs for successful password.

Warning message:

+-+--++
| Level   | Code | Message
   |
+-+--++
| Warning | 1819 | cracklib: error loading dictionary
  |
| Error   | 1819 | Your password does not satisfy the current policy
requirements |
+-+--++

Regards,
Karth
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] AUTO_COMMIT=0 for a session - READ inconsistencyi - ssue or no issue

2016-06-09 Thread Karthick Subramanian
Thank you so much. I never expected this much details on Transaction
Controls. I think lot of things need to be unlearned from Oracle. Lets see.

On Thu, Jun 9, 2016 at 4:23 PM, Peter Laursen <peter_laur...@webyog.com>
wrote:

> I think you should refer
> https://dev.mysql.com/doc/refman/5.7/en/set-transaction.html.
>
> It looks like your transaction isolation level is set to REPEATABLE_READ
> (what is also default in MySQL/MariaDB - unlike in Oracle for instance). If
> you want to see COMMITS from other sessions in your current transaction it
> should be READ_COMMITED instead.
>
>
> - Peter
> - Webyog
>
> On Thu, Jun 9, 2016 at 12:46 PM, Karthick Subramanian <
> ksubraman...@paycommerce.com> wrote:
>
>> Observation:
>>
>> If we set the AUTOCOMMIT=0 in a session, then in that session, I noticed
>> a data inconsistency. Whatever data committed in other sessions, when we
>> select in this session showing until we start any new transaction in this
>> session. The moement we sstart any new transaction in this session, then
>> its not showing any latest data for a table (data inserted by other
>> sessions) in this session, unless we explicitly issue the commit. Usually
>> AUTOCOMMIT=0 means any specific transactions in that session will be
>> visible to other sessions only when we explicitly issue a COMMIT, but we
>> can read a consistent data from that session. It doesn't seem to be
>> working.
>>
>> Is this my misunderstanding on how a Transaction management works or a
>> bug?
>>
>> Session 1:
>>
>> MariaDB [employees]> select * from tab;
>> Empty set (0.00 sec)
>>
>> MariaDB [employees]>   INSERT INTO tab
>> -> (c1, c2)
>> -> VALUES
>> -> ('a1', 'a11');
>> Query OK, 1 row affected, 1 warning (0.00 sec)
>>
>> MariaDB [employees]> select * from tab;
>> +--+--+
>> | c1   | c2   |
>> +--+--+
>> | a1   | a1   |
>> +--+--+
>> 1 row in set (0.00 sec)
>>
>> MariaDB [employees]>
>>
>> Session 2:
>>
>> MariaDB [employees]> select * from tab;
>> +--+--+
>> | c1   | c2   |
>> +--+--+
>> | a1   | a1   |
>> +--+--+
>> 1 row in set (0.00 sec)
>>
>> MariaDB [employees]>   INSERT INTO tab
>> -> (c1, c2)
>> -> VALUES
>> -> ('a2', 'a22');
>> Query OK, 1 row affected, 1 warning (0.01 sec)
>>
>> MariaDB [employees]> select * from tab;
>> +--+--+
>> | c1   | c2   |
>> +--+--+
>> | a1   | a1   |
>> | a2   | a2   |
>> +--+--+
>> 2 rows in set (0.00 sec)
>>
>> back to Session 1:
>>
>> MariaDB [employees]> select * from tab;
>> +--+--+
>> | c1   | c2   |
>> +--+--+
>> | a1   | a1   |
>> | a2   | a2   |
>> +--+--+
>> 2 rows in set (0.00 sec)
>>
>> Back to session 2:
>>
>> MariaDB [employees]> set auto_commit=0;
>> ERROR 1193 (HY000): Unknown system variable 'auto_commit'
>> MariaDB [employees]> set autocommit=0;
>> Query OK, 0 rows affected (0.00 sec)
>>
>> MariaDB [employees]>
>>
>> Move to Session 3:
>>
>> MariaDB [employees]> select * from tab;
>> +--+--+
>> | c1   | c2   |
>> +--+--+
>> | a1   | a1   |
>> | a2   | a2   |
>> +--+--+
>> 2 rows in set (0.00 sec)
>>
>> MariaDB [employees]>
>>
>> Move to session 1:
>>
>> MariaDB [employees]>   INSERT INTO tab
>> -> (c1, c2)
>> -> VALUES
>> -> ('a3', 'a33');
>> Query OK, 1 row affected, 1 warning (0.00 sec)
>>
>> MariaDB [employees]> select * from tab;
>> +--+--+
>> | c1   | c2   |
>> +--+--+
>> | a1   | a1   |
>> | a2   | a2   |
>> | a3   | a3   |
>> +--+--+
>> 3 rows in set (0.01 sec)
>>
>> Move to session 2:
>>
>> MariaDB [employees]> select * from tab;
>> +--+--+
>> | c1   | c2   |
>> +--+--+
>> | a1   | a1   |
>> | a2   | a2   |
>> | a3   | a3   |
>> +--+--+
>> 3 rows in set (0.00 sec)
>>
>> Move to Session 3:
>>
>> MariaDB [employees]> select * from tab;
>> +--+--+
>> | c1   | c2   |
>> +--+--+
>> | a1   | a1   |
>> | a2   | a2   |
>> | a3   | a3   |
>> +--+--+
>> 3 rows in set (0.00 sec)
>>
>> Across all 3 se

[Maria-discuss] AUTO_COMMIT=0 for a session - READ inconsistencyi - ssue or no issue

2016-06-09 Thread Karthick Subramanian
Observation:

If we set the AUTOCOMMIT=0 in a session, then in that session, I noticed a
data inconsistency. Whatever data committed in other sessions, when we
select in this session showing until we start any new transaction in this
session. The moement we sstart any new transaction in this session, then
its not showing any latest data for a table (data inserted by other
sessions) in this session, unless we explicitly issue the commit. Usually
AUTOCOMMIT=0 means any specific transactions in that session will be
visible to other sessions only when we explicitly issue a COMMIT, but we
can read a consistent data from that session. It doesn't seem to be
working.

Is this my misunderstanding on how a Transaction management works or a bug?

Session 1:

MariaDB [employees]> select * from tab;
Empty set (0.00 sec)

MariaDB [employees]>   INSERT INTO tab
-> (c1, c2)
-> VALUES
-> ('a1', 'a11');
Query OK, 1 row affected, 1 warning (0.00 sec)

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
+--+--+
1 row in set (0.00 sec)

MariaDB [employees]>

Session 2:

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
+--+--+
1 row in set (0.00 sec)

MariaDB [employees]>   INSERT INTO tab
-> (c1, c2)
-> VALUES
-> ('a2', 'a22');
Query OK, 1 row affected, 1 warning (0.01 sec)

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
| a2   | a2   |
+--+--+
2 rows in set (0.00 sec)

back to Session 1:

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
| a2   | a2   |
+--+--+
2 rows in set (0.00 sec)

Back to session 2:

MariaDB [employees]> set auto_commit=0;
ERROR 1193 (HY000): Unknown system variable 'auto_commit'
MariaDB [employees]> set autocommit=0;
Query OK, 0 rows affected (0.00 sec)

MariaDB [employees]>

Move to Session 3:

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
| a2   | a2   |
+--+--+
2 rows in set (0.00 sec)

MariaDB [employees]>

Move to session 1:

MariaDB [employees]>   INSERT INTO tab
-> (c1, c2)
-> VALUES
-> ('a3', 'a33');
Query OK, 1 row affected, 1 warning (0.00 sec)

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
| a2   | a2   |
| a3   | a3   |
+--+--+
3 rows in set (0.01 sec)

Move to session 2:

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
| a2   | a2   |
| a3   | a3   |
+--+--+
3 rows in set (0.00 sec)

Move to Session 3:

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
| a2   | a2   |
| a3   | a3   |
+--+--+
3 rows in set (0.00 sec)

Across all 3 sessions, the data is consistent.

Move to session 1:

MariaDB [employees]>   INSERT INTO tab
-> (c1, c2)
-> VALUES
-> ('a4', 'a44');
Query OK, 1 row affected, 1 warning (0.00 sec)

MariaDB [employees]>  select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
| a2   | a2   |
| a3   | a3   |
| a4   | a4   |
+--+--+
4 rows in set (0.00 sec)

Move to Session 2:

MariaDB [employees]>   INSERT INTO tab
-> (c1, c2)
-> VALUES
-> ('a5', 'a55');
Query OK, 1 row affected, 1 warning (0.01 sec)

MariaDB [employees]>   INSERT INTO tab
-> (c1, c2)
-> VALUES
-> ('a6', 'a66');
Query OK, 1 row affected, 1 warning (0.00 sec)

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
| a2   | a2   |
| a3   | a3   |
| a5   | a5   |
| a6   | a6   |
+--+--+
5 rows in set (0.00 sec)

a4 record is missing here in session 2 - inconsistency started.

move to session 3:

MariaDB [employees]> select * from tab;
+--+--+
| c1   | c2   |
+--+--+
| a1   | a1   |
| a2   | a2   |
| a3   | a3   |
| a4   | a4   |
+--+--+
4 rows in set (0.00 sec)

In Session 3 - a5 and a6 records are mising because in session 2 -
autocommit=0, so its expected that a5 and a6 are missing in session1,3.

BUT, why in session 2, the a4 record is missing?
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp