Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Replication Secure


I'm about to jump into the world of mysql replication, but am wondering if the connection between database servers is secure seeing as how they will have to communicate across the internet.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Non Networked = Non Secure
mySQL looks good for a Network. BUT as a standalone it is not secure.Open anytable.MYD in a hex editor and you can see the data.So we can't sell our software to clients on wind98.

Believe it or not we have had a lot of success selling software with a proprietary database where the data is in 'unusual' format.
Clients are happy because casual snoopers can't see personal data,and we dont promise "strong" security.

Security through obscurity works!I wish mySQL had even a touch of obscurity in its MYD files.

Transaction Secure Code
When executing a specific query, I need to lock the db to ensure that no data is altered while the query executes.

My question is: Do I need to take a ROLLBACK on the db to release the lock, or is it enought just to set autocommit=1 again?

Simplified example of how I do it now:
SET AUTOCOMMIT=0
BEGIN
SELECT .......bla bla bla <execute some php code based on the result>
ROLLBACK
SET AUTOCOMMIT=1

Example of how I want it to be:
SET AUTOCOMMIT=0
BEGIN
SELECT .......bla bla bla <execute some php code based on the result>
SET AUTOCOMMIT=1

Are there any downsides by not using ROLLBACK in the second example? The database has not been altered in any way.

How To Secure My Mysql Database From Others?
1) if somebody else knows my mysql database username and password ( username with all permissions ) can they copy my database even if they do not know my control panel password?

2) Suppose I have placed my database username and password in a .php file in my file manager not in the admin folder, is there any possibility for others to steal my username and password?

3) what steps should I take to secure my mysql database from hacking and all such unwanted dangers.

How To Store Secure Password
I want to store password in encrypted format(Non visible i.e *** ) in mysql tables?

Designing A Secure Database?
I'm working on a website/database deal, and right now I'm designing the
security model.

It's using LAMP(HP), so all the tricks are going to be through PHP.

First off, this will be behind a firewall with SSL encryption. We may also
setup some kind of VPN tunneling.I'll be ignoring other security details
that don't apply to the problem at hand, but please feel free to suggest.

I'm going to have users enter a username and password, with PHP emulating
the htaccess dialogue boxes. I would like to check the entered values in a
permissions table. This table looks like:

username | passwordhash | ipaddress | permission

All users will have a static IP, so they have to match the
username-password-ipaddress combination. I'm storing the passwords as an MD5
hash in case someone breaks in and reads the table.

So what MySQL user does PHP log onto as the database as, in order to read
the permissions table? (After that, we just go with the logged user's
permission). If I make a special user that just has permission to read the
permission table, do I have to store that user's password plaintext in a php
script somewhere, thus adding a security risk if someone were to get a hold
of that password?

Making Secure Database
how would i go about making my database as secure as possible so users information is kept as safe as possible....

at moment i am using md5 encryption for their passwords... does any1 recommend anything else ?? and also in general to keep my data as safe as possible..... will web hosts deal with keeping mysql database secure or should i do sumting against it?

C API Secure Client Connections
Any idea where can I get a copy of the libmysql dll with ssl enabled?

Secure Backup On Win32 Systems?
mostly for unix platforms.

On win32, what is the best way to run a secure mysqldump so that my
password doesn't have to live in a script somewhere?

I'm using perl scripts to kick off my backup commands.

How Do I Enable Query Logging? Is It Secure?
How do I enable query logging? I am using version 4.1.22-standard

From Test Environment To Secure Commercial Use.
I'm relatively new in the database administration field. Uptil now I've only tried MySQL together with PHP in a test environment. I would appreciate if someone could answer a couple of question, I have regarding commercial use and a secure professional configuration.

Uptil now I've used XAMPP as my installation on my own computer on localhost. Now we'll install the same software package on a server. I guess XAMPP and PHPmyAdmin is not a professional setup right?

Questions:
1. What is the best recommended and professional setup for commercial use?
2. What is the best GUI for the database?
3. What is Frontend and Backend?
4. Backup setup? Just if anyone have some recomendation.

I've built a web based dynamic Content Management System in PHP and MySQL for internal use. Using the localhost as the developer platform. I've never before built something like this for commercial use.

5. How do best implement this system on our companys server, so we all can use the system?

Secure Backup On Win32 Systems?
i know items have been posted before, mostly for unix platforms.

On win32, what is the best way to run a secure mysqldump so that my
password doesn't have to live in a script somewhere?

I'm using perl scripts to kick off my backup commands.

Mysql Connection - Plain Text Or Secure
Are mysql connections over the internet plain text or are they encrypted.
If not encrypted is there a way to encrypt them?

Replication
Is it possible, and what are the ramifications, of having a single slave replicate from three masters? I have six machines, three real servers with three replicating. Be nice to free up two machines and have just a single 'slave'.

Replication
I have 3 databases replicating (ver 3.23) A to B and B to C

On C I want to modify one of the tables and add a column. Tables A and
B will not have this new column added. Will this cause a problem
replicating data form B to C?

Replication
I have a *big* problem and before solving this problem I cannot go productive with my application. Pleas help me to find a workaround.

I have two host (A and B).
I have setup a replication (from A to B).
binlog-do-db=db1 (only db1 will be replicated from A to B).

Consider the following example:

1) On host A:
mysql
use test;
create database db2; (db2 is created only on host A)
quit

2) On host A:
mysql
drop database db2; (this command is replicated on host B)

After step 2 the replication stop.
On host B the command "show slave status" report the following error:

Last_error: Error 'Can't drop database 'db2'. Database doesn't exist' on query 'drop database db2'. Default database: ''

The problem is that if I log into host A, the commands executed before the command "use" are replicated to host B.

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:

Replication
I am trying to set up replication on 2 servers. I am following the procedure on mysql.com.
After you have done the grant replication and the snapshot, you have to do SHOW MASTER STATUS; and it is suppose to return informations. But for me, it returns "empty set".

Replication
I have 3 databases replicating (ver 3.23) A to B and B to C

On C I want to modify one of the tables and add a column. Tables A and
B will not have this new column added. Will this cause a problem
replicating data form B to C?

Replication
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???

Replication
I have MySQL 3.23.41 on a RH-7.2 Linux used as local server. I'm trying to replicate the databases from server (192.168.0.1) to another linux PC (192.168.0.3).

Following the manual, i grant to the master a user with file privileges, and edit both my.cnf files. The master starts fine but the slave mysql.log shows up an error:

Slave thread: error connecting to master: Access denied for user:
replica@localhost' (Using password: YES) (0), retry in 60 sec

Replication
I have 2 MySQL servers (windows environmment). I want to setup one way replication between them; Server B must contain the same data as Server A, but if change data on Server B, this change may not be propagated to server A. Is this possible and how do I proceed?

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.

Replication
I'm replicating just a few tables from the master to the slave.

Sometimes the slave stops with the following error :
"Error 'Table 'xxx' doesn't exist' on query.

That table only exists on the master, and I don't want it on the slave.

Replication
I was running replication successfully for months. I had to increase the max_allowed_packet variable on the master db for other needs. When I did this I noticed that replication stopped working on my slaves. The error on the slaves said the the bin log on the master or the relay log was corrupt.

Replication
I set up a replication with MySQL 4.0.13, it works very fine, but
unfortunately only for several hours (between 10 and 30 hours) Has
someone an idea why the replication stopps?

Replication
I want to ask whether I can do replication in the following case.

innodb (master) --replication --> myisam (slave).

Replication

I have 2 servers, A and B. A is the primary server and master in mysql.

B is the redundant server and the slave in mysql. A is replicating to
B. Now A fails and B becomes the primary server (still slave in
mysql?). A finally comes back up, but instead of switch primary status
from B back to A, A becomes the redundant server and B stays as
primary. Now, I need B to be master in mysql and A to be slave in
mysql.


I don't know if this can be done the way it needs to. If it can I
really don't need a step by step process unless someone is really
willing to give that to me. I just would like to know if this can be or
has been done.

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?

Replication
Can I get the master (or slaves) to automatically remove the binary
logs once they are processed by all slaves?

It says in the mysql manual :
If you are using replication, you should not delete old binary log
files until you are sure that no slave still needs to use them. For
example, if your slaves never run more than three days behind, once a
day you can execute mysqladmin flush-logs on the master and then
remove any logs that are more than three days old. You can remove the
files manually, but it is preferable to use PURGE MASTER LOGS, which
also safely updates the binary log index file for you (and which can
take a date argument as of MySQL 4.1). See Section 13.6.1.1, "PURGE
MASTER LOGS Syntax".
http://dev.mysql.com/doc/refman/4.1/en/binary-log.html

This seems to suggest that you need to estimate an amount of time it
will take for all slaves to be up to date, or have processed all the
binary log files. If this is the case, how do you take into account
something going wrong with the slave/s by not deleting the binary logs
if this happens?

It seems like a better idea to just remove the binary logs when the
master has full evidence that all the slaves have correctly processed
them (I/O thread retrieved them)... is there a way to do this?

Replication
I have 3 databases replicating (ver 3.23) A to B and B to C

On C I want to modify one of the tables and add a column. Tables A and
B will not have this new column added. Will this cause a problem
replicating data form B to C?

Replication
i've this error

:-(


************************************************** **********************
***********************
030710 22:36:43 Slave: connected to master 'repl@217.58.xxx.yyy:3306',
replication started in log 'webserver-bin.054' at position 73
030710 22:38:53 Error reading packet from server: (server_errno=0)
030710 22:38:53 Slave thread killed while reading event
030710 22:38:53 Slave thread exiting, replication stopped in log
'webserver-bin.054' at position 1120
030710 22:38:58 Slave: connected to master 'repl@217.58.xxx.yyy:3306',
replication started in log 'webserver-bin.054' at position 1120
************************************************** **********************
***********************

I've tried to do also

Reset master

On the master before lock tables without result.

Replication
Am Working on a distributed database system.My idea is using replication by having several slaves running on one machine and they all connected to different masters each on different machines at the branches.

First question is this best approach?
Second question is can different slaves with different parameters run on the same machine and if possible what key things must i look for?

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 .

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).

Replication
the host should not be an IP address. I even checked the hostname of the machine and it is correct. I tried adding the correct host name to the username when connecting. Still get the same error. I even tried granting replication to 'repl'@'%' for all hosts and it still givess access denied to 'repl' @'10.68.0.1' tried granting replication to 'root'@'10.68.0.1' and it still gives me access denied. Tried grant all to 'repl'@'%' and 'repl'@'10.68.0.1' and it still gives me ACCESS DENIED. I did flush privileges after each grant statement.

Replication Of DB
How the replication of DB can be done?

Replication
I have setup replication between 2 different servers (1 master, 1 slave)
When I insert a new record into the master, it replicates to the slave.
When I update a record on the master, it does not show up on the slave.
Is this an issue that anyone has seen before?

Replication And HA
I have a mysql cluster with circular replication. Can I add one more slave to this existing cluster with one-way replication and use the new slave (with one way repllication) to direct all my reads to this slave and also continue with the existing circular replication.

Replication
I have a large Mysql database and about 500,000 users on my site. I have
installed a load balancer and 4 apache servers but only have 1 mysql server.
Recently, my database server crashed and my site was offline because of
this. While it was down less than an hour, I would like to eliminate this
problem in the future. Would replication help? Meaning if my main database
server went down, I could switch my application to use the second database
server until the main one come back online? I have also thought about having
my application write to 2 databases, but there has to be a simpler way.

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.

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)

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.

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?

Replication
I have an office computer that uses a MySQL database. What I need to set up is an online duplicate of that database so various data can be displayed via a new website.
What is the best way to upload the database along with new records on a daily (or on demand) basis?
Ive been reading about replication but Im not sure this is what I'm after. Would a php script do it? It needs to be user friendly for my office worker she has limted computer skills.

Replication?
I'd like to create a setup where there are exactly 2 masters which
need to be synchronized against each other. The two masters should
have read+write access, but don't have a permanent connection to each
other. One will be on a LAN-server, the other instance will be
installed on a Windows-client-laptop which can be taken along the
road. When coming back to the office, we need to sync the changed
data.
is there any tool that will allow me to do so ?

Replication
I get the following error when I show slave status on the slave:

Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
I've run the mysqlbinlog on both the master and slave but am unsure of what to do with it.I've tried the SET GLOBAL SQL_SLAVE_SKIP_COUNTER to 1 and 2 and then stop/start the slave and my SQL slave thread still wont' run.

Replication
If I run RESET MASTER on the primary MySQL server (the master) will it wait till the slaves are up to date before deleting the bin files or do you think my slaves will get screwed up?

Replication
I am confused about MySQL replication. I had someone set it up for me on my server and it works for what is already there. If I add a new database to the master db it doesn't seem to carry over to the slave. Is Replication for the entire MySQL server or is it database specific?I keep reading the manual and it looks server specific but I'm not getting new dbs over on the slave. Do I need to restart the slave?

Replication
Has anyone ever had any issues with the LongBlob datatype and replication.
I'm using 4.1.14
I got it working perfectly, it did thousands of queries and then when I did a show slave status. the sql thread was running but the I/O thread was not. I got the log_position and it's a longblob, microsoft word doc. huge binary string. I tried to stop slave; the skip_position = 1 thing, then start slave, but the I/O still wouldn't start up? I'm not sure how to get it back going or fix the longblob problem. I got no errors on the slave, the I/O is just dead, seemingly irreversable.


Copyright © 2005-08 www.BigResource.com, All rights reserved