Hi guys, can someone help me with initializing a new MySQL cluster?

|
2021-01-03 08:13:11
piterden 2021-01-03 07:40:42
Also show last query you tried

— Table structure for table lend

CREATE TABLE lend (
id int(20) NOT NULL,
MemberID int(20) NOT NULL,
ISBN int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


— Dumping data for table lend

INSERT INTO lend (`id`, MemberID, `ISBN`) VALUES
(1, 1, 5556);

— ——————————————————–


— Table structure for table member

CREATE TABLE member (
id int(20) NOT NULL,
MemberID int(20) NOT NULL,
ISBN int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


— Dumping data for table member

INSERT INTO member (`id`, MemberID, `ISBN`) VALUES
(1, 1, 5557);


— Indexes for dumped tables


— Indexes for table lend

ALTER TABLE lend
ADD PRIMARY KEY (`id`);


— Indexes for table member

ALTER TABLE member
ADD PRIMARY KEY (`id`);


— AUTO_INCREMENT for dumped tables


— AUTO_INCREMENT for table lend

ALTER TABLE lend
MODIFY id int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;


— AUTO_INCREMENT for table member

ALTER TABLE member
MODIFY id int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT;

piterden 2021-01-03 08:15:25
Why do you need separated autoincrement definition?
piterden 2021-01-03 08:17:06
What is the difference between lend and member tables?
piterden 2021-01-03 08:20:23
So, if autoincrement was been set, then you shouldn’t define id column when inserting there
piterden 2021-01-03 08:45:28
Insert with implicit columns definition and just skip id
MasterZiv 2021-01-03 10:56:22
piterden 2021-01-03 08:45:28
Insert with implicit columns definition and just skip id

explicit

MasterZiv 2021-01-03 10:59:39
2021-01-03 07:20:26
i’ve two tables
table 01 : member(id, MemberID,isbn)
table 02: Lend(id, MemberID,isbn)

i created a trigger to insert isbn into member table when inserting isbn into Lend table. but trigger is not working

CREATE TRIGGER inserts AFTER INSERT ON
member FOR EACH ROW
INSERT INTO member
VALUES(NULL, NEW.MemberID, NEW.ISBN);

Triggers are created on the table changes of which you need to trace, in your case, you must have created a trigger on “land” table, and in it you insert into member.

MasterZiv 2021-01-03 11:01:54
2021-01-03 07:20:26
i’ve two tables
table 01 : member(id, MemberID,isbn)
table 02: Lend(id, MemberID,isbn)

i created a trigger to insert isbn into member table when inserting isbn into Lend table. but trigger is not working

CREATE TRIGGER inserts AFTER INSERT ON
member FOR EACH ROW
INSERT INTO member
VALUES(NULL, NEW.MemberID, NEW.ISBN);

One the insert statement: add list of fields and don’t mention autoincrement field in this list

2021-01-03 11:14:30
piterden 2021-01-03 08:15:25
Why do you need separated autoincrement definition?

i generated this via phpmyadmin . i can’t find the error brother 🙁

piterden 2021-01-03 11:59:15
MasterZiv 2021-01-03 10:56:22
explicit

Oh, sorry, of course explicit

2021-01-03 13:35:28
MySQL InnoDB Cluster: is the router a single point of failure?

MySQL Router High Availability with #Keepalived

3 – MySQL Router HA with Keepalived | MySQL InnoDB Cluster | MySQL DBA | MySQL ClusterYouTube
Scripts used on tutorial: https://ittutorial.org/mysql-router-ha-with-keepalived-mysql-innodb-cluster/
Please Follow me on Social Media
Linkedin: https://www.linkedin.com/in/mughees-ahmed-oracle-mysql-dba-287214122/
Twitter: https://twitter.com/Mughees52
Facebook: https://www.facebook.com/Mughees52/
2021-01-04 09:57:35
Hello, there another tutorial on Monitoring MySQL InnoDB Cluster is here please check out and give feedback in the comment section. Thanks

#mysqlinnodbcluster #mysql #mysqldba #mysql8 #database #dba #innodbcluster #cluster

4 – Monitoring MySQL InnoDB Cluster | MySQL DBA Tutorial | MySQL 8 DBAYouTube
Using Cluster.describe()
Checking a cluster’s Status with Cluster.status()
Monitoring Recovery Operations
Checking the MySQL Version on Instances

Please Follow me on Social Media
Linkedin: https://www.linkedin.com/in/mughees-ahmed-oracle-mysql-dba-287214122/
Twitter: https://twitter.com/Mughees52
Facebook: https://www.facebook.com/Mughees52/

Baron 2021-01-05 13:40:53
hi guys, i have task update schema mysql replication(master – slave) from version 5.5.59 with 1 table about 120G data, time update schema very long(5 hour for 1 node). Is there any way to reduce downtime time when update schema mysql? Please help me.
BlackshadowR1 2021-01-05 19:04:33
I want to learn SQL from the scratch and I don’t have any education background. Currently I work on MS EXCEL and created many dashboards based on formula’s only.
Can anyone recommend any link to learn the same
MasterZiv 2021-01-05 19:45:58
BlackshadowR1 2021-01-05 19:04:33
I want to learn SQL from the scratch and I don’t have any education background. Currently I work on MS EXCEL and created many dashboards based on formula’s only.
Can anyone recommend any link to learn the same

Excel is completely unrelated to SQL and relational DBMS.

minefolelser 2021-01-06 16:03:04
Hi. Does anybody know what it means?

To set active roles to all granted role, you use:
SET ROLE ALL;

minefolelser 2021-01-06 16:03:23
The granted role, what is it?)
MasterZiv 2021-01-06 18:43:28
minefolelser 2021-01-06 16:03:23
The granted role, what is it?)

I suppose this is about turning rights on and off

Liran 2021-01-07 10:18:42
Hi guys, can someone help me with initializing a new MySQL cluster? i’m having some trouble :/
Liran 2021-01-07 10:21:59
I have all the relevant commands running in linux but im probably missing something small
Baron 2021-01-07 11:08:22
Liran 2021-01-07 10:18:42
Hi guys, can someone help me with initializing a new MySQL cluster? i’m having some trouble :/

is your idea set up mysql replication(master-slave) ?

Liran 2021-01-07 11:08:59
No, I just want to create another node/cluster on the same machine with different port.
MasterZiv 2021-01-07 12:05:48
Liran 2021-01-07 11:08:59
No, I just want to create another node/cluster on the same machine with different port.

It is not a cluster, it is just another MySQL instance.
Configuration doesn’t differ much from the basic except you must provide a different service infrastructure, a different net infrastructure, and a different storage . Nothing from the new service should intersect with the installed service

fozilov_jasur 2021-01-07 16:49:47
which site is good for learning sql ?
piterden 2021-01-07 17:42:24
fozilov_jasur 2021-01-07 16:49:47
which site is good for learning sql ?

dev.mysql.com

RewriteH 2021-01-07 17:43:24
piterden 2020-12-19 18:01:07
What is your problem?

knex is better in nodejs project than pure mysql requests?

piterden 2021-01-07 20:44:49
RewriteH 2021-01-07 17:43:24
knex is better in nodejs project than pure mysql requests?

It depends on what is better for you

2021-01-08 09:12:11
Hello there here is another tutorial on the #MysqlInnoDBCluster, below topics are covered and many more:

Switch to the multi-primary instance

Switch to a single primary instance

Change Primary instance

Checking Instance State

Removing Instances from the #InnoDB #Cluster

Dissolving an #InnoDB #Cluster

Changing a #Cluster’s Topology

Tagging the Metadata

#mysqldba #mysql #mysql8

5 – Working with MySQL InnoDB Cluster | MySQL Shell | MySQL Router | MySQL DBA Tutorial | MySQL 8YouTube
Switch to the multi-primary instance
Switch to a single primary instance
Change Primary instance
Checking Instance State
Removing Instances from the InnoDB Cluster
Dissolving an InnoDB Cluster
Changing a Cluster’s Topology
Tagging the Metadata

Please Follow me on Social Media
Linkedin: https://www.linkedin.com/in/mughees-ahmed-oracle-mysql-dba-287214122/
Twitter: https://twitter.com/Mughees52
Facebook: https://www.facebook.com/Mughees52/

Liran 2021-01-10 15:53:10
How do I stop a MySQL instance? I start it like this: mysqld –defaults-file=/etc/mysql/my2.cnf -u root
piterden 2021-01-10 15:54:40
Liran 2021-01-10 15:53:10
How do I stop a MySQL instance? I start it like this: mysqld –defaults-file=/etc/mysql/my2.cnf -u root

Try to check services or either kill process by pid

Liran 2021-01-10 15:55:06
Is there another way? I know how to ps -ef “| grep mysql
piterden 2021-01-10 15:55:49
Liran 2021-01-10 15:55:06
Is there another way? I know how to ps -ef “| grep mysql

Why do you need another way?

Liran 2021-01-10 15:56:50
Trying to write a script, so it will be easier to stop this specific isntance by “stop” command rather than search his pid and kill
piterden 2021-01-10 15:57:38
Liran 2021-01-10 15:56:50
Trying to write a script, so it will be easier to stop this specific isntance by “stop” command rather than search his pid and kill

How many instances do you have?

Liran 2021-01-10 15:57:49
4-5
|