MySQL Replication For User On Shared Server
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 Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
MySQL Replication
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 Replies!
View Related
MySQL Replication
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 Replies!
View Related
MySQL Replication/Failover
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 Replies!
View Related
MySQL Replication Setup
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 Replies!
View Related
MySQL Replication.. Effective?
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 Replies!
View Related
Mysql Master-slave Replication
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 Replies!
View Related
MySQL Replication Setup With 150 Queries/sec -> Major Lag
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 Replies!
View Related
MySQL Forgetting User Permissions
Does anyone know what could be the cause of this issue? I located a few others over at cpanel.net that have this problem, but no solution has been found. [url] I am running a VPS server with the following: WHM 10.8.0 cPanel 10.9.1-S14304 RedHat 9 i686 - WHM X v3.1.0 phpMyAdmin - 2.9.0.2 MySQL client version: 4.1.10 mysql version: 5.0.27-standard I have a database user that needs "Super Privileges" and so this was done. However, when Cpanel is updated the user permission is reset automatically from "ALL PRIVILEGES" to "USAGE". Here's a look at the database permissions from phpMyAdmin. Code: User Host Password Global privileges Grant hello localhost Yes ALL PRIVILEGES Yes hello_ % No ALL PRIVILEGES Yes hello_ localhost No ALL PRIVILEGES Yes The user "hello" loses its "ALL PRIVILEGES" and switches over to "USAGE" if an update is triggered. Updates to cpanel, creating/removing a database/user, and updating the account password will cause the switch.
View Replies!
View Related
Mysql/user Is Marked As Crashed
I am trying to start mysql but i am getting the following error MySQL manager or server PID file could not be found! [FAILED] Starting MySQL................................... [FAILED] I checked my hostname.err file in /var/lib/mysql and this is the error message it shows. 070130 17:59:41 mysqld started 070130 17:59:42 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and should be repaired 070130 17:59:42 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and should be repaired 070130 17:59:42 [ERROR] Fatal error: Can't open and lock privilege tables: Table './mysql/user' is marked as crashed and should be repaired 070130 17:59:42 mysqld ended how I would repair that to get mysql to start again?
View Replies!
View Related
What Are Common MySQL User Permissions
I want to use something like PHPBB forums and using one MySQL user and database. Just wondering, what are common user permissions I should set for the user? I want to try to minimize any permissions that can cause big risk to the server security. Here is a full list of permissions I can grant to the user (via Webmin): -Select table data -Insert table data -Update table data -Delete table data -Create tables -Drop tables -Grant privileges -Reference operations -Manage indexes -Alter tables -Create temp tables -Lock tables
View Replies!
View Related
Mysql User Privilege Changed By Cpanel Or What
I am using Cpanel. One Cpanel account is backup. I use it to backup my database. Under mysql, I gave this account ( backup ) many priviledges. But when the backup script ran, error said that backup account can not 'lock table'. I gave "lock table' priviledge again and run the script, it is ok. But after a while, when the script ran autmatically on daily basis, it lost the 'lock table' priviledge again. I wonder if Cpanel is messing me up? What can I do about it? anyone knows?
View Replies!
View Related
MySQL: Access Denied For Root User
When I deleted a database, the user apparently was orphaned because when I tried to recreate it, it returned "user already exists". I've never encountered that problem although from Googling, I see others have and they delete the user to get around it. When I log into mysql using the da_admin@ account and attempt to remove the user with drop user <user_name>; I receive the following error message: ERROR 1227 (42000): Access denied; you need the CREATE USER privilege for this operation It seems I don't have rights even as the root user. How can I get remove the orphaned user?
View Replies!
View Related
Weird MySQL: User/pass Stops Working After A While
I am having a very strange problem with 2 different cPanel accounts on a server with 500-600 accounts. For some reason after a day or two the mysql username/password stops working. We have tried changing the MySQL user and the password with no success. The log does not indicate that the MySQL password was changed in any way. Only these 2 accounts are affected and this problem occurred at least half dozen times each. Again: these are two different accounts with 2 different MySQL users that after a while stop working (I am unable to determine if they stop working at the same time b/c they belong to different customers). When we reset the user (with the same pass) it works for a day or two. I have checked to connect not only from PHP but also from shell when it's down: it also doesn't work so this is a pure MySQL problem. Also on the server we have Fantastico.
View Replies!
View Related
Granting MySQL Command Line Permissions To A User
Is there any safe way to grant command line permissions to a user/specific account? One that only allows them access to databases on their account. The problem is that this user intermittently runs queries that cause their database to hang (including PHPMyAdmin, so they can't view the processlist through there), and I have to manually kill that process, because they can't. Server is 2.4.21 with MySQL 4.0.27, admin is cPanel WHM.
View Replies!
View Related
Shared Host , Reliable Mysql
I know there are a million "looking for cheap shared hosting" threads. Hopefully my particular values/interests justify a new one. I'm a (mostly PHP/MySQL/CMS) web developer, using Dreamhost for years (perhaps DH was better back then) to host staging/development sites for clients (once I've developed a client site, I usually make them get their own host somewhere more reliable), as well as for low-traffic sites, transferring files, etc. What I don't like about Dreamhost: a) SLOW. my guess is this is 25% web server overselling, and 75% MySQL server overselling. My simple sites are tolerably slow - including lightweight php/mysql sites (textpattern CMS, etc.) - BUT my Drupal and Silverstripe and ZenCart experiments are intollerable (5+ second page loads). b) funny ownership policies - I can't (easily) create a client FTP user that is restricted to one of my subfolders. Each user = exclusive file/folder ownership. c) not much else. I seem to get a-little-too-frequent DNS problems/outages, and used to get a-little-too-frequent server lock-ups... but I don't expect perfection from a cheap host. And of course I send my mail through google apps, I wouldn't trust a cheap host with my mail. What I like about Dreamhost: a) the control panel functionality. Yes, it's ugly, but god it does a lot of nice stuff that cPanel doesn't (and frankly, cPanel is usually ugly too). b) the usual: a very low price for unlimited domains, unlimited mySQL, and huge storage. So, who is my next low-cost host? a) Interested in MySQL performance/protection - perhaps hosts that put MySQL [and mail] on separate servers, like DH, but don't overload them!?! Do I need to worry about this? b) I wouldn't mind moving to a reseller account c) I'd like a progressive control panel; I have clients on medialayer - who use directadmin (nice) - but their pricing structure is a bit tight on domains/db/storage. [As an aside, medialayer provides excellent shared hosting performance/value/support, if you don't need a lot of domains/db/storage] d) I'd like to stay in the $10-20ish a month range
View Replies!
View Related
DNS Replication
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 Replies!
View Related
Exchange Replication
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 Replies!
View Related
Shared Hosting With Good Mysql Performance
I'm going to be rolling out a php/mysql driven site soon and I'm pretty much resigned to the fact that the mysql performance dreamhost has given me isn't going to cut it, its probably too oversold. Simple one table one column selects can take 30 seconds or time out depending on how badly the server is being hammered. HTTP requests are usually snappy, but the mysql performance is bogus. What is a good host for me to launch this site with? Storage wouldn't need to be too terribly high, at least initially. I'm tempted by MediaTemple's slick marketing, but I've seen on here that some people have had poor sql performance (contrary to what some personal friends have experienced, so I'm torn). I was reading about downtownhost on here, but their load times seemed slow when I hit a couple domains listed on here that are hosted by them. This host needs to be located in the US. Honestly, I like dreamhost and their panel, save for the sql sluggishness I'm getting.
View Replies!
View Related
MySQL 5 & Shared Hosting Security
MySQL 5.0 supports stored procedures -- but is it safe to allow shared hosting customers to have privileges to create them? If the procedures are global, does that mean that: a) one customer could write a procedure which accessed another customer's data? b) any customer could call a procedure created by a different customer? c) any customer could override an existing mysql function in a way that would affect other customers? d) any customer could write a function that bound to a system library and crash the entire server instance?
View Replies!
View Related
MySQL Usage Limitations In A Shared Hosting Environment
One of my friends uses a popular shared hosting provider, and I was assisting him with a web site issue earlier. I noticed the following warning in the host's control panel: "[MySQL databases] may not be used for log evaluation operations, ad clicks, chat systems, banner rotations, or similar applications putting extreme loads on the database under any circumstances." Is this common at other shared hosts?
View Replies!
View Related
Windows - Realtime File Share Replication
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 Replies!
View Related
Make Site Load Faster Other Than Replication?
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 Replies!
View Related
Reliable Shared Host Plan With PHP 5.2.+ With PDO Drivers & MySql 5.+
I switched to HostGator because they had PDO drivers enabled on shared hosting plans with PHP 5 & MySql 5. The problem is that every time they update PHP (4 times in 8 months now) they don’t include PDO in the build and its takes day to get past level 1 support and get it fixed. So I’m looking for a “Reliable” host. I had a hard time when I switched to HG finding shared hosting plans with PDO enabled.
View Replies!
View Related
Load Balancing / File Mirroring & Replication - Microsoft IIS Servers
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 Replies!
View Related
Single User Can't Access Any Site On My Server
I have a user who says he cannot get to any site on my server from either home or work. He has been a user for many years, and has never had any problems. He has also checked with his IT at work and they confirmed the site is not available. He is computer savvy, so I trust he is telling the truth. His work and home are only 10 miles apart. Do you guys have any ideas what could be happening? Is there a DNS entry wrong somewhere? He can't access the site even when putting in the IP address. There is one other user reporting something similar but other than that no other complaints. The site works fine for everyone else. site is gm-trucks.com
View Replies!
View Related
Can Not Login To Decated Server By Root User
i can not login to my decated server by using root. the password is not correct.. becasue i did something wrong with my server. i used chmod 777 -R /public_hmtl and chown to modify my server. and i can not login anymore, LT asked me to reload my server, do i need to reload it?
View Replies!
View Related
Plesk IIS WP User & Compromised Server
My server (using plesk 8.1 on windows 2003 server) has been compromised with some sort of rootkit and I'm investigating vulnerabilities. This server hosts some of my asp.net applications and I have to grant Modify Permission to IIS WP (iwam_plesk) user on Some subfolders (under Httpdocs folder for each domain). Is it a security problem? if yes, how else can I allow asp.net applications to write to, say, an Access db?
View Replies!
View Related
Adding Of User Defined Services In Windows 2000 Server
Just checking how do I add a Windows Defined service in Windows 2000. I saw some info. But it seemed to apply to Microsoft Windows 2003 Server as there isn't instsrv or srvany in Windows 2000 server even after I uploaded the Resource Kit Tools. Am I missing something? Or can someone tell me where to download these for Windows 2000?
View Replies!
View Related
MySQL Error : MySQL Server Has Gone Away
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 Replies!
View Related
I Have A WHM/cPanel Server Shared Server
I just had user KILL the server using 80% CPU and 30% ram. Processor #1 Vendor: GenuineIntel Processor #1 Name: Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz Processor #1 speed: 2331.000 MHz Processor #1 cache size: 2048 KB Memory: 4039468k/4718592k available (2494k kernel code, 144784k reserved, 1262k data, 200k init) with 1TB HDD How can I restrict him or anybody else from doing this? MySQL was in the next top useage... his site runs a HUGE DB... Have the following edits Code: /etc/my.cnf [mysqld] safe-show-database skip-innodb max_connections = 800 key_buffer = 96M myisam_sort_buffer_size = 64M join_buffer_size = 2M read_buffer_size = 2M sort_buffer_size = 3M table_cache = 1800 thread_cache_size = 128 wait_timeout = 900 connect_timeout = 10 tmp_table_size = 128M read_rnd_buffer_size = 524288 bulk_insert_buffer_size = 8M max_allowed_packet = 16M max_connect_errors = 10 query_cache_limit = 2M query_cache_size = 192M query_cache_type = 1 query_prealloc_size = 16384 query_alloc_block_size = 16384 [mysqld_safe] open_files_limit=8192 [mysqldump] quick max_allowed_packet=16M [myisamchk] key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M
View Replies!
View Related
|