Replication Using A Shared Fileserver
I thought of a radical way to do replication of MySQL servers.
Let's assume two MySQl servers access a shared mapped storage (/mnt/db) which is a local mount to a fileserver on the network. This fileserver is shared between the MySQL servers; which means any writes to /mnt/db appears immediately on /mnt/db on the other MySQL machine. Two MySQL servers may attempt to modify to the same file if we don't use synchronization.
My question is, first, can we do this without making patches to MySQL code, and somehow using some synchronization mechanism accross the two machines running MySQL server each. Or we need to patch MySQL code to support such architecture. Second, is it trivial or impossible to do, how much man-time it requires roughly.
View Complete Forum Thread with Replies
Related Forum Messages:
UDF Shared Library
I am trying to create a User Defined Function (UDF) using mySql 4.1.11 (mysql-max-4.1.11 for Solaris 8). I am trying to get the examples to work (udf_example.so) I have successfully compiled it and copied the resulting .so file to /usr/lib. The command 'crle' (like ldconfig on Linux) shows that /usr/lib is in the library path, but when I type in mysql: CREATE FUNCTION metaphon RETURNS STRING SONAME "udf_example.so" I get the error 1126, Can't open shared library 'udfexample.so' I've tries renaming the library 'libudf_example.so', but that didn't work either. I don't know how to check what libraries mysql is looking through. I am just guessing that it uses the library path from 'crle'. Any ideas?
View Replies !
Shared Password
I've installed mySQL out of the box and set a new password for the root account, which works in the MySQL monitor but not with the mysqladmin tool. Please can anyone advise whats going on or if I have to do anything else to get access to the admin tool?
View Replies !
MySQL And Shared Storage
--=_D38DA341.B3D2A80A Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable I would like to set up a round robin cluster with mysql. The round robin = would be done through the DNS to two different servers. Each of those = servers would have mysql installed and each would reference the same data = directory on our SAN. Are there any problems with doing this? =20
View Replies !
MySQL-shared RPM Install
I'm having problems installing the shaired libraries. This RPM came from the MySQL.com download site. [root@localhost src]# rpm -i MySQL-shared-4.0.17-0.i386.rpm warning: MySQL-shared-4.0.17-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
View Replies !
Connections On Shared Server
I frequently get the error message: Warning: mysql_connect(): User user1 has already more than 'max_user_connections' active connections in /home/.sites/60/site23/web/Connections/mysite.php on line 9 It's commercial web hosting on a shared server so I have no control over the server side of things. The php scripting has been written using the GUI in Dreamweaver. Is there anything I can do to resolve this? Should I be using mysql_connect or mysql_pconnect, or is this not the problem? Do I need to include somewhere in my scripts a snippet which disconnects from the server? If so where would I put this? I am not all that familiar with php and mySQL, though I understand parts of it when looking at the code. The database connection is made via a connection.php file produced by Dreamweaver which includes the database details etc. My max connections are only 10. Is this the issue? It only seems to appear when I use php to edit or add to the mySQL database.
View Replies !
Find Shared Values
Say I have a one long Table of people and the foods they like. How do I find all the foods that are like by both of two particular people? ie David peas Kate sausages Kate eggs Bill eggs Kate peas Fred sausages Fred peas and i want to find out what both Fred and Fate like:
View Replies !
How To Find Out Values Shared By Some Members
I have a table contains words extracted from documents which are belonging to a number of categories. Each category contains a number of documents. For each category, I want to find out those words which occur at least in N documents belonging to this category. Code:....
View Replies !
Shared Column Data Transfer
I have two tables with one shared column. One other column in table 2 is empty but has to get filled with a value from one column in table 1. select * from tbl1, tbl2 where tbl1.column = tbl2.column; Above query gives me the results that need to be updated. What will the update statement look like?
View Replies !
Multiple Database, 1 Shared Table, Is It Possible?
I Used MySQL for a long time dev under PHP 3, 4 and now 5 now i'm facing a problems that i solved in the past with php, but i wonder if MySQL could do it on it's own, that'll help me a lot. Multiple database, 1 shared table, is it possible? i mean, i already done with 5 install of Xoops CMS and modified it that every install is on the same database, with deifferents prefixes (like db1_ db2_ ...) then i mod Xoops for each time it called for it's users or saved open sessions id in the DB it use the same table on all install... so the users seamlessly wonder about in 5 differents xoops install without disconnect and change username. now i face the same problem, i need a multi-install or a single install of a core system that will act as a multi-install sofware, but with the same set of users, sessions and some other things.
View Replies !
Security For Shared Server.xml Passwords
I have an ISP that has the server.xml in a shared environment. The server.xml file is where my password is available for database access under connection pooling. I really would like to use connection pooling. Does anyone know how I can protect my password from being viewed by others using the same server.xml file? I cannot get the administrator to change the protection of the file because others in the shared environment need to be able to view it.
View Replies !
Cannot Open Shared Object File!
i just upgraded from MySQL 4.1 to MySQL 5.1. But when i try to run a program, i'm getting this error: error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file or directory
View Replies !
Can A MySQL Database Be Shared Between Windows And Linux?
I've got Windows and Linux running on my computer, on seperate partitions. I also have a shared partition for stroing files, and can be read and written by either system. I also have MySQL installed on both systems. When I make changes to the database in Windows, I have to do a dump of the database (or single tables) to a text file on my shared partition. I then have to switch into Linux and load that file into MySQL there. This is a bit of a hassle. Is it possible to somehow store the database file on the shared partition, and use the same database from both OSes? This would be very convenient, since I wouldn't have to maintain two copies of the same database!
View Replies !
ODBC Connection To MySQL On Shared Hosted Website
I'm trying to connect to a mySQL database that exists in connection w/ my website. I created the database using c-panel. Everything that I use to access the website from my site uses "localhost" as the host name. I installed the ODBC drivers for Windows on my XP machine and am trying to connect from my local machine. I am not sure what I should use for the hostname in that case -- I tried www.mysitename.com as the host but that didn't work. I also tried the IP address, but that didn't work either. I asked my host's support team, but haven't heard back from them yet. It's a shared hosting service. Any ideas on what the hostname should be?
View Replies !
How Often Is Best To Create New Database, Migrate Data With Shared Hosting?
I have got a web site that I have ben working on since March, 2007. It is a news reporting web site. It is replacing an older web site. I created a new database (it uses the MySQL database) last March when I started working on the new web site. I have migrated all of the news content from the old web site database to the new web site database. I have a shared web hosting. It's my understanding that the hosting service provider fills up one server with databases then starts a new server with databases. For example, the IP for the server that is hosting the current database for the new web site is 10.6.166.5 I just created a new database (the hosting allows you to have ten databases per shared hosting). The IP for the server for the recently created database for the new web site hosting is 10.6.166.92 If the servers are ordered sequentially there have been 87 new servers filled up with databases since last March (i.e. 10.6.166.92 recently created IP minus 10.6.166.5 March, 2007 IP equals 87 servers). The problem with migrating the nine-month old database to the new database is that I have got over a thousand news stories and two thousand pictures stored in the database with the 10.6.166.5 IP address. I would have to copy and paste all of the data into the phpMyAdmin program or write a PHP script that would automate the process. Is there any benefit to migrating the 10.6.166.5 March, 2007 IP database over to the more recently created 10.6.166.92 IP database? Would it be reasonable to expect the more recently created database to perform better over the next 12 to 18 months than the one created nine months ago?
View Replies !
Why Dont Shared Hosting Accounts Provide Stored Procedures And Triggers?
i am searching for 3 days now for a reliable, fast hosting company, which supports stored procedures and triggers on mysql5. most of them dont support this, because mysql5 has a design-flaw in which it stores procedures and triggers on a root level-area (tables mysql information_schema). due this logic, most of the hosting companies wont allow you to create/run procedures and triggers. funny, that hosting companies forbid you to use new technologies and methods to build faster.
View Replies !
Replication Using Ssl
I have replication all set to go between an ubuntu Master and a FreeBSD Slave. However, no matter what I try I can't get telnetd to run on the master and the slave is not connecting (I am assuming it's using telnet). Can someone point me to a dumbed-down recipe on altering my existing my.cnf files to use SSL for the replication connection to the Master? Currently I can SSH into either machine, and from one to the other, without problems. The error is this: codd# mysql -u <a user with 'replication slave' rights> -p -h <Master hostname> Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on '<Master hostname>' (61)
View Replies !
Replication Lag
i have mysql 4.1.14 running in a master slave setup.. in a local network.. The problem i am having, that the replication status on slave show random bursts of lag.. like , in two consecutive runs of SHOW SLAVE STATUS, i get Seconds_Behind_Master: 28984, and Seconds_Behind_Master:
View Replies !
Replication
I have connect my web server (master) to my local server (slave) through dial-up and replicate 2 databases. a) Is there a log file describing the replications that happend (if any)? b) how do I know when to stop the dial-up so not to stop any data transfer through repliication?
View Replies !
Replication - 4.0.16
We replicate several databases in a master server to three read-only servers, for load balancing. Sometimes the users notice that one of the three databases have not updated a few transactions. Has anyone written a tool that can compare two databases for content? I would sleep much, if I could run a weekly process that compared each of the replicated databases with the master.
View Replies !
Two-way Replication
I have set-up a two-way replication for two of our servers, it is for redundancy only so only one server will be used at any one time. I noticed that you cannot use auto-increment columns with this sort of set-up. What method do others use to get unique ID's in this sort of set-up? I was thinking of using timestamp with a random number 1-99 added to the end. But then I suppose it is possible to get a match (more chance of winning the Lottery though).
View Replies !
3-Way Replication
Has anyone successfully setup 3-way replication? We have not been able to get the master to accept updates from the slave; the slaves all have binary logs enabled. We have been unable to find any information on this on the Net.
View Replies !
5.0 Replication
I'm using mysql 5.0 and have 1 master and 1 slave. In case there's a problem with the master, I want the slave to become the new master. Can anyone point me to articles describing the setup and the pitfalls for this, or share their own experiences? I had trouble finding info, specifically for 5.0.
View Replies !
Replication And NOW()
Was just wondering, if I had one mysql master with one slave server, would this sort of query cause any problems insert into (date) values (NOW()) As there could be a potential time difference between the time the master executes this query and the slave does so, could this result in mismatched data? or is mysql smarter than that?
View Replies !
Help On Replication
i followed the format and instructions in the manual but i still cant get replication of database...the master started and the slave started also...can somebody who has tried replication .
View Replies !
Replication :: How To?
I have a set of applications that are used at my coporate workplace, they are used locally by the corporate network users - However, I have an installation in another location which I wouold like to replicate onto our main server without affecting the other databases so that we can pull data needed off the database during the next business day....is there any quick way to do this???
View Replies !
Checking Replication In 4.0.x
I'm in the phase of upgrading mysql from 3.23(.58) to 4.0(.23). I have some replication setups. Following the manual, the upgrade process went very smooth. Now I have some problems with checking replication automatically. For 3.23 I wrote a shell script, that looks on the master for the Binlog Dump Processes in "show processlist;". That worked perfectly. If the replication was disrupted, the respective process was gone immediately and the check script could send a warning. Principally, the same check script works for 4.0.23, too, but if I stop a slave, the respective Binlog Dump Process vanishes not immediately from the master. It lasts 2200 to 2600 seconds, before the process is gone. Even if I shut down the whole slave server, the Binlog Dump Process stays in the processlist. I haven't found a variable to shorten these 2200 to 2600 seconds to a shorter period of time. With this experience, I tried to setup report-host on the slave side and check on the master with "show slave hosts;". This works also as the method above: If slave is disconnected, the respective slave stays in the list of "show slave hosts;". Only after a longer period of time, the slave vanished from the list. OK, I could write a script to check replication on the slave side. But I did this some times ago (on 3.23). The result was, that in some cases, the script ("show slave status;" also) reported a running slave, which wasn't the truth. So I wouldn't trust this method.
View Replies !
Thinking About Replication
I am thinking about implementing replication. Basic question is what kind of delay there would be to have the data replicated. Not a massive table, and all on the same net.
View Replies !
Replication Through Ssh Tunnels
The master database resides on machine A, and the slave on machine B. The replication is performed through an SSH tunnel. This SSH tunnel is created using autossh to reestablish the connection if it times out or is lost in any way. However, whenever this ssh tunnel breaks, and restarts, the slave binary log (relay log) is corrupted and the replication slave stops. This happens daily, rendering the replication very unstable. Anyone has an idea of any alternative method or any solutions to the problem?
View Replies !
Replication On Only One Server
I am searching on documentation and on web and on groups but I can't find an answer to my question: I want to use replication from one database on one server to onother database on the same server. Is it possibile? The only information I found is that it is possible if you setup 2 servers on the same machine but I don't want to do so. Is there another way to do it? Or maybe someone has a suggestion to solve my problem?
View Replies !
Replication Of Tmp Table
i run a mysql 4.0.13 master and slave on linux rh 7.3 servers. every now = and then i get a error on the slave. the error is that it cannot insert = data into a table that does not exist. the problem is that the table its = complaining about is a tmp table. that table is created when (a) user(s) = runs a query. in the query, i first create a tmp table, insert data from = another table, run a join with another table and display the result. = the query is executed from a web page so all is done with a php script.=20 to get around the problem, i then create the table on the slave. does = 4.0.13 replication handle tmp tables ok?
View Replies !
Replication On 3 Machines
I have 3 machines M1 M2 and M3, i need to setup the following: M1 is the master M2 is reading from M1 M2 is a master for M3 M3 is reading from M2 the problem i got, is when i run a command in M2, it's replicated in M3, but when the command is being run in M1, it's replicated in M2 but not in M3.
View Replies !
Replication Process
I have a Primary PC that acquires data from an external device. This data is stored in a local database. This external device is sending information all the time. There is a Secondary PC that copies the data from the Primary PC database. There is another database in the secondary pc. I have to do this with longer time intervals. I want to: The secondary pc copies only the new incoming data from primary pc database. When the secondary pc copies the data, the primary pc has to delete all these copied records (in the local database). This process has to be repeated continusly.
View Replies !
Replication Issue?
My slave has been working fine up until now. Here is the error message. 030730 11:32:28 Slave: connected to master 'repl@xxxx.xxx.org:3306', replication started in log 'SQLServer1-bin.034' at position 77571524 ERROR: 1062 Duplicate entry '120816' for key 1 030730 11:32:28 Slave: error running query 'INSERT INTO Assignments ( .......... Key 1 is CaseID Database changed mysql> select CaseID from Assignments Order by CaseID DESC Limit 3; +--------+ | CaseID | +--------+ | 120815 | | 120814 | | 120813 | +--------+ 3 rows in set (0.02 sec) mysql> DELETE FROM Assignments WHERE CaseID = 120816; Query OK, 0 rows affected (0.04 sec) If I try to restart the slave I get the error all over again.
View Replies !
Bi-Directional Replication
Can anyone tell me if your product can or will do Bi-Directional Replication. We are currently using MS-Access which has A Desiggn Master and Replica's that can exchange information (data) back and forth between replica's. Is There any way to do this with MySQL? We are looking for a database system to replace MS-Access Glen Boyer IT Manager Pacific Event Productions 6989 Corte Santa Fe San Diego, CA 92121 858 450 7763 (direct) 858 458 1173 (fax)
View Replies !
Replication And Internal
------=_NextPart_000_000C_01C36344.47734B10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Replicating queries where re-written to fix various bugs, most notably time and auto-increment bugs. Why doesn't replication also enforce rewriting INSERT INTO into INSERT DELAYED / etc. I've notice that the replicating thread in 3.23.5x will wait for a table instead of going onto another log event iff that table is being queried. I would think adding DELAYED under the covers for replication would be a big win for mysql, in keeping a slave consistent and up to date. What would the drawback be? It's not waiting for an auto increment value to be returned is there some other intrinsic problem? This should be a win win for both 3.5x and 4.x
View Replies !
Replication SQL_SLAVE_SKIP_COUNTER
I am having a problem with replication in MySQL 4.0.13. I have a my.cnf file in the data directory of the slave that should exclude a specific table in one of my databases from replication. I am getting the following error message: "error 'unexpected success or fatal error' on query 'UPDATE excludedDB.excludedTABLE.....' ". I am sure the syntax is correct in the my.cnf I am excluding several other tables and that seems to be working fine. The above query is for software that is in beta so it is not running all of the time. I can use SET GLOBAL SQL_SLAVE_SKIP_COUNTER to by-pass them for now but I need to find a permanent solution.
View Replies !
Replication From MSSQL
Has anyone ever gotten transactional replication to work from MSSQL to MySQL? I have done very rudimentary tables with 1 or 2 columns but I have run into various errors at startup about invalid cursor state. Any insight you may have is greatly welcome.
View Replies !
Replication And InnoDB
I'd like to setup the following: Server A <-- Server B <-- Server C Data A some of Data A some of Data A Data B Data B Server A should be the master for server B. Server B should get not all but some of the data of server A. Additionally there should be other data stored on server B. Server B is slave for server A and master for server C. Server C simply should get all the data of server B. No problem with MyISAM, but with InnoDB some questions arise: The manual says, that one should shut down the master and copy the InnoDB datafiles, logs and .frm files. 1.) If I only need some data of server A on server B wouldn't it be overkill to copy all the InnoDB data? 2.) If I want to store other data on server B I can't mix up the InnoDB datafiles and logs for data A and B, can I?
View Replies !
[4.0.20] Set Character Set / Bug In Replication?
I've got two Linux x86 servers: master and slave, both with MySQL 4.0.20 from the same package. On the master I do: SET CHARACTER SET cp1250_latin2; UPDATE `my_tab` SET `my_field`='my_cp1250_string'; and got this in both master's and slave's log. On master the data is properly translated into latin2 and I get latin2 characters in my_field. On slave I don't, there are still cp1250 characters. I think, although not 100% sure, thas this worked okey in 4.0.18. Any ideas?
View Replies !
Can't Set-up Slave In Replication
I'm trying to set-up replication following a book and on-line guide. This is over SSH with a tunnel (not sure if the tunnel's required). The master appears to be set-up OK (easy enough). The slave however isn't behaving. I've got a my.cnf with the following: [mysqld] master-host=127.0.0.1 master-port=APORT master-user=AUSER master-password=APASSWORD server-id=2 When I start the slave up and do show slave status - I get 0's and blank entries back. I've tried setting it up using: CHANGE MASTER TO MASTER_HOST='localhost', MASTER_USER='AUSER', MASTER_PORT=APORT, MASTER_PASSWORD='APASSWORD', MASTER_LOG_FILE='AFILE-bin.001', MASTER_CONNECT_RETRY=10; This sets up the slave bits and show slave status looks much better, however, SLAVE START; returns... The server is not configured as slave, fix in config file or with CHANGE MASTER TO I can only seem to find this message in pages that have a list of all Mysql errors.
View Replies !
Replication Interfere
I have MySQL replication set up where data on a master server is being continuously sent to a slave backup server, it works really nice with the binary log file making point in time recovery possible and everything.However, I would love to use this backup server as a platform for testing and developing other MySQL driven applications. Does the MySQL replication process preclude or in any way interfere with the operation of separate databases being run in MySQL on the same slave server or vice versa?
View Replies !
Replication On Windows
I want an urgent help for mysql replication running on 4.16 version does replication works on windows or linux only if it is pls give me minimal steps just first to start it replicatiing.i want it on windows box.
View Replies !
Replication Logging
Im wondering if there is some method to automatically "clean up" the binary logs left by replication even after they are used. For example, I have a number of mysql replication logs sitting on a server. There are about 25 of them, a GIG in size each. My MYSQL replication is UP TO DATE. This means everything is properly sync'd. But I dont want to just 'DELETE' everything.
View Replies !
Replication Fails
we want to set up a replication server to distinguish between reads and writes where one database server is for reads (m1), and the other is for writes (m2) m1 will replicate the data from m2 so that when we serve pages, users only connect to the reads database server now, what we need is a system whereby we are notified if replication stops for whatever reason so that we can switch reads to the write server temporarily or restart the slave does anyone know of an app or way to get alerted as soon as replication stops?
View Replies !
PHP MySQL Replication
I was thinking of setting up a second server to replicate my master server for high availability.However, because I am not using a VPS or dedicated server, my webhost doesn't support MySQL replication. My only option is perhaps to use a PHP script on my master slave, and write any MySQL queries to a file. The second server would then request for this file, say every 2 minutes, and apply the queries to its database. However, there are two concerns: 1) The master server would be slowed down because it will have to write to a file for every SQL query, which can be quite a lot. 2) To ensure integrity, I would have to lock the file while reading it. The master server would then have to wait to process a query when the second server is reading the file. If file reading is slow, especially if there are many queries or high latency between servers, then my website will be awfully slow.
View Replies !
|