The MySQL transaction and open network problems, seeking answers

Description: I made a simple management system, running on the LAN.
PC: VC IP=192.168.0.2 , 192.168.0.4
Database: mysql IP=192.168.0.3
The use of ADO programming.

There are three questions to ask now.
1: How do I access the S=192.168.0.3 database on A=192.168.0.2, I use the Navicat for MySQL was unable to connect to the S on the host MySQL on A, MySQL need to set it can open network function? ? ?

2: If I add a client B=192.168.0.4 now, if A and B operate on a S host on the MySQL data at the same time, it will destroy the data consistency. Lock table [] I tried, although can be achieved, but there is a problem, if A long-term occupation of data table (not unlock words), B will appear the phenomenon of suspended animation.

3: If the A needs to database tables T1 and T2, I execute the statement at the beginning of affairs (no execution commits the transaction), I unplug the cable, I don't know what will happen when the database (unplug the cable, proves that we have a rollback statement)? Similarly, when the A in table T1 and T2 operations, B also hope on T1 and (or) T2 to operate it, how to deal with.

Really do not know mysql, ask a master to help, O (∩ ∩ O _).

Started by Spencer at November 16, 2016 - 12:17 AM

They disdained to answer it?

Posted by Spencer at November 27, 2016 - 12:36 AM

1: How do I access the S=192.168.0.3 database on A=192.168.0.2, I use the Navicat for MySQL was unable to connect to the S on the host MySQL on A, MySQL need to set it can open network function? ? ?

To set permissions in 192.168.0.3

2: If I add a client B=192.168.0.4 now, if A and B operate on a S host on the MySQL data at the same time, it will destroy the data consistency. Lock table [] I tried, although can be achieved, but there is a problem, if A long-term occupation of data table (not unlock words), B will appear the phenomenon of suspended animation.

The default isolation level database is not the problem of data consistency of this you may rest assured

3: If the A needs to database tables T1 and T2, I execute the statement at the beginning of affairs (no execution commits the transaction), I unplug the cable, I don't know what will happen when the database (unplug the cable, proves that we have a rollback statement)? Similarly, when the A in table T1 and T2 operations, B also hope on T1 and (or) T2 to operate it, how to deal with.

Automatic rollback, automatically submit proposals for database default properties
Don't worry about the database has its own mechanism but you need to understand these mechanisms

Posted by Toby at December 07, 2016 - 1:22 AM

Hope the detailed, thank you!
1: those permissions, can you be more specific? I'm MySQL rookie
2: This I did not understand what you mean, if two clients on a data [also], I think there will be problems, such as a bank or train ticket center, they must pay attention to the
3: Transaction processing is VC, or MySQL transaction? ? ?

Posted by Spencer at December 15, 2016 - 2:09 AM

Top up, do not believe no one answer

Posted by Spencer at December 26, 2016 - 2:30 AM