OVH Community, your new community space.

external mysql database


jonlewi5
03-02-2010, 18:47
dammit, cant edit, crappy proxies in work

anyway, doesnt mattter iv found out about mysqlslap, so will try that

jonlewi5
03-02-2010, 18:42
Just out of interest, is there anyway i can test and log the performance as it is, just to see a comparison?

Thanks

yonatan
03-02-2010, 18:33
let us know how it worked out

jonlewi5
03-02-2010, 18:30
Once again, thank you very much...no doubt ill be back when i get stuck haha, thank you

yonatan
03-02-2010, 18:27
Quote Originally Posted by jonlewi5
Thanks very much. sounds like the perfect soloution then

Cheers very much!

Jon
small tip:

in fstab configure noatime,nodiratime for the mount point of the usb disk
also! - dont forget to chown to the mysql uid/gid the data directory.

in my.cnf
[mysqld]
datadir=/path/to/usb/mysql/dir


good luck

jonlewi5
03-02-2010, 18:18
Thanks very much. sounds like the perfect soloution then

Cheers very much!

Jon

yonatan
03-02-2010, 18:17
Quote Originally Posted by Myatu
That's sneaky Didn't know it had a USB drive attached... I wonder how many RPSes have this...
haha Sneaky , but great for mysql if you know how to play with the partitions
how comes you did not know about that ?, i used to have a bout 4 RPS machines ( upgraded to pro nowdays .. ) all had this usb drive, the one i have left ( static http host , has it but Im not using it for nothing other than swap ).

OP:
1024 of swap will be OK for a 512mb RPS server.

as the legacy Linux documentations say: "swap should be the amount of ram X2"

Myatu
03-02-2010, 18:13
That's sneaky Didn't know it had a USB drive attached... I wonder how many RPSes have this...

jonlewi5
03-02-2010, 18:08
oh cool, that would likely sort it
but isnt the swap needed?
I am only on a basic RPS so only got 512 meg of ram

Cheers

yonatan
03-02-2010, 17:56
Quote Originally Posted by jonlewi5
is that swap partiton local or on the SAN?
totally local flash drive :-)

jonlewi5
03-02-2010, 17:37
is that swap partiton local or on the SAN?

yonatan
03-02-2010, 17:20
run on your rps /sbin/fdisk -l

you will find a 2gb partition of a flash drive ( used for swap usually ), you can reformat it and create a partition for your sql ( i think 1gb will do the trick for one small blog, right? ).

Code:
 ~]# /sbin/fdisk -l

Disk /dev/uba: 2041 MB, 2041577472 bytes
255 heads, 63 sectors/track, 248 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/uba1               1         248     1992028+  82  Linux swap / Solaris

Disk /dev/sda: 21.4 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
simply
/sbin/fdisk /dev/uba

and re partition it.

(don't forget to partprobe to flush the kenrel partition table )

jonlewi5
03-02-2010, 17:10
thanks very much for the info guys.

One last thing, could i use say iptables to block all access to the sql server except for the ip of the RPS and say the ip blocks that my isp use?

Myatu
03-02-2010, 17:07
yes and yes

As for point 1, you install MySQL as usual. The few things you need to watch out for is who can access your MySQL server, and from where. But this should be considered basic security on any MySQL installation, and documentation is widely available.

If you are concerned about the traffic between the RPS and MySQL being "out in the open", you can add SSL/TLS (native to MySQL) or you create a VPN tunnel between the two (a bit more work).

jonlewi5
03-02-2010, 17:05
yeh i figured they'd be the commands

Just to clarify the, when i am say installing some new software, instead of localhost, ill be using the ip for my vm on ovh's cloud

(i know these are basic questions, just want to be sure)

Cheers

Ashley
03-02-2010, 17:03
apt-get install mysql-server mysql-client

Ashley
03-02-2010, 17:03
Yes to both.

jonlewi5
03-02-2010, 16:56
I host a couple of sites from an RPS. It has been fine for hosting just static websites.
BUT
i want to host a wordpress blog on there aswell, reading through the forum, iv seen the general feeling on here is that mysql and an rps dont go together so well, well now i agree, the site is sooo slooow to load.

So instead of paying up the 50 pound setup fee renting another dedicated server, i thought i could try just hosting the mysql database on ovh's new cloud system.

I know its currently in beta and it will likely get wiped soon, this just a test to see if its any improvement performance-wise.

Two questions though..

1) is this easy to do, iv never triedd doing this.

2) am i likely to see a performance boost from doing this.

Thanks
Jon