<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>robertalks.com &#187; mysql</title> <atom:link href="http://blog.robertalks.com/index.php/tag/mysql/feed/" rel="self" type="application/rss+xml" /><link>http://blog.robertalks.com</link> <description>here I talk</description> <lastBuildDate>Tue, 01 Nov 2011 17:30:19 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>buh.bz updated, using MongoDB now!</title><link>http://blog.robertalks.com/index.php/2011/02/14/buh-bz-updated-using-mongodb-now/</link> <comments>http://blog.robertalks.com/index.php/2011/02/14/buh-bz-updated-using-mongodb-now/#comments</comments> <pubDate>Mon, 14 Feb 2011 09:00:54 +0000</pubDate> <dc:creator>robert</dc:creator> <category><![CDATA[News]]></category> <category><![CDATA[buh.bz]]></category> <category><![CDATA[datanase]]></category> <category><![CDATA[MongoDB]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[short url]]></category> <guid
isPermaLink="false">http://blog.robertalks.com/?p=1036</guid> <description><![CDATA[Great news for one of my projects, buh.bz, was fully rewritten by Disassembler and now using MongoDB. Well first of all, buh.bz, was using phurl code, which was OK, but not quite there, then Disassembler started to rewrite a lot of the code, which at the time still was using MySQL and then some time [...]]]></description> <content:encoded><![CDATA[<p>Great news for one of my projects, <a
href="http://buh.bz" target="_blank">buh.bz</a>, was fully rewritten by Disassembler and now using MongoDB. Well first of all, <a
href="http://buh.bz" target="_blank">buh.bz</a>, was using phurl code, which was OK, but not quite there, then Disassembler started to rewrite a lot of the code, which at the time still was using MySQL and then some time ago we decided to fully move away from SQL, in this case MySQL and start using <a
href="http://en.wikipedia.org/wiki/Mongodb" target="_blank">MongoDB</a>, something similar what Facebook is using for databases.</p><p>This ideas should make <a
href="http://buh.bz" target="_blank">buh.bz</a> like 10 or even more times faster then before. Also the code was clean-up, which again it should speed up the code creation and redirection.</p><p>Also on the design part, there some small nice things added, like hidden &#8220;Custom alias&#8221;, nice error reporting, small statistics and Top 5 of the most clicked short URLs.</p><p>Well that&#8217;s about it, the only thing I can add here is to thank Disassembler, for the great work until now, and hopefully in the future more and more improvements will be added to <a
href="http://buh.bz" target="_blank">buh.bz</a></p> ]]></content:encoded> <wfw:commentRss>http://blog.robertalks.com/index.php/2011/02/14/buh-bz-updated-using-mongodb-now/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>New theme, new logo, new server, new setup&#8230;</title><link>http://blog.robertalks.com/index.php/2009/10/27/new-theme-new-logo-new-server-new-setup/</link> <comments>http://blog.robertalks.com/index.php/2009/10/27/new-theme-new-logo-new-server-new-setup/#comments</comments> <pubDate>Tue, 27 Oct 2009 08:53:22 +0000</pubDate> <dc:creator>robert</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[News]]></category> <category><![CDATA[2.6.31.5]]></category> <category><![CDATA[blog]]></category> <category><![CDATA[kernel]]></category> <category><![CDATA[lighttpd]]></category> <category><![CDATA[logo]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[Mystique]]></category> <category><![CDATA[php-cgi]]></category> <category><![CDATA[robertalks.com]]></category> <guid
isPermaLink="false">http://blog.robertalks.com/?p=702</guid> <description><![CDATA[As some of you may have notice, my blog have change in every way possible. There is a new theme, new logo, new server and web server setup. Now when it comes to the new setup, I am talking about lighttpd with php-cgi. I&#8217;ve been testing this option for a bit and seemed the right [...]]]></description> <content:encoded><![CDATA[<p>As some of you may have notice, my blog have change in every way possible. There is a new theme, new logo, new server and web server setup. Now when it comes to the new setup, I am talking about lighttpd with php-cgi. I&#8217;ve been testing this option for a bit and seemed the right one to go with. <a
href="http://www.lighttpd.net/" target="_blank">Lighttpd</a> seems to work quite fine and the speed it&#8217;s really good, but there are some issues, it&#8217;s quite complicated to configure lighttpd. I mean, the style of configuration is a bit odd, but in general if you worked some time with web servers, you will get it, anyway I did.</p><p>The new theme, again is also new and it&#8217;s called <a
href="http://wordpress.org/extend/themes/mystique" target="_blank">Mystique</a> and seems a very good option at the moment. It uses jQuery, making the theme and in general the blog look and feel nicer. When it comes to the logo, you will notice a mix between &#8220;Robin&#8217;s logo&#8221; (Batman&#8217;s right hand) and a normal text, all done in Adobe Photoshop.</p><p><span
id="more-702"></span>Because change was need it, not just for the looks, but also for the speed of the blog, the blog was moved to a more powerful server, which seems to have a bit of more kick in it and handles the requests faster and maybe even better.</p><p>The next logical move, would be to switch from the current MySQL server, which is 5.0.x to 5.1.x which suppose to be the production version and I also believe it would work better too. I&#8217;m not sure when I will move to the newer MySQL version, but today or tomorrow I will try to build it. This might mean the blog will be down until I will be able to upgrade also the database from the old version to the newer one.</p><p>Anywho, I hope that all of you, who do read this blog, or find useful thing in the blog, will find this new updates much more interesting and pleasant. Also today or tomorrow I will release the new kernel packages 2.6.31.5-firebird, which are based on kernel 2.6.31.5.</p><p>So tune in tomorrow and check and test the new kernel. Cheers!</p> ]]></content:encoded> <wfw:commentRss>http://blog.robertalks.com/index.php/2009/10/27/new-theme-new-logo-new-server-new-setup/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Perfect web server for your blog running CentOS (nginx + php-fpm + mysql)</title><link>http://blog.robertalks.com/index.php/2009/06/20/perfect-web-server-for-your-blog-running-centos-nginx-php-fpm-mysql/</link> <comments>http://blog.robertalks.com/index.php/2009/06/20/perfect-web-server-for-your-blog-running-centos-nginx-php-fpm-mysql/#comments</comments> <pubDate>Sat, 20 Jun 2009 21:39:07 +0000</pubDate> <dc:creator>robert</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Talk]]></category> <category><![CDATA[blog]]></category> <category><![CDATA[centos]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[nginx]]></category> <category><![CDATA[php]]></category> <category><![CDATA[php-fpm]]></category> <category><![CDATA[vps]]></category> <category><![CDATA[web server]]></category> <guid
isPermaLink="false">http://blog.robertalks.com/?p=510</guid> <description><![CDATA[Having your own blog this days can be a piece of cake, as there are a lot of hosting packages to choose from and also they are very cheap. Like I said, having a blog it&#8217;s not a big deal, but having a dedicated server or VPS with your own custom setup can be some [...]]]></description> <content:encoded><![CDATA[<p>Having your own blog this days can be a piece of cake, as there are a lot of hosting packages to choose from and also they are very cheap. Like I said, having a blog it&#8217;s not a big deal, but having a dedicated server or VPS with your own custom setup can be some what difficult to achieve. I&#8217;m talking about a setup which includes nginx as a web server, php-fpm as a back-end php server and mysql server as a database server. The easy way how to do this, could be by installing this packages from the distro&#8217;s repository, but again, is this case I will do it from the source code.</p><p>To start with this, we need a VPS or dedicated server, which can be a problem, because can cost some money. A VPS can cost from about $20 and up and you&#8217;ll get with this money about 256MB of RAM and maybe 10-20GB of disk space. If you need something better or faster, a dedicated server would do the job and the price for having a dedicated server would easily start from $50 and up.</p><p><span
id="more-510"></span>Remember, for this web server, we need at least 256MB of RAM and let&#8217;s say 2GB free disk space, to be able to build nginx, php-fpm and MySQL.</p><p>I will assume that we already have the VPS or dedicated server, the OS it&#8217;s already install and everything is up and running. What we need now its to download the source code of nginx, php, php-fpm patch and MySQL, then build them, install them and of course configured them.</p><p>Before we start, I have to remind you that it is possible that some builds will fail due to some missing libraries, which you will need to install at that time and the version of the applications in this post might not be the same as maybe in a month from the time I&#8217;m writing this, so this means it could be newer versions, which you will need to check.</p><p><strong><em>We do everything with user root, much more easier, the to use sudo.</em></strong><br
/> <strong>Download the source code (nginx, php, MySQL and php-fpm patch):</strong></p><blockquote><p>&gt; mkdir build<br
/> &gt; cd build<br
/> &gt; wget http://cz.php.net/get/php-5.2.9.tar.gz/from/us.php.net/mirror (php 5.2.9 source code)<br
/> &gt; wget http://sysoev.ru/nginx/nginx-0.7.60.tar.gz (nginx 0.7.60 source code)<br
/> &gt; wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.83.tar.gz/from/http://mysql.mirrors.hoobly.com/ (mysql 5.0.83 source code)<br
/> &gt; wget http://php-fpm.anight.org/downloads/head/php-5.2.8-fpm-0.5.10.diff.gz (the php-fpm patch for php 5.2.9)</p></blockquote><p><strong>Unpack the downloaded source code archives:</strong></p><blockquote><p>&gt; tar -xzvf php-5.2.9.tar.gz<br
/> &gt; tar -xzvf nginx-0.7.60.tar.gz<br
/> &gt; tar -xzvf mysql-5.0.83.tar.gz<br
/> &gt; gunzip -d php-5.2.8-fpm-0.5.10.diff.gz</p></blockquote><p><strong>Build and install the source code (start with MySQL, also we will install it, as php can&#8217;t be build without MySQL):</strong></p><blockquote><p>&gt; cd mysql-5.0.83<br
/> &gt; ./configure &#8211;prefix=/applications/mysql &#8211;sysconfdir=/etc &#8211;with-openssl &#8211;with-machine-type &#8211;with-system-type &#8211;with-mysqld-user=mysql &#8211;without-docs &#8211;without-bench &#8211;enable-large-files-without-debug &#8211;disable-maintainer-mode &#8211;without-man &#8211;with-unix-socket-path=/tmp/mysql.sock &#8211;without-debug &#8211;with-archive-storage-engine &#8211;with-low-memory<br
/> &gt; make<br
/> &gt; make install</p><p>&gt; cd ../php-5.2.9<br
/> &gt; patch -p1 &lt; ../php-5.2.8-fpm-0.5.10.diff<br
/> &gt; ./configure &#8211;enable-fpm &#8211;enable-discard-path &#8211;enable-inline-optimization &#8211;enable-fastcgi &#8211;enable-force-cgi-redirect  &#8211;prefix=/applications/php-cgi &#8211;with-config-file-path=/applications/php-cgi/etc &#8211;enable-bcmath &#8211;enable-calendar &#8211;with-curl &#8211;enable-exif &#8211;enable-ftp &#8211;with-gd &#8211;with-gettext &#8211;with-iconv &#8211;enable-mbstring &#8211;enable-mbregex &#8211;with-mcrypt &#8211;with-mhash &#8211;with-openssl &#8211;with-pear=/applications/php-cgi/lib &#8211;with-xsl &#8211;enable-sockets &#8211;with-ttf &#8211;enable-gd-native-ttf &#8211;with-zlib &#8211;enable-zip &#8211;enable-pcntl &#8211;enable-magic-quotes &#8211;enable-discard-path &#8211;with-ttf &#8211;with-freetype-dir=/usr &#8211;with-kerberos &#8211;disable-ipv6 &#8211;with-tidy &#8211;with-bz2 &#8211;enable-shmop &#8211;with-jpeg-dir=/usr &#8211;with-mm &#8211;enable-mbstring=all &#8211;with-mime-magic=/usr/share/magic.mime<br
/> &gt; make<br
/> &gt; make install</p><p>&gt; cd ../nginx-0.7.60<br
/> &gt; ./configure &#8211;prefix=/applications/nginx &#8211;with-http_ssl_module &#8211;with-http_realip_module &#8211;with-http_addition_module &#8211;with-http_flv_module &#8211;with-http_gzip_static_module &#8211;with-http_sub_module &#8211;http-log-path=/var/log/nginx/access_log &#8211;with-http_perl_module &#8211;user=www &#8211;group=www &#8211;conf-path=/applications/nginx/conf/nginx.conf &#8211;http-fastcgi-temp-path=/applications/nginx/tmp/fastcgi &#8211;http-client-body-temp-path=/applications/nginx/tmp/client &#8211;http-proxy-temp-path=/applications/nginx/tmp/proxy &#8211;pid-path=/var/run/nginx.pid &#8211;error-log-path=/var/log/nginx/error_log &#8211;with-sha1=/usr/lib &#8211;with-md5=/usr/lib<br
/> &gt; make<br
/> &gt; make install</p></blockquote><p><strong>Configure the build applications:</strong></p><p><em>- setup the mysql server:</em></p><blockquote><p>&gt; cd ../mysql-5.0.83/scripts<br
/> &gt; groupadd -g 10001 mysql<br
/> &gt; useradd -M -d /srv/databases/mysql -g 10001 -r -s /bin/false mysql<br
/> &gt; ./mysql_install_db.sh &#8211;datadir=/srv/databases/mysql<br
/> &gt; cd ../../<br
/> &gt; chown -R mysql.mysql /srv/databases/mysql<br
/> &gt; wget http://dl.robertalks.com/nginx+php-fpm+mysql/mysql -O /etc/rc.d/init.d/mysql<br
/> &gt; chmod +x /etc/rc.d/init.d/mysql<br
/> &gt; chkconfig &#8211;add mysql<br
/> &gt; chkconfig mysql on<br
/> &gt; wget http://dl.robertalks.com/nginx+php-fpm+mysql/my.cnf.txt -O /etc/my.cnf<br
/> &gt; touch /var/log/mysql-slow.log; chown mysql.mysql /var/log/mysql-slow.log; chmod 644 /var/log/mysql-slow.log<br
/> &gt; /etc/init.d/mysql start</p></blockquote><p><em>- setup php-fpm:</em></p><blockquote><p>&gt; cd php-5.2.9<br
/> &gt; cp php.ini-recommended /applications/php-cgi/etc/php.ini<br
/> &gt; groupadd -g 10002 www<br
/> &gt; useradd -M -d /srv/www -g 10002 -r -s /bin/false www<br
/> &gt; mkdir /var/log/nginx<br
/> &gt; chown www.www /var/log/nginx<br
/> &gt; chmod 770 /var/log/nginx<br
/> &gt; wget http://dl.robertalks.com/nginx+php-fpm+mysql/php-fpm -O /etc/rc.d/init.d/php-fpm<br
/> &gt; chmod +x /etc/rc.d/init.d/php-fpm<br
/> &gt; chkconfig &#8211;add php-fpm<br
/> &gt; chkconfig php-fpm on<br
/> &gt; wget http://dl.robertalks.com/nginx+php-fpm+mysql/php-fpm.conf.txt -O /applications/php-cgi/etc/php-fpm.conf<br
/> &gt; /etc/init.d/php-fpm start</p></blockquote><p><em>- setup nginx:</em></p><blockquote><p>&gt; cd ~<br
/> &gt; wget http://dl.robertalks.com/nginx+php-fpm+mysql/nginx.conf.txt -O /applications/nginx/conf/nginx.conf<br
/> &gt; wget http://dl.robertalks.com/nginx+php-fpm+mysql/fastcgi_params.txt -O /applications/nginx/conf/fastcgi_params<br
/> &gt; wget http://dl.robertalks.com/nginx+php-fpm+mysql/www.example.com.txt -O /applications/nginx/conf/host/www.example.com (this you will need to name and configurate acording to you blog/dns/system)<br
/> &gt; mkdir /applications/nginx/conf/host<br
/> &gt; wget http://dl.robertalks.com/nginx+php-fpm+mysql/blog.example.com.txt -O /applications/nginx/conf/host/blog.example.com (this you will need to name and configurate acording to you blog/dns/system)<br
/> &gt; wget http://dl.robertalks.com/nginx+php-fpm+mysql/nginx -O /etc/rc.d/init.d/nginx<br
/> &gt; chmod +x /etc/rc.d/init.d/nginx<br
/> &gt; chkconfig &#8211;add nginx<br
/> &gt; chkconfig nginx on</p></blockquote><p>So this should be the base setup for your server and of course for your blog to run, but there will be some settings which you will need to check and set depending on some different things which exist or not on your server. This configuration and setup works perfectly for my blog, which is this, from where you&#8217;re reading now. The hardware it&#8217;s not very powerful, it&#8217;s an Intel P4 at 2.8Ghz, with 512MB of RAM and 75GB disk and as I remember a 100 Mbit line. The system is running on CentOS 5.3, only 32bit kernel and its fast and very stable&#8230; don&#8217;t really think you need more then this for your personal blog and maybe web page. If you have a lot of hits on your blog, you might need a better system, not because of the web server, but because of MySQL and even php, which will start eating the resources if it&#8217;s necessary.</p><p>Do not forget, this setup is design like this:</p><p>All the applications are install in directory <strong>/applications</strong>, all the data, the blog itself, MySQL database are install in <strong>/srv</strong> and all the logs go into <strong>/var/log</strong> and <strong>/var/log/nginx</strong>. If you want a totally different configuration, then you need to modify accordingly to what you want.</p><p><em>P.S. I can not guarantee that this post will help 100% or it will work 100%. This is my way of working and doing the setup, but depends on everybody style and know-how. Do not forget to recheck the configuration of nginx, php and MySQL. Setup can differ depending on your system.<br
/> </em></p> ]]></content:encoded> <wfw:commentRss>http://blog.robertalks.com/index.php/2009/06/20/perfect-web-server-for-your-blog-running-centos-nginx-php-fpm-mysql/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Problems, Problems, Problems</title><link>http://blog.robertalks.com/index.php/2009/06/16/problems-problems-problems/</link> <comments>http://blog.robertalks.com/index.php/2009/06/16/problems-problems-problems/#comments</comments> <pubDate>Tue, 16 Jun 2009 09:09:36 +0000</pubDate> <dc:creator>robert</dc:creator> <category><![CDATA[Anything]]></category> <category><![CDATA[General]]></category> <category><![CDATA[Talk]]></category> <category><![CDATA[2.7.1]]></category> <category><![CDATA[2.8]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[problem]]></category> <category><![CDATA[upgrade]]></category> <category><![CDATA[wordpress]]></category> <guid
isPermaLink="false">http://blog3.robertalks.com/?p=454</guid> <description><![CDATA[About 3-4 days ago, I upgraded WordPress to 2.8 by using the Administration console, which just delete everything on my server, well my blog I mean. The I&#8217;ve done it manually and screw-up the rest of it, was working hard, very unstable and weird MySQL issues.
After all of this headache, I went back to 2.7.1, [...]]]></description> <content:encoded><![CDATA[<p>About 3-4 days ago, I upgraded WordPress to 2.8 by using the Administration console, which just delete everything on my server, well my blog I mean. The I&#8217;ve done it manually and screw-up the rest of it, was working hard, very unstable and weird MySQL issues.</p><p><span
id="more-454"></span>After all of this headache, I went back to 2.7.1, but I had to rebuild all the blog, get the plugins, themes and import all the post from the previous one. It took me like 2-3 hours, but it worked and now seems to work well without problems. I even had to do a new sub domain so I can make everything work right.</p><p>Anyway, I came to the conclusion that moving to 2.8, just like that may cause a lot of issue, so at the moment I&#8217;ll stick to something older, but more stable. I can&#8217;t say that it&#8217;s a bad idea to upgrade to 2.8, but from my small experience, it can be hell.</p><p>Good luck!</p> ]]></content:encoded> <wfw:commentRss>http://blog.robertalks.com/index.php/2009/06/16/problems-problems-problems/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Crap: Oracle buys Sun</title><link>http://blog.robertalks.com/index.php/2009/04/20/crap-oracle-buys-sun/</link> <comments>http://blog.robertalks.com/index.php/2009/04/20/crap-oracle-buys-sun/#comments</comments> <pubDate>Mon, 20 Apr 2009 13:17:43 +0000</pubDate> <dc:creator>robert</dc:creator> <category><![CDATA[Anything]]></category> <category><![CDATA[General]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Talk]]></category> <category><![CDATA[buy-off]]></category> <category><![CDATA[ibm]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[openoffice]]></category> <category><![CDATA[opensolaris]]></category> <category><![CDATA[oracle]]></category> <category><![CDATA[sun]]></category> <guid
isPermaLink="false">http://blog.robertalks.com/?p=353</guid> <description><![CDATA[When I believed that everything is gonna work out between IBM and Sun, this falls into place, Oracle buys Sun, something that no one saw it coming. I don&#8217;t really have issues with Oracle, but they are not really open source or not as much as I would wish, also I can&#8217;t really understand why [...]]]></description> <content:encoded><![CDATA[<p>When I believed that everything is gonna work out between IBM and Sun, this falls into place, Oracle buys Sun, something that no one saw it coming. I don&#8217;t really have issues with Oracle, but they are not really open source or not as much as I would wish, also I can&#8217;t really understand why Oracle bought Sun&#8230; I mean Sun are more into OS, some hardware and a lot of Java, unlike Oracle which is more, well actually all database.</p><p><span
id="more-353"></span>Anyway, don&#8217;t think this will be something that bad, but I do have the impression that Oracle did this to be bigger then SAP, they are fighting for quite some time now and this buy off will make Oracle more stronger than most companies out there, that includes also SAP and even IBM.</p><p>At one point my only concern is MySQL, OpenOffice and OpenSolaris, how will they go on, will they remain free and so on. I do hope that Oracle wont end-up to behave or to be something like Microsoft.</p><p>Lets hope for the best&#8230; BTW: the buy off was for 7.4 billion USD, if anyone is interested <img
src='http://blog.robertalks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>Good day!</p> ]]></content:encoded> <wfw:commentRss>http://blog.robertalks.com/index.php/2009/04/20/crap-oracle-buys-sun/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
