RedJeep has asked for the wisdom of the Perl Monks concerning the following question:
The above works fine. My hope is that MySQL clustering magically lets me use DBI and everything just like above. However, in the literature it seems that I would point my application to a MySQL router (mysqlrouter) instead of directly to the MySQL database. If I should be taking an entirely different direction to clustering for fail over and scaling feel free to let me know. The only requirements for the project are that we stick with Perl 5 and MySQL. Thank you in advance!use DBI; use strict; use warnings; my $driver= "mysql"; my $dsn = "DBI:$driver:database=$database;host=$host"; my $dbh = DBI->connect($dsn, $user, $pw); $dbh->do('INSERT INTO test_table (fname, lname, email, comment) VALUES + (?, ?, ?, ?)', undef, $fname, $lname, $email, $comment);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI mysql router mysqlrouter cluster
by dsheroh (Monsignor) on Jul 02, 2022 at 11:02 UTC | |
|
Re: DBI mysql router mysqlrouter cluster
by Anonymous Monk on Jul 01, 2022 at 13:57 UTC | |
by RedJeep (Sexton) on Jul 02, 2022 at 17:00 UTC |