MySQL Replication For User On Shared Server

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


ADVERTISEMENT

MySQL Replication

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

MySQL Replication

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

MySQL Replication/Failover

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

Mysql Replication Stopped

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

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 View Related

MySQL Replication.. Effective?

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

Mysql Master-slave Replication

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

MySQL Replication Setup With 150 Queries/sec -> Major Lag

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

MySQL Overload Server, Wich User

Jul 5, 2007

how check which database / user MySQL overload the server?

View 2 Replies View Related

MySQL Load Balancing (Shared Server) - Possible?

Sep 26, 2007

Just wondering if mysql load balancing is possible in a shared environment.

Example:

I have 3 shared accounts. On one server, I have the write and the 2nd and 3rd server I have the read (select). Or vice versa .. Would it be possible to create a php script to perform this function?

View 2 Replies View Related

Connect To MySQL DB Only On Certain User

Apr 20, 2009

I am using cPanel 11 (stable release) on a CentOS 5 server and would like to make it so that a certain database can only be connected to from the cPanel user that it is under (ie. user1_db can only be connected to from the user "user1" on the same server).

View 9 Replies View Related

How To Find Which Mysql User Is Using All Cpu

Nov 13, 2008

31015 100 15 0 151m 35m 5156 S 28 0.4 379:34.10 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql

This is my top process, I have quad core server and because of this server load is over 10

I am using cPanel, is it possible to trace which user is using all this cpu?

View 6 Replies View Related

Wich User Have More Mysql Process?

May 25, 2009

How can see wich user have more mysql process?

View 2 Replies View Related

Allow User To Remote Mysql Connection

Aug 15, 2008

how to allow user to remote mysql connection from his localhost ( in linux server with WHM )

my user wants to connect to the mysql from his localhost

View 7 Replies View Related

MySQL Forgetting User Permissions

Jul 5, 2007

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 3 Replies View Related

Mysql/user Is Marked As Crashed

Jan 30, 2007

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 7 Replies View Related

What Are Common MySQL User Permissions

Jun 29, 2007

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 3 Replies View Related

Backup Mysql User Privileges

Aug 26, 2007

how do i backup mysql user privileges?

this will only backup the databases:
mysqldump --opt -u root -p --all-databases > data.sql

i would like to backup mysql user privileges too.

View 1 Replies View Related

MySQL Anyway To Log Queries Of Specific User

Jun 5, 2007

I know about the general log but want to just log queries of a specific user. Our database does 400 queries/s on a slow day, so I think it would be a pain to grep though a huge log like that. And, im not sure if it would cause any preformance issues.

View 0 Replies View Related

Default Host For Mysql User

Aug 7, 2007

By default, mysql will create user with host as 'localhost'. Now, if I want the host is '1.2.3.4' by default, how to configure it?

View 3 Replies View Related

Change Mysql User Password Via Shell?

Jun 8, 2005

Anyone know the commands to change a MySQL user's password via ssh?

I found stuff for changing the root password, and tried to adapt it for the user, but it didn't work.

View 12 Replies View Related

Mysql User Privilege Changed By Cpanel Or What

Jun 26, 2008

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 4 Replies View Related

MySQL: Access Denied For Root User

Oct 25, 2007

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 8 Replies View Related

Plesk Automation :: Set User And Privileges From Mysql

Jul 3, 2014

I'd want to create a user and set custom privileges using the standard mysql-client, ie. create user and grant privileges, but I know that sometimes Plesk overwrites my config files for other services.

View 2 Replies View Related

DNS Replication

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







Copyrights 2005-15 www.BigResource.com, All rights reserved