There is a lack of documentation on how to do this, I guess they assume that you must know a lot IF you are trying to use this library.
But here are step by step instructions on how to do it.
What you need
Root access to your server.
An SSH client, like putty, it’s free.
Let’s do it
1 – Run your SSH client and connect to your server using root.
2 – Do:
cd /
Note: I always make a folder like this
mkdir Tools
cd Tools
Note: This is version 3.0.9 obviously, it’s best if you check this web page and download the latest source code: http://www.tangentsoft.net/mysql++/
wget http://www.tangentsoft.net/mysql++/releases/mysql++-3.0.9.tar.gz
tar xvfz mysql++-3.0.9.tar.gz
cd mysql++-3.0.9
./configure
make
make install
3 – Now, in order for:
To work, you will have to add a line to your ld.so.conf; you will find this file (hopefully) in /etc so go to:
/etc
And edit ld.so.conf and add this line to the end of it:
/usr/local/lib
Note: If ld.so.conf is not in /etc you can try “whereis ld.so.conf” (no quotes)
Save it and run:
ldconfig
And you are all set.
Please also note that, this worked on my CentOS and might not work exactly like this on your distribution.
Installing MySQL++; How to install MySQL++ on Linux-CentOS
I developed a large website for a client and in the past month we were getting a lot of traffic.
It was in a way that the server had problems handling the traffic and my client wanted to get another server to load balance the traffic between the two.
Pages on this site are generated from 10 to 25 MySQL queries and these queries are optimized but consider this, if there are 1,000 request for a page with 25 queries in a very small period of time, that would be 25,000 queries. 25,000 queries + processing them could lead to huge server loads.
So we used PHPCache to cache the results of those queries for just 1 minute, not an hour or a day, just one minute and it made a huge difference.
The difference was that we cached all 25 queries plus the time it took to process them using PHPCache and now to handle 1,000 requests we were querying the database only 1,000 times.
I think this site can easily handle 10 times more traffic now.
How PHPCache saved us from buying another server
You can move a column in a MySQL table to another position like this:
ALTER TABLE name_of_the_table MODIFY column_to_move tinyint(1) DEFAULT '0' AFTER column_to_move_after
Note: the part with: “tinyint(1) default ‘0′” is necessary and it should be the exact definition of your column.
For example yours might be:
int(10) unsigned NOT NULL auto_increment
or
int(10) unsigned NULL default ‘0′
or
…
How to move a column’s position in a MySQL table