MySQL Replication Setup
Mar 31, 2008
if you have MySQL replication setup, and DNS failover switches over to the MySQL Slave server in case of an outage...
Is that gonna work? Will the Slave suddenly just work as a regular non-slave DB?
Then when the primary server comes back up, how do I sync my changes back to the master db?
View 14 Replies
ADVERTISEMENT
Jun 8, 2008
I have fairly a large web site that has a forum and a torrent tracker.
Currently MySQL server is handling about 150 queries an avarage per second.
Here is the server spec:
Core2Duo 2.66Ghz
4Gb RAM
320GB SATA 7200RPM (Server provider does not have 1.5K RPM nor 1.0k RPM)
100Mbit Connection (servers on the same switch and the switch does not have 1Gbit port)
MySQL Version: 5.0.51a
I had Master-Master Replication setup with forum running on one and the tracker running on the other.
Although this has been working for about few days, we started seeing lags in the replication process.
After a week, there is a major lag and the changes made on one of the servers takes about 5 hours to appear on the another.
So, this doesn't work.
What would be the other ways of splitting MySQL queries concerning the same database?
While I was researching, I read about MySQL Cluster with database storage engine being NDB.
But, let's say that there is a power failure on both the nodes at the same time, then I would lose the whole database as the database is stored on the memory correct?
I would not like to take that chance either, but if this is faster then replication method then maybe I will concider.
I thought about editing the forum coding to make all queries that concerns the tracker to go in to, say server B (with forum's primary MySQL server being Server A), and make the tracker use server B as MySQL backend, but it seemed like a heavy work so that will be the last choice.
View 6 Replies
View Related
Jul 13, 2009
I am trying to achieve mysql replication between server1 and server2 with help from [url]
However, I have problem connecting server1 and server2 to perform the replication. The error that I receive during the first time replication on server2 is as below:-
mysql> LOAD DATA FROM MASTER;
ERROR 1218 (08S01): Error connecting to master: Access denied for user 'slave_user'@'server2' (using password: YES
However, I am able to connect from server2 to server 1 with:-
mysql -h server1 -u slave_user -p
I have followed the exact guides but still could not get it to work.
View 6 Replies
View Related
Dec 29, 2008
I don't know much about MySQL replication at all but am trying to present a few different options to a client of mine.
They run a large eCommerce site with a very active database. For several reasons, they are considering having their site mirrored across two completely different dedicated hosting providers.
The question here is, is it also possible to replicate the MySQL database in real-time across external servers and if/how secure it is.
Essentially, if one DC becomes inactive they'd like to fall-back on the other. An even more ideal solution would be to split traffic across the two... but not sure if that's even possible, perhaps with DNS?
View 14 Replies
View Related
May 24, 2008
I'm working for a client who has an e-commerce site currently hosted on a shared hosting solution.
He is now looking for 100% uptime (as near as), so I have suggested that we get 2 VPS and use DNS monitoring to switch servers as required (from DNSmadeEasy).
This is all fine, and the websites files/images do not change often, so I can use rsync every so often to sync these. Not a problem.
What does change frequently is the mySQL db for the site.
I've been looking at MySQL replication, but this seems to be no good. If one server goes down, then the other one takes over, they don't automatically sync themselves after they come back up. It seems MySQL cluster is best, but this needs 3 servers and they all need to be on the same LAN.
I've read you can set MySQL replication to MASTER-MASTER so that it acts like a cluster, and resyncs itself as required.
View 4 Replies
View Related
Jul 23, 2008
I had configured mysql replication for one of my client. Now the replication is stopped and slave server is not updating the data. How can I resolve this and start the replication again?
View 7 Replies
View Related
Dec 13, 2007
Some of you may have read my previous posts about a dual server configuration I am currently working with. I run a high traffic forum which has up to 2-3k of people online at once. I was wondering if it could be effective to setup MySQL Replication of certain tables which are read very frequently and then modifying the script to grab data from the slave server rather than the master? For say viewing threads, forums etc. Information which isn't updated literally every second.
A few questions...
-Will this place a lot of load on the master having to write the data to the slave as well? As in would the load I save on SELECT queries be used on writing to the slave anyway?
-Could this actually be effective?
View 13 Replies
View Related
Jul 22, 2008
I'm not too experienced with this, so I'm hoping someone more enlightened here can help.
Scenario:
I'm trying to build a social network site geared towards old people. I'm using LAMP environment. I want to have 1 mysql master (writes) and 2 mysql slaves (reads). Two web servers will read from the 2 mysql slaves and write to the one mysql master.
Questions:
My concern is this: when a user posts a comment via the webserver, the comment is written to the mysql master. I would like for him/her to see the comment he posted right away so they don't think something failed or went wrong. I'm afraid that replication to the mysql slaves will take some time to sync all of the mysql databases together. How can I work around this? Or am I mistaken and this doesn't actually happen?
How fast is replication? How can I mitigate this delay in replication to show the user instant results of their submission.
The same thing can apply to uploading photos to a user's profile.
View 3 Replies
View Related
Nov 6, 2008
I never did replication and do not know much about it so I figured I would ask here if anyone knows or has done it before like this.
I have a user who wants me to enable replication on my server for his user. I dont like the sounds of it on a shared environment but if there is no risk to other users and its not a big resource hog I will do it. Anyway, from what I gather I have to:
1. execute:
GRANT REPLICATION SLAVE ON user_main.* TO 'repl'@'ip-here' IDENTIFIED BY '4T6WjUZa';
[url]
2. Stop mysql server and Add in my.cnf:
[mysqld]
log-bin=mysql-bin
server-id=1
slave-compressed=1
binlog-do-db=user_main
start server[url]
3. execute:
SHOW MASTER STATUS;
we need values of colomns File and Position from output of above command[url]
So my questions are:
Is there any security risk?
Is there significant extra resource usage?
Is this even done on shared environments?
View 5 Replies
View Related
Jul 7, 2009
How do I setup a site to use two servers? One as a mysql server and the other as a web server.
At the moment I have the site on one server. When I get the second server what steps do I need to take to make this possible?
How do I secure the mysql server to only allow the web server to connect to it?
Do I need a control panel (i.e. cPanel) software on the mysql server?
View 14 Replies
View Related
Aug 9, 2007
We are currently configuring two machines to act as primary / secondary name servers.
Both machines are server 2003 Standard Editions, obviously based in seperate locations.
I would like to replicate all primary zones as secondary zones on the second server.
However If a machine dies I dont want to have to re-add every zone manually - I would rather point the machine at the other one and have it pull back information for all zones that machine is authorative for.
Is there a way to do this on server 2003 DNS or not?
View 2 Replies
View Related
Jun 15, 2008
if I could get some input on this. Currently I'm running an Opteron 246, 2GB RAM with 2TB bandwidth/mo. I run a single site which is currently 99% HTML, along with an invision forum which is fairly popular. I get about 300-400k pageviews per day.
Right now the server is able to handle this stuff without much of a problem, and the average CPU load is between .5 and 3 (after a TON of tweaking!) - the only exception is when the forum db is being backed up/optimized, which isn't a huge problem since it happens during the off hours.
The problem is that I'm running out of bandwidth quickly, and need to come up with some kind of solution soon. My current provider offers bandwidth at $1/GB, which to me seems crazy compared to other providers, so that's not really an option.
I was thinking about switching to a more affordable provider and upgrading hardware, but I'm not sure what the best approach would be. I'm in the process of moving my HTML content over to a PHP-powered CMS, so I need to make sure whatever I do can handle that... What might be a decent setup for a site like mine which consumes a lot of bandwidth and will probably need more CPU power in the near future for PHP/MySQL stuff?
View 8 Replies
View Related
Aug 22, 2007
I finally broke down and just got a cPanel license to fix my multiple account problems, and had it installed... But now I have a problem that I can't seem to fix - MySql won't update to 4.1.21, its stuck at 4.1.18 which means I can't use PHP 5+... I can't update to MySQL 5.0+ because my databases (Which I have yet to move over) are 4.1 and should probably stay 4.1 until I know for sure it won't break anything.
Does anyone know whats going on and how I can fix this? I've tried "/scripts/mysqlup" and "/scripts/upcp --force", as well as Apache update in WHM, and manual cPanel update in WHM.
Heres what it says when I use mysqlup:
Quote:
MySQL Setup Script Version 7.0
This is the MySQL installer for OS FreeBSD
mysql-client-4.1 (4.1.18_1) is already installed.
mysql-server-4.1 (4.1.18_2) is already installed.
Install Complete
View 14 Replies
View Related
Sep 16, 2007
What would be the best way to replicate two exchange servers across a WAN? I would like to run exchange but in two different physical locations for redundancy and backup purposes, to ensure if one goes down, the other is right there. Is there any good commercial solutions?
View 0 Replies
View Related
Sep 11, 2009
I'm trying to find a low cost solution for realtime file share replication in a windows environment.
It doesn't look like there are any open source windows cluster filesystems around, so the only viable option I found would be running OpenFiler in a replication cluster on Hyper-V nodes. Has anyone worked with this, does it work reliably?
The required IO throughput on these shares would really be minimal and my biggest concern is 100% availability.
View 1 Replies
View Related
May 7, 2008
what can make site load faster other than replication
(well lets assume that design wise it is ok and doesnt content heavy contents...)
i have heard that increasing networking speed at the server level can make site much faster...
is it true..?
is there any tweak bandwidth wise...
suppose we get 1tb bandwidth per month compared to 100gb ...
will that make site faster...
we want to host a photogalley site...which is fast or images are shown in faster way....
View 8 Replies
View Related
Jul 30, 2009
Hello, we have a few web servers that run Windows 2003 Server and IIS for web page hosting. We develop custom applications and don't do "web hosting" per se.
What is the best way to do this in a load balanced environment? We have a Cisco load balancer out in front of these servers, but I'm curious about the following:
1) Is there a way to replicate IIS entries instead of having to configure the site on each server?
2) How does everyone handle file replication (hopefully in real time) across all servers?
View 2 Replies
View Related
Jul 31, 2008
As my clients' needs expand, they're asking for chroot ssh/sftp setup. I'm currently on a dedicated Linux setup but don't really have the time to set up a whole new box with full virtualization or investigate a full chroot solution (baby on the way), and to be honest it would be less hassle to move to a new provider than worry about down time with sites.
What I'm looking for:
- linux hosting
- hosting for 30+ accounts, some with several domains
- at least 6 IP addresses for SSL certs
- each account in a full chroot environment (ssh/sftp/ftp) so they can't poke around each others' files, or each account set up in a virtual machine setup (ie: openvz)
- maildir
- spamassassin
- php 5, mysql, perl 5.8.8
- suexec apache would be nice
View 3 Replies
View Related
Aug 1, 2008
I have learnt it is harder to setup than I initially expected (since I have just moved from a shared hosting service). I am in need of some help setting up my DNS servers, as I am very confused. Here is most of the info I know:
1) I am running HyperVM
2) I've installed LXAdmin
3) I own the domain (purchased from xeodomains.com) runemart.com
4) My VPS hostname is: vps.runemart.com
5) I know my IP
6) My host has said:
'For VPS customers that have a HyperVM login you can now host forward DNS on the DNS servers rdns1.vaserv.com (US)rdns2.vaserv.com (UK'
And I am unsure what this means/how to do it.
I am not sure if I need some more information to set up my DNS, however I am sure that I can get it if I do.
Now, my questions begin. Firstly, I need to point my domain - runemart.com - somewhere. I believe I need to set up my DNS via HyperVM or LXAdmin so that they are something like: ns1.runemart.com and ns2.runemart.com. Though, is this correct? Am I able to set up my own actual domain name servers, or will my domain have to point at something like rdns2.vaserv.com?
If anyone can assist me in this I would be very greatful, as I am waiting to get my website running. This is all I will ask for now, I will take it one step at a time =).
View 14 Replies
View Related
May 8, 2009
Since my /var partition is full, so I moved /var/lib/mysql to /backup/mysql/.
Seems all the files are copied and I changed my.cnf reboot mysql, but all the web sites using db is not working anymore..
View 4 Replies
View Related
Jan 21, 2007
I installed the MySQL binary packages in /usr/local/mysql/ after removing the MySQL RPM package. MySQL is functioning when I executed /usr/local/mysql/bin/safe_mysqld. I reinstalled MySQL before I installed PHP. When I used a PHP script to access a MySQL database, it outputs an error:
Code:
Warning: mysqli::mysqli() [function.mysqli-mysqli]: (HY000/2002): can't connect to local mysql server through socket /var/lib/mysql/mysql.sock in index.php on line 2
However, I installed MySQL in /usr/local/mysql, not in /var/lib/mysql. How do I fix MySQL?
View 1 Replies
View Related
Jun 16, 2008
For some reason mysql wont start, i have tried restarting mysql but it wont, it says FAILED. The mysql.sock file seems to have disappeared and i cannot find it anywhere.
View 5 Replies
View Related
Feb 11, 2008
I recently had a harddrive failure and luckliy I can still access certain directories on this failed drive. I can still access the /var/lib/mysql/ directory which holds all the users databases and have backed all these up separately using tar.
Now what I need to know is how do you restore these database files to another server? I tried simply untar'ing one of these to the new servers /var/lib/mysql/ direcotry and it stuffed Mysql up - it went offline. I had to get a cpanel tech to bring Mysql back online.
how can I get these database files to fully work on a new server?
View 2 Replies
View Related
Jan 17, 2008
Can someone recommended me some one with knowledge of mysql exploit or mysql injection, it seem to our VB forum have issue with database load..
View 5 Replies
View Related
Jan 15, 2007
I've been racking my brains with this problem for the last couple of months and have made zero progress. I've asked a lot of people if they know what might be wrong here, but none of them have any idea.
Basically, the problem is that any sort of service monitor I put on my server shows MySQL as being down/offline, even when I know for sure it's up and running perfectly fine. All other services report a green light.
The mysqld service is running on port 3306, which is open both inbound and outbound on my APF config, so as far as I can tell it's nothing to do with the firewall (I won't rule that out though).
The other odd thing is that MySQL shows a green light within WHM, but not anywhere else.
Does anyone know what might be wrong here? Am I missing something entirely fundamental and obvious?
View 11 Replies
View Related
Apr 15, 2009
my /var partition is full,
im not sure if any files i can remove to get more free space on /var partition.
because there are more free space on /home,
i think if i can move all the /var/lib/mysql to /home/mysql,
if yes,howcan i move it and do any change,
can let the sql data do not lose,
andrun well in the feature ?
View 14 Replies
View Related
Mar 28, 2007
I've rented a dedicated server that comes with Red Hat Enterprise Linux 4 and MySQL 3.23 but I need at least MySQL 4.1 or higher. My knowledge about GNU/Linux is very limited, so I've read some documents at mysql.com and now I think I have to follow these steps:
1. Uninstall MySQL 3.23 with this command line:
shell> rpm -e mysql-*.rpm
2. Install the server and client RPMs of MySQL 5.0:
shell> rpm -i MySQL-server-VERSION.i386.rpm
shell> rpm -i MySQL-client-VERSION.i386.rpm
View 2 Replies
View Related
Jun 13, 2007
I have a number of web sites on a dedicated server. Some of these web sites are a few years old. Are there any issues upgrading from MySQL 4.1 to 5.x? Are there web sites that may have compatibility issues?
View 6 Replies
View Related
Dec 18, 2007
I keep getting this error :
MySQL Error : MySQL server has gone away
How do I fix it?
my.cnf contents
Quote:
[mysqld]
safe-show-database
old_passwords
back_log = 75
skip-innodb
max_connections = 800
key_buffer = 48M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 3000
thread_cache_size = 128
wait_timeout = 90
connect_timeout = 30
tmp_table_size = 128M
max_heap_table_size = 64M
max_allowed_packet = 256M
net_buffer_length = 16384
max_connect_errors = 10
thread_concurrency = 4
read_rnd_buffer_size = 786432
bulk_insert_buffer_size = 8M
query_cache_limit = 3M
query_cache_size = 48M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM
max_user_connections = 500
[mysqld_safe]
nice = -5
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
[mysqlhotcopy]
interactive-timeout
View 5 Replies
View Related