<?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>gHacks technology news &#187; mysql</title>
	<atom:link href="http://www.ghacks.net/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Mon, 23 Nov 2009 22:22:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Basic postgresql server setup</title>
		<link>http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/</link>
		<comments>http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 23:09:50 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorials Advanced]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database user]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[ubuntu server]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=18345</guid>
		<description><![CDATA[So many tool require databases. If you are a web administrator or a company with large stores of information, then you know the importance of databases. One of the most oft-used databases available is MySQL. But that is not the only player on the court. Another cross platform object-relational database management tool is PostgreSQL. Many [...]]]></description>
			<content:encoded><![CDATA[<p>So many tool require databases. If you are a web administrator or a company with large stores of information, then you know the importance of databases. One of the most oft-used databases available is MySQL. But that is not the only player on the court. Another cross platform object-relational database management tool is <a title="PostgreSQL" href="http://www.postgresql.org/" target="_blank">PostgreSQL</a>. Many people refer to PostgreSQL as the Oracle of the open source world. That is because PostgreSQL is dense with features but not as fast as MySQL. And where MySQL is a simple to use database management tool, PostgreSQL is often seen as overly complicated.</p>
<p>Of course there are variations on that opinion. But that is neither here nor there. The purpose of this tutorial is to help you get a PostgreSQL server up and running quickly and easily. To make this simple we will make this a part of our Ubuntu Server series, so all you have to do is have your Ubuntu Server up and running (see my article &#8220;<a title="Installing Ubuntu Server 9.04" href="http://www.ghacks.net/2009/09/03/installing-ubuntu-server-9-04/" target="_blank">Installing Ubuntu Server 9.04</a>&#8221; to get started.) Once you have that server up and running you are ready to get your PostgreSQL server up.</p>
<p><span id="more-18345"></span><strong>Installation</strong></p>
<p>The first thing you need to do is to install the necessary software. Since this is Ubuntu, it&#8217;s quite easy. Open up a terminal window and issue the command:</p>
<p><em>sudo apt-get install postgresql</em></p>
<p>Once the software is installed you are ready to set it all up.</p>
<p><strong>Change the default user password</strong></p>
<p>One of the first steps you want to take is to change the default password for the user postgres. Sine we are using Ubuntu you will have to use the sudo command to change to the postgres user like so:</p>
<p><em>sudo su &#8211; postgres</em></p>
<p>You will have to enter your sudo password after which you will now be issuing commands as the user postgres. The next step is to gain access to the postgresql command prompt with the command:</p>
<p><em>psql</em></p>
<p>Your new command prompt will look like:</p>
<p><em>postgres=#</em></p>
<p>NOTE: The only user that can open the PostgreSQL prompt without defining a database to work with is the user postgres. Other users would have to gain access to the command prompt with a command like:</p>
<p><em>psql DB_NAME</em></p>
<p>Where <em>DB_NAME </em>is the name of an existing database.</p>
<p>Changing the password is as simple as issuing the command:</p>
<p><em>\password postgres</em></p>
<p>You will then be asked to enter a password and then verify that password.</p>
<p>Your default password has not been changed. You can exit from the PostgreSQL prompt by issuing the command:</p>
<p><em>\q</em></p>
<p><strong>Create a database</strong></p>
<p>Now, while still logged in as the postgres user, let&#8217;s create a database. For this you do not have to be logged into the PostgreSQL command prompt. Instead just issue the command:</p>
<p><em>createdb testdb</em></p>
<p>Where <em>testdb</em> is the name of the database you want to create. To check to make sure that database was created go back to the PostgreSQL command prompt (remember, the command <em>psql</em>) and enter:</p>
<p><em>\l</em></p>
<p>You should see a listing for your new database like:</p>
<p><code>testdb | postgres | UTF8 | en_US.UTF-8  | en_US.UTF-8</code></p>
<p>Once again, log out of the PostgreSQL command prompt with the command:</p>
<p><em>\q</em></p>
<p><strong>Create a user</strong></p>
<p>By default, the only user that can connect to a database is the postgres user. This will be of no help when you need to connect with another user. To create a new user (that can connect to databases) you would issue the command (as the user <em>postgres</em>):</p>
<p><em>createuser &#8211;superuser USERNAME</em></p>
<p>Where <em>USERNAME </em>is the name of the user you want to create.</p>
<p><strong>Final thoughts</strong></p>
<p>Now you should have a basic PostgreSQL installation with a test database and a user, besides postgres, that can work with the tools. Next time we work with PostgreSQL we&#8217;ll discuss more challenging issues with this outstanding database tool.</p>

	Tags: <a href="http://www.ghacks.net/tag/database/" title="database" rel="tag">database</a>, <a href="http://www.ghacks.net/tag/database-user/" title="database user" rel="tag">database user</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/postgresql/" title="postgresql" rel="tag">postgresql</a>, <a href="http://www.ghacks.net/tag/ubuntu-server/" title="ubuntu server" rel="tag">ubuntu server</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/" title="Set up MySQL database replication (April 9, 2009)">Set up MySQL database replication</a> (1)</li>
	<li><a href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" title="Install phpmyadmin for easy MySQL administration (December 20, 2008)">Install phpmyadmin for easy MySQL administration</a> (6)</li>
	<li><a href="http://www.ghacks.net/2008/11/05/have-wordpress-back-ups-emailed/" title="Have WordPress back-ups emailed (November 5, 2008)">Have WordPress back-ups emailed</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/" title="Database Monitoring Software Db2rss (July 30, 2009)">Database Monitoring Software Db2rss</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/01/12/backup-mysql-databases-in-linux-regularly/" title="Backup MySQL Databases In Linux Regularly (January 12, 2009)">Backup MySQL Databases In Linux Regularly</a> (11)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Local Apache Web Server Wampserver</title>
		<link>http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/</link>
		<comments>http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 09:08:17 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache server]]></category>
		<category><![CDATA[apache web server]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wampserver]]></category>
		<category><![CDATA[webmaster]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=16430</guid>
		<description><![CDATA[Running a local Apache web server is essential for many webmasters. It is always a good idea to test code locally before publishing it on the Internet. Professional webmasters usually test their code in a local web server before it gets published. Mainly to avoid possible downtimes in the live environment but also to avoid [...]]]></description>
			<content:encoded><![CDATA[<p>Running a local Apache web server is essential for many webmasters. It is always a good idea to test code locally before publishing it on the Internet. Professional webmasters usually test their code in a local web server before it gets published. Mainly to avoid possible downtimes in the live environment but also to avoid the hassle of having to upload and edit code on the Internet or network. It&#8217;s simply faster to test everything locally.</p>
<p>Wampserver is an Apache web server for the Windows operating system. It provides in many regards the same functionality of other web server solutions like <a href="http://www.ghacks.net/2007/01/31/host-your-own-webserver/">XAMPP</a> or <a href="http://www.ghacks.net/2009/03/28/home-web-server/">Home Web Server</a> which we have reviewed in the past. The latest version of the local web server package will install Apache 2.2.11, MySQL 5.1.36 and PHP 5.3.0 on the local computer system.</p>
<p><span id="more-16430"></span>One interesting unique feature is the ability to add different versions of Apache, MySQL and PHP to the installation in the form of add-ons. This can be very handy to test a website locally under multiple different Apache, MySQL or PHP release versions.</p>
<p><img src="http://www.ghacks.net/wp-content/uploads/2009/09/apache_web_server.gif" alt="apache web server" title="apache web server" width="281" height="289" class="alignnone size-full wp-image-16431" /></p>
<p>The installation of Wampserver will always install the latest versions of Apache, MySQL and PHP. One interesting security feature is the ability to limit access to the web server to localhost. It is required to click on the &#8220;put online&#8221; option to make it available to other computer systems as well.</p>
<p>Additional Apache, MySQL and PHP versions can be installed from the Wamp add-ons <a href="http://www.wampserver.com/en/add-ons.php">page</a>. All add-ons are provided as executables that can be installed easily on the operating system.</p>
<p>Webmasters who need to test code offline can use Wampserver to do so. It is especially useful to test code against multiple versions of Apache, MySQL and PHP. Something that the other home server solutions do not provide.</p>
<p><a href="http://www.wampserver.com/en/">Wampserver</a> is Open Source and can be downloaded from the developer&#8217;s website.</p>

	Tags: <a href="http://www.ghacks.net/tag/apache/" title="apache" rel="tag">apache</a>, <a href="http://www.ghacks.net/tag/apache-server/" title="apache server" rel="tag">apache server</a>, <a href="http://www.ghacks.net/tag/apache-web-server/" title="apache web server" rel="tag">apache web server</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://www.ghacks.net/tag/wampserver/" title="wampserver" rel="tag">wampserver</a>, <a href="http://www.ghacks.net/tag/webmaster/" title="webmaster" rel="tag">webmaster</a>, <a href="http://www.ghacks.net/tag/xampp/" title="xampp" rel="tag">xampp</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/12/28/portable-web-server/" title="Portable Web Server (December 28, 2008)">Portable Web Server</a> (8)</li>
	<li><a href="http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/" title="How to: Install a LAMP server (July 23, 2009)">How to: Install a LAMP server</a> (7)</li>
	<li><a href="http://www.ghacks.net/2007/01/31/host-your-own-webserver/" title="Host your own webserver (January 31, 2007)">Host your own webserver</a> (18)</li>
	<li><a href="http://www.ghacks.net/2009/01/02/web-development-standardizing-variables-to-code-faster/" title="Web Development: Standardizing variables to code faster (January 2, 2009)">Web Development: Standardizing variables to code faster</a> (18)</li>
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Database Monitoring Software Db2rss</title>
		<link>http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/</link>
		<comments>http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 12:18:57 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[blackfish sql]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database monitoring]]></category>
		<category><![CDATA[db2rss]]></category>
		<category><![CDATA[interbase]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql database]]></category>
		<category><![CDATA[Network Monitoring]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=14903</guid>
		<description><![CDATA[Database monitoring is not only important for businesses who want to monitor their online and offline services and applications but also for individuals. Webmasters who make use of databases like MySQL need to make sure that the databases are up and running and the best way to ensure that is to monitor them 24/7. Quite [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ghacks.net/wp-content/uploads/2009/04/microsoft_windows.jpg" alt="microsoft windows" title="microsoft windows" width="128" height="128" class="alignleft size-full wp-image-11907" />Database monitoring is not only important for businesses who want to monitor their online and offline services and applications but also for individuals. Webmasters who make use of databases like MySQL need to make sure that the databases are up and running and the best way to ensure that is to monitor them 24/7. Quite a few monitoring services exist. It is possible to use online services &#8211; most of them paid depending on the quality and quantity of monitoring &#8211; but also services that run on a local PC.</p>
<p>We have dealt with several services in the past including the <a href="http://www.ghacks.net/2009/05/28/network-monitoring-software/">network monitoring software</a> Open Monitor or the online service <a href="http://www.ghacks.net/2008/07/19/monitor-your-servers-with-livewatch/">Livewatch</a>.</p>
<p><span id="more-14903"></span>The database monitoring software dv2rss is different from these solutions. The main difference is that it can &#8211; as the title implies &#8211; monitor databases but also because it can only be run from the command line or a script. That&#8217;s not as bad as it sounds and it could be welcome in certain situations where no graphical user interface is needed or wanted.</p>
<p><a href="http://www.be-precision.com/products/precision-utils/#db2rss">Db2rss</a> supports MySQL, Interbase and Blackfish SQL databases at the moment and can monitor them in a computer network or on the Internet. It comes with several command line parameters that define important information such as the database&#8217;s host name, the username and password. There are quite a few additional parameter that include running an SQL command on the database, comparing the results to a local copy and defining templates and title of the resulting RSS feed. The RSS feed is another aspect of this database monitoring software that is usually not found in other monitoring software programs. </p>
<p>It is then possible to subscribe to the RSS feed to receive the database monitoring information after the script&#8217;s execution. The software developer suggests to use the Windows task scheduler to run the database monitoring software regularly.</p>

	Tags: <a href="http://www.ghacks.net/tag/blackfish-sql/" title="blackfish sql" rel="tag">blackfish sql</a>, <a href="http://www.ghacks.net/tag/database/" title="database" rel="tag">database</a>, <a href="http://www.ghacks.net/tag/database-monitoring/" title="database monitoring" rel="tag">database monitoring</a>, <a href="http://www.ghacks.net/tag/db2rss/" title="db2rss" rel="tag">db2rss</a>, <a href="http://www.ghacks.net/tag/interbase/" title="interbase" rel="tag">interbase</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/mysql-database/" title="mysql database" rel="tag">mysql database</a>, <a href="http://www.ghacks.net/tag/network-monitoring/" title="Network Monitoring" rel="tag">Network Monitoring</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/01/12/backup-mysql-databases-in-linux-regularly/" title="Backup MySQL Databases In Linux Regularly (January 12, 2009)">Backup MySQL Databases In Linux Regularly</a> (11)</li>
	<li><a href="http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/" title="Set up MySQL database replication (April 9, 2009)">Set up MySQL database replication</a> (1)</li>
	<li><a href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" title="Install phpmyadmin for easy MySQL administration (December 20, 2008)">Install phpmyadmin for easy MySQL administration</a> (6)</li>
	<li><a href="http://www.ghacks.net/2008/11/05/have-wordpress-back-ups-emailed/" title="Have WordPress back-ups emailed (November 5, 2008)">Have WordPress back-ups emailed</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/" title="Basic postgresql server setup (November 10, 2009)">Basic postgresql server setup</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to: Install a LAMP server</title>
		<link>http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/</link>
		<comments>http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 17:43:55 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[lamp server]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tasksel]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=14678</guid>
		<description><![CDATA[If you&#8217;ve read enough of my Ghacks tutorials you have most likely come across mention of a LAMP server. If you are not sure what a LAMP server is:

Linux
Apache
MySQL
P (can mean PHP or PERL &#8211; depends upon your needs)

LAMP servers are very popular, cheap, effective, flexible, and reliable servers. But how are they installed? Actually, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve read enough of my Ghacks tutorials you have most likely come across mention of a LAMP server. If you are not sure what a LAMP server is:</p>
<ul>
<li>Linux</li>
<li>Apache</li>
<li>MySQL</li>
<li>P (can mean PHP or PERL &#8211; depends upon your needs)</li>
</ul>
<p>LAMP servers are very popular, cheap, effective, flexible, and reliable servers. But how are they installed? Actually, it&#8217;s not that hard. In this tutorial I am going to show you how to install a LAMP in two different ways: From the command line (using separate tools) and using the <em>tasksel</em> tool.</p>
<p><span id="more-14678"></span><strong>Hardware needed</strong></p>
<p>Fortunately a LAMP server can be installed on lower-end hardware and still serve as a fairly efficient server. Naturally if you are going to be using your LAMP server for high traffic, you will want to select your hardware wisely.</p>
<p><strong>Install prerequisite</strong></p>
<p>Before you begin the installation of your server you will need to have your operating system installed. This is the &#8220;L&#8221; of LAMP. So find your favorite Linux distribution and install the operating system. For the purposes of this installation I am going to be installing on a Ubuntu 9.04 server installation. This will be a console only server (no GUI desktop) which is fine because the installation is done via command line only.</p>
<p>Once you have your operating system installed you are ready to install your server.</p>
<p><strong>Apache</strong></p>
<p>This is the easiest portion to install. Either log in to your console or open up a terminal window (if you are working from a GUI desktop) and enter the following command:<br />
<code>sudo apt-get install apache2</code></p>
<p>You will have to enter your sudo user password for this installation to continue. Once this installation is complete check it by pointing a browser to that server IP address. You should instantly know if Apache is up and running.</p>
<p><strong>PHP</strong></p>
<p>For the purposes of this article we will assume the &#8220;P&#8221; stands for PHP. To install PHP (and all of its requirements) issue the command:</p>
<p><code>sudo apt-get install php5 libapache2-mod-php5</code></p>
<p>Once this installation is complete restart Apache with the command:</p>
<p><code>sudo /etc/init.d/apache2 restart</code></p>
<p>Let&#8217;s make sure this portion works properly. To test this create a file in the Apache document root (for this install it will be <strong>/var/www</strong>) called test.php. The contents of this file will be:<br />
<code>&lt; ?php phpinfo(); ?&gt;</code></p>
<p>Save that file and then point your browser to http://IP_ADDRESS/test.php</p>
<p>Where IP_ADDRESS is the actual IP address of your server.</p>
<p>You should see &#8220;Test PHP Page&#8221; written on your browsers page. If so, you&#8217;re good to go.</p>
<p><strong>MySQL</strong></p>
<p>Now to install MySQL. To do this issue the command:</p>
<p><code>sudo apt-get install mysql-server</code></p>
<p>Once this is done you then need to set a password for MySQL. To do this issue the command:</p>
<p><code>mysql -u root</code></p>
<p>which will put you in the MySQL prompt. From this prompt (which looks like <em>mysql&gt; </em>) enter the command:<br />
<code>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YOURPASSWORD');</code></p>
<p>Where YOURPASSWORD is the password you want to use for the mysql user.</p>
<p>Now start your MySQL server with the command:</p>
<p><code>/etc/init.d/mysql start</code></p>
<p>That&#8217;s it. Your LAMP server is up and running.</p>
<p><strong>The quick version</strong></p>
<p>You can actually install a full-on LAMP server on a (Ubuntu server install) with a single command:</p>
<p><code>sudo tasksel</code></p>
<p>You will need to select LAMP from the list and you will eventually be prompted for a MySQL password. That&#8217;s it.</p>
<p><strong>Final thoughts</strong></p>
<p>Getting a powerful, flexible web server up and running will take you less time and effort than you think. LAMP servers are an outstanding choice for your web servers&#8217; needs.</p>

	Tags: <a href="http://www.ghacks.net/tag/apache/" title="apache" rel="tag">apache</a>, <a href="http://www.ghacks.net/tag/lamp/" title="LAMP" rel="tag">LAMP</a>, <a href="http://www.ghacks.net/tag/lamp-server/" title="lamp server" rel="tag">lamp server</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://www.ghacks.net/tag/tasksel/" title="tasksel" rel="tag">tasksel</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/12/28/portable-web-server/" title="Portable Web Server (December 28, 2008)">Portable Web Server</a> (8)</li>
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/" title="Local Apache Web Server Wampserver (September 17, 2009)">Local Apache Web Server Wampserver</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/01/02/web-development-standardizing-variables-to-code-faster/" title="Web Development: Standardizing variables to code faster (January 2, 2009)">Web Development: Standardizing variables to code faster</a> (18)</li>
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Automatically Send MySQL Database Backup To Gmail</title>
		<link>http://www.ghacks.net/2009/07/13/automatically-send-mysql-database-backup-to-gmail/</link>
		<comments>http://www.ghacks.net/2009/07/13/automatically-send-mysql-database-backup-to-gmail/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 13:14:26 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Online Services]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[database backup database]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[linux server]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql backup]]></category>
		<category><![CDATA[mysql database backup]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sql backup]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=14370</guid>
		<description><![CDATA[Webmasters have to make sure that their websites and files are getting backed up regularly to be prepared when something unforeseen happens. This unforeseen event can be a hacker attack, a database crash, a fire in the data center of the hoster or human error. Whatever the cause is it can have a severe impact [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ghacks.net/wp-content/uploads/2009/07/mysql.gif" alt="mysql" title="mysql" width="128" height="85" class="alignleft size-full wp-image-14371" />Webmasters have to make sure that their websites and files are getting backed up regularly to be prepared when something unforeseen happens. This unforeseen event can be a hacker attack, a database crash, a fire in the data center of the hoster or human error. Whatever the cause is it can have a severe impact on the service and business if backups are not available to restore the website or service.</p>
<p>Many web hosting companies offer backup space and create backups regularly. Some on the other hand ask for additional payments or do not offer this backup service at all. It then is up to the webmaster or server administrator to ensure that the data gets backed up regularly so that it can be restored when needed.</p>
<p><span id="more-14370"></span>One option that is becoming increasingly popular is to backup data and send it to an offsite storage space. <a href="http://www.backup2mail.com/">Backup2Mail</a> is such a script. It can initiate automatic MySQL database backups on Linux servers using cron jobs and transfer these backups to a Gmail account. The only restriction is that the size of the zipped database should not exceed the maximum attachment limit of Gmail which is currently 25 Megabytes.</p>
<p>The developer provides instructions on how to setup the MySQL database backup and Gmail transfer on his website. It basically means that the user needs to edit an index.php file to provide the script with the MySQL information and GMail data. The only thing left after this step is to create a cron job so that the script is executed regularly on the server. Backups will from then on be created automatically on the web server and send to the Gmail account. </p>

	Tags: <a href="http://www.ghacks.net/tag/database-backup-database/" title="database backup database" rel="tag">database backup database</a>, <a href="http://www.ghacks.net/tag/gmail/" title="gmail" rel="tag">gmail</a>, <a href="http://www.ghacks.net/tag/linux-server/" title="linux server" rel="tag">linux server</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/mysql-backup/" title="mysql backup" rel="tag">mysql backup</a>, <a href="http://www.ghacks.net/tag/mysql-database-backup/" title="mysql database backup" rel="tag">mysql database backup</a>, <a href="http://www.ghacks.net/tag/server/" title="server" rel="tag">server</a>, <a href="http://www.ghacks.net/tag/sql-backup/" title="sql backup" rel="tag">sql backup</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2007/03/28/yahoo-to-offer-unlimited-email-storage/" title="Yahoo to offer unlimited Email Storage (March 28, 2007)">Yahoo to offer unlimited Email Storage</a> (8)</li>
	<li><a href="http://www.ghacks.net/2009/08/25/yahoo-mail-search-and-messenger-upgrades/" title="Yahoo Mail, Search And Messenger Upgrades (August 25, 2009)">Yahoo Mail, Search And Messenger Upgrades</a> (2)</li>
	<li><a href="http://www.ghacks.net/2009/10/05/xoopit-to-become-yahoo-mail-exclusive/" title="Xoopit To Become Yahoo Mail Exclusive (October 5, 2009)">Xoopit To Become Yahoo Mail Exclusive</a> (5)</li>
	<li><a href="http://www.ghacks.net/2009/11/16/wiredtree-review-after-four-months/" title="Wiredtree Review After Four Months (November 16, 2009)">Wiredtree Review After Four Months</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/08/05/windows-ssh-server-winsshd/" title="Windows SSH Server WinSSHD (August 5, 2009)">Windows SSH Server WinSSHD</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/07/13/automatically-send-mysql-database-backup-to-gmail/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Set up MySQL database replication</title>
		<link>http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/</link>
		<comments>http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 17:58:26 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorials Advanced]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database replication]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=11853</guid>
		<description><![CDATA[If you use databases then you know how important it is to back them up. But backing up a database and being able to use that backup depends upon the back up being always up to date. There is a method that ensures you will always have an up to date backup. That method is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ghacks.net/wp-content/uploads/2009/04/logo_mysql_sun_a.gif"><img class="alignleft size-full wp-image-11857" src="http://www.ghacks.net/wp-content/uploads/2009/04/logo_mysql_sun_a.gif" alt="logo_mysql_sun_a" width="114" height="68" /></a>If you use databases then you know how important it is to back them up. But backing up a database and being able to use that backup depends upon the back up being always up to date. There is a method that ensures you will always have an up to date backup. That method is database replication.Replication is a way to configure a MySQL database to update on a remote server whenever the local client is updated.</p>
<p>Database replication will require the use of two machines. The reason you want to use two machines is to ensure you will always have a working copy of your database (should one machine die). When using replication you think of your machines as Master and Slave. The Master is the machine that holds the original database. The Slave is the machine that holds the replicated database (the backup per say.) Both machines must have a working MySQL installation and must be networked together. You will need root access as well as access to the database administrator on both machines.</p>
<p><span id="more-11853"></span><strong>Setting up the Master</strong></p>
<p>For purpose of example our database to replicate will be called &#8220;sample_database&#8221;.? The first thing you need to do is open up the <strong>/etc/mysql/my.conf</strong> file for editing. You need to search for the lines:</p>
<p><code>#skip-networking<br />
#bind-address = 127.0.0.1</code></p>
<p>Uncomment out these lines (remove the &#8220;#&#8221; character). If these lines do not exist, add them. Now we have to inform mysql which database we plan on replicating. For this you will add the following lines:<br />
<code>log-bin = /var/log/mysql/mysql-bin.log<br />
binlog-do-db=sample_database<br />
server-id=1</code></p>
<p>The above lines do the following:</p>
<p>Line 1: Instruct mysql what log file to use.</p>
<p>Line 2: Instruct mysql which database to replicate</p>
<p>Line 3: Instruct mysql that this machine is the master.</p>
<p>Restart mysql on this machine with the following command:</p>
<p>/etc/init.d/mysql restart</p>
<p>The next step is to log into the mysql terminal and create a user that has replication privileges. To do this issue the command:</p>
<p>mysql -u root -p</p>
<p>You will prompted for the mysql admin password. Now we have to make some mysql magic. From the mysql prompt issue the following:</p>
<p><code>GRANT REPLICATION SLAVE ON *.* TO 'USER'@'%' IDENTIFIED BY '';</code></p>
<p>Where NEW_PASSWORD is the actual password and USER is the actual username that will have replication privileges.</p>
<p>Now issue the command:</p>
<p><code>FLUSH PRIVILEGES;</code></p>
<p>You&#8217;re not done with mysql yet. Now issue the command:</p>
<p><code>USE sample_database;</code></p>
<p>And now the command:</p>
<p><code>FLUSH TABLES WITH READ LOCK;</code></p>
<p>And now you need to make sure mysql is seeing the Master and can show the status of the master with the command:</p>
<p><code>SHOW MASTER STATUS;</code></p>
<p>When you issue the above command you should see a listing printed out for your sample_database. Write this information down (you will see a Position number that you will need later).<br />
Now you need to get tables and data from the sample_database. The method I will show you requires that the database on the Master be locked momentarily. To that end the database will be unavailable until the database is unlocked. Keep this in mind when setting this up.</p>
<p>Now you&#8217;re ready to set up the Slave. Move over to the machine that will serve as the slave.</p>
<p>The first thing to do on the Slave is to create the database the Master will write to. On the slave open up the mysql shell with:</p>
<p><code>mysql -u root -p</code></p>
<p>You will be prompted for the password. Now enter the following command to create the database:</p>
<p><code>CREATE DATABASE sample_database;</code></p>
<p>And quit mysql with the &#8220;quit&#8221; command.</p>
<p>Now to configure MySQL to know it is the slave and open up the <strong>/etc/mysql/my.conf</strong> file for editing. Add the following lines:<br />
<code>server-id=2<br />
master-host=IP_ADDRESS_OF_MASTER<br />
master-user=USER<br />
master-password=USER_PASSWORD<br />
master-connect-retry=60<br />
replicate-do-db=sample_database</code></p>
<p>Where IP_ADDRESS_OF_MASTER is the actual IP address of the master server, USER is the user created on the master for replication, and USER_PASSWORD is the password given to the replication user on the Master.</p>
<p>Save that file and restart mysql on the slave with the command:</p>
<p><code>/etc/init.d/mysql restart</code></p>
<p>Now we have to load the data from the Master into the Slave. This is when the database will be locked. Here are the commands to load the data:</p>
<p><code>mysql -u root -p</code></p>
<p>Enter the mysql admin password. Now from the mysql prompt enter the following command:</p>
<p><code>LOAD DATA FROM MASTER;</code></p>
<p>Now exit the mysql prompt with the command <em>quit</em>.</p>
<p>The next step is to stop the slave so you can finish up the Slave configuration. Issue the following:</p>
<p><code>mysql -u root -p</code></p>
<p>You will prompted for the root password.</p>
<p>now enter the command:</p>
<p><code>SLAVE STOP;</code></p>
<p>Now the next command is a bit lengthy:</p>
<p><code>CHANGE MASTER TO MASTER_HOST='IP_ADDRESS_OF_MASTER', MASTER_USER='USER', MASTER_PASSWORD='USER_PASSWORD', MASTER_LOG_FILE='mysql-bin.007', MASTER_LOG_POS=NUMBER;</code></p>
<p>Where:<br />
IP_ADDRESS_OF_MASTER is the actual IP address of the Master server.<br />
USER is the actual user you created on the Master.<br />
USER_PASSWORD is the actual password you gave the user on the Master.<br />
mysql-bin.007 is the File name from the output of the SHOW MASTER STATUS command from above.<br />
MASTER_LOG_POS is the Position given in the output of the SHOW MASTER STATUS command from above.</p>
<p>Finally issue the command:</p>
<p>SLAVE START;</p>
<p>and then quit the mysql prompt with the command &#8220;quit&#8221;.</p>
<p>You&#8217;re done. If you have phpmyadmin installed you can check the status of the databases as they updated. You now have database replication up and running. Congratulations.</p>

	Tags: <a href="http://www.ghacks.net/tag/database/" title="database" rel="tag">database</a>, <a href="http://www.ghacks.net/tag/database-replication/" title="database replication" rel="tag">database replication</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/replication/" title="replication" rel="tag">replication</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" title="Install phpmyadmin for easy MySQL administration (December 20, 2008)">Install phpmyadmin for easy MySQL administration</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/01/12/backup-mysql-databases-in-linux-regularly/" title="Backup MySQL Databases In Linux Regularly (January 12, 2009)">Backup MySQL Databases In Linux Regularly</a> (11)</li>
	<li><a href="http://www.ghacks.net/2008/11/05/have-wordpress-back-ups-emailed/" title="Have WordPress back-ups emailed (November 5, 2008)">Have WordPress back-ups emailed</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/" title="Database Monitoring Software Db2rss (July 30, 2009)">Database Monitoring Software Db2rss</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/" title="Basic postgresql server setup (November 10, 2009)">Basic postgresql server setup</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web development roundup</title>
		<link>http://www.ghacks.net/2009/03/16/web-development-roundup/</link>
		<comments>http://www.ghacks.net/2009/03/16/web-development-roundup/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 17:31:05 +0000</pubDate>
		<dc:creator>Daniel Pataki</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=11272</guid>
		<description><![CDATA[Last week was a bit less active in web development terms, but here&#8217;s a roundup of what you can find on Scriptastique if you haven&#8217;t been taking a look recently. 
We had a look at how a mysql query basically works, which will come in handy if you&#8217;re just learning about MySQL and PHP. The [...]]]></description>
			<content:encoded><![CDATA[<p>Last week was a bit less active in web development terms, but here&#8217;s a roundup of what you can find on <a href="http://scriptastique.com">Scriptastique</a> if you haven&#8217;t been taking a look recently. </p>
<p>We had a look at how a mysql query basically works, which will come in handy if you&#8217;re just learning about MySQL and PHP. The article focuses more on the technical side than how to create specific queries, but we&#8217;ll get there in the end too! Just after that we created some simple but effective excerpts from longer text automatically removing unwanted characters and spaces.</p>
<p>We also had a look at website mascots, why you should use them, how to use arithmetic operators in PHP and just today, why a coder should always be well slept (easier said than done). If you feel like taking a stroll down web development avanue visit the site, or follow us on <a href="http://twitter.com/scriptastique">Twitter</a> or our <a href="http://feeds2.feedburner.com/scriptastique">RSS feed</a>!<br />
<span id="more-11272"></span></p>

	Tags: <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://www.ghacks.net/tag/web-development/" title="web development" rel="tag">web development</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/01/02/web-development-standardizing-variables-to-code-faster/" title="Web Development: Standardizing variables to code faster (January 2, 2009)">Web Development: Standardizing variables to code faster</a> (18)</li>
	<li><a href="http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/" title="Scriptastique web development roundup (March 9, 2009)">Scriptastique web development roundup</a> (4)</li>
	<li><a href="http://www.ghacks.net/2008/12/28/portable-web-server/" title="Portable Web Server (December 28, 2008)">Portable Web Server</a> (8)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/03/16/web-development-roundup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; what it does and what it doesn&#8217;t</title>
		<link>http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/</link>
		<comments>http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 19:28:22 +0000</pubDate>
		<dc:creator>Jeremiah</dc:creator>
				<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website development]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=10600</guid>
		<description><![CDATA[PHP is a Server side scripting language. Its primary competitors are ASP (Microsoft), JSP (Sun), CFM (Adobe), and Perl (often called cgi by hosting companies, although it is not the only cgi language).
PHP was originally created in 1995, so as a technology it is fairly mature. Version 5.x is the latest stable version and 6 [...]]]></description>
			<content:encoded><![CDATA[<p>PHP is a Server side scripting language. Its primary competitors are ASP (Microsoft), JSP (Sun), CFM (Adobe), and Perl (often called cgi by hosting companies, although it is not the only cgi language).<br />
PHP was originally created in 1995, so as a technology it is fairly mature. Version 5.x is the latest stable version and 6 is under development. It is currently running almost 20 million websites including big names like <a href="http://www.ghacks.net/2009/10/17/facebook-login/">Facebook</a>.</p>
<p>The most common server architecture on which PHP is found is called LAMP (for Linux + Apache + MySQL + PHP). All of the elements of LAMP are open source, meaning that the source code of the application is freely available. This means that the cost of setting up a server running LAMP is reduced (No License Fees), so LAMP based web hosting tends to be the least expensive solution available.</p>
<p>The Internet is built on a client-server architecture. On the client side we have the user and the browser. One the server side we have the server and its script interpreter (In our case, Apache and PHP).<br />
Because PHP runs on the server side, we cannot use it for flashy client side effects, things like animations and auto-complete cannot be performed by php because php is only running on the server. For client side programming we could use javascript, Flash/Flex, Silverlight, or JavaFX.</p>
<p><span id="more-10600"></span>What we can do with PHP is access a database, connect to other websites/services for information, and build a page out of smaller pieces, which we then deliver to the client for rendering.</p>
<p>I think it is important to indicate at this time that there are four levels at which you can work with PHP.</p>
<ol>
<li>Scripting &#8211; this is where you take a small script and add it (integrate) into an existing page.</li>
<li>Coding &#8211; this is where you write scripts as needed to add basic functionality to your site.</li>
<li>Development &#8211; this is where you write an full application in PHP.</li>
<li>Architect &#8211; this is where you properly design an application that develop it into an application. Like development but puts a lot more thought into a good foundation.</li>
</ol>
<p>Depending on your actual needs, several of these layers could be overkill for your task. The following articles will mainly be focused on the first two levels &#8211; scripting, and coding. In Scripting and coding we have two primary tasks we accomplish. One makes your job as webmaster easier. The second adds new functionality to your site.</p>
<p><a href="http://www.jeremiahstover.com">Jeremiah Stover</a> is a Software Engineer and a Business IT Consultant at <a href="http://www.pragmatic-development.com">Pragmatic Development</a>. He has hands on experience and regularly provides practical advice in Business, Marketing, IT equipment and software. His Specialties include interpersonal communications, design skills, teaching and instruction. Right now he spends most of his time developing web applications in PHP and MySQL.</p>

	Tags: <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/html/" title="html" rel="tag">html</a>, <a href="http://www.ghacks.net/tag/lamp/" title="LAMP" rel="tag">LAMP</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://www.ghacks.net/tag/web-dev/" title="web dev" rel="tag">web dev</a>, <a href="http://www.ghacks.net/tag/web-development/" title="web development" rel="tag">web development</a>, <a href="http://www.ghacks.net/tag/website-development/" title="website development" rel="tag">website development</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/02/ghacks-web-development-pdf-article-compilation-january-09/" title="Ghacks Web Development PDF Article Compilation January 09 (February 2, 2009)">Ghacks Web Development PDF Article Compilation January 09</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/01/31/web-development-html-playground/" title="Web Development: HTML Playground (January 31, 2009)">Web Development: HTML Playground</a> (7)</li>
	<li><a href="http://www.ghacks.net/2009/03/16/web-development-roundup/" title="Web development roundup (March 16, 2009)">Web development roundup</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/" title="Scriptastique web development roundup (March 9, 2009)">Scriptastique web development roundup</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Web Development: PHP &#8211; what role does it fill</title>
		<link>http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/</link>
		<comments>http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 09:03:18 +0000</pubDate>
		<dc:creator>Jeremiah</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website development]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=10259</guid>
		<description><![CDATA[Before we try to work with PHP we need understand the role it fills – what problem does it address. The World Wide Web is built on a client-server model.  A client computer requests a page which is supplied by a Web Server. The browser then renders the page for the user to view. [...]]]></description>
			<content:encoded><![CDATA[<p>Before we try to work with PHP we need understand the role it fills – what problem does it address. The World Wide Web is built on a client-server model.  A client computer requests a page which is supplied by a Web Server. The browser then renders the page for the user to view. The simplest type of pages contain static (unchanging) content. The server could serve plain text files, and the browser wouldn&#8217;t have any trouble rendering them. </p>
<p>HTML is a markup language that lets us describe attributes of the text and blocks on our pages. This works great for simple requests, making pages much more interesting than plain text. However it leaves us with a very simple structure. One page from One url (address) results in one rendered content (every time this url is requested, the output is the same).</p>
<p>To give us more options we have programming languages. Some like PHP run on the server side. They modify the content that will be displayed before it is sent to the client and on to the browser. Others like JavaScript run on the client side and allow changes to be made in the browser after the page has been rendered – usually for interactivity or for adding a feature not normally available in that browser.</p>
<p><span id="more-10259"></span>The very first thing you _must_ do before getting started with PHP is get a good grasp of HTML (and CSS). Many webmasters use a tool like Dreamweaver, Expression Web or KompoZer. To<br />
work with PHP it is important that you understand the underlying HTML code. You will be modifying this code so you need to be able to understand the HTML well enough to understand what you see.</p>
<p>If you like video training try Lynda.com or VTC.com. If you prefer reading a book try &#8220;Head First html with CSS &#038; Xhtml&#8221; or if you prefer free web instruction try <a href="http://w3schools.com">w3schools.com</a> and <a href="http://tizag.com">tizag.com</a>.</p>
<p>Now that you understand the markup language which is what is sent to the browser (HTML) you are ready to tackle the server side use of PHP.</p>
<p>Jeremiah Stover is a Software Developer at <a href="http://www.pragmatic-development.com/">Pragmatic Development</a>. He specializes in client communications. While PD does offer a full range of IT services and consulting, they are currently specializing in website development in PHP/MySQL.</p>

	Tags: <a href="http://www.ghacks.net/tag/css/" title="css" rel="tag">css</a>, <a href="http://www.ghacks.net/tag/html/" title="html" rel="tag">html</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://www.ghacks.net/tag/web-dev/" title="web dev" rel="tag">web dev</a>, <a href="http://www.ghacks.net/tag/web-development/" title="web development" rel="tag">web development</a>, <a href="http://www.ghacks.net/tag/website-development/" title="website development" rel="tag">website development</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/02/02/ghacks-web-development-pdf-article-compilation-january-09/" title="Ghacks Web Development PDF Article Compilation January 09 (February 2, 2009)">Ghacks Web Development PDF Article Compilation January 09</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/01/31/web-development-html-playground/" title="Web Development: HTML Playground (January 31, 2009)">Web Development: HTML Playground</a> (7)</li>
	<li><a href="http://www.ghacks.net/2009/03/16/web-development-roundup/" title="Web development roundup (March 16, 2009)">Web development roundup</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/" title="Scriptastique web development roundup (March 9, 2009)">Scriptastique web development roundup</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backup MySQL Databases In Linux Regularly</title>
		<link>http://www.ghacks.net/2009/01/12/backup-mysql-databases-in-linux-regularly/</link>
		<comments>http://www.ghacks.net/2009/01/12/backup-mysql-databases-in-linux-regularly/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 00:08:19 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[backup database]]></category>
		<category><![CDATA[backup mysql]]></category>
		<category><![CDATA[cron job]]></category>
		<category><![CDATA[cron tab]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[linux tutorial]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql database]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=9829</guid>
		<description><![CDATA[The post Using Cron to Automate Linux Tasks by Jack got me thinking that some users might be interested in a practical example. The following tutorial will explain how to setup a small script to backup MySQL databases on a Linux server which will be run daily using a cron job. The best way to [...]]]></description>
			<content:encoded><![CDATA[<p>The post <a href="http://www.ghacks.net/2009/01/11/using-cron-to-automate-linux-tasks/">Using Cron to Automate Linux Tasks</a> by Jack got me thinking that some users might be interested in a practical example. The following tutorial will explain how to setup a small script to backup MySQL databases on a Linux server which will be run daily using a cron job. The best way to start would be to read up on the introduction by Jack about Cron so that you got a understanding of the basics.</p>
<p>We start by creating the bash script first and continue with the cron job after the bash script has been tested to work as intended. All commands in the following paragraphs are executed from the command line.</p>
<p><span id="more-9829"></span><code>vi backup.sh</code></p>
<p>This will create an empty text file in the vi editor. This will be the script that will be executed by the cron job on a daily basis.</p>
<p><code>bin/sh<br />
/usr/bin/mysqldump -A -u [Username] -p[Password] | gzip > /backups/mysqldump`date +%m_%d_%y`.gz<br />
</code></p>
<p>Press <strong>i</strong> to enter insert mode and copy and paste the two lines above in the editor. What the script does is to use the mysqldump function to create a mysql backup and store it gzipped in the backups directory using mysqldumpDate.gz as the name with data being the day the backup was created.</p>
<p>The two variables [Username] and [Password] have to be edited and the username and password of a user with sufficient rights entered. It might also be necessary to change the location of the backup folder.</p>
<p>Press <strong>ESC</strong> to enter command mode and <strong>:x</strong> to save the file.</p>
<p><code>./backup.sh</code></p>
<p>Execute the script to see if it is working correctly. It should create the dump of the MySQL database in the defined directory. It might be necessary to change the permission level of the backup.sh file if you get a permission error during execution.</p>
<p><code>chmod 755 backup.sh</code></p>
<p>If the script is working as intended it can be added as a cron job. The following command will open the user crontab list.</p>
<p><code>crontab -e</code></p>
<p>If you are in the vi editor you press i to enter insert mode again and add the following line</p>
<p><code>0 7 * * * /path/to/backup.sh</code></p>
<p>Please refer to the tutorial for a detailed instruction on how to set the cron job up to suite your needs. This one will execute the script every day on 7am.</p>
<p>It is a good idea to check back after the next execution to verify that everything is working as intended.</p>

	Tags: <a href="http://www.ghacks.net/tag/backup-database/" title="backup database" rel="tag">backup database</a>, <a href="http://www.ghacks.net/tag/backup-mysql/" title="backup mysql" rel="tag">backup mysql</a>, <a href="http://www.ghacks.net/tag/cron-job/" title="cron job" rel="tag">cron job</a>, <a href="http://www.ghacks.net/tag/cron-tab/" title="cron tab" rel="tag">cron tab</a>, <a href="http://www.ghacks.net/tag/database/" title="database" rel="tag">database</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/linux-tutorial/" title="linux tutorial" rel="tag">linux tutorial</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/mysql-database/" title="mysql database" rel="tag">mysql database</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/" title="Set up MySQL database replication (April 9, 2009)">Set up MySQL database replication</a> (1)</li>
	<li><a href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" title="Install phpmyadmin for easy MySQL administration (December 20, 2008)">Install phpmyadmin for easy MySQL administration</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/" title="Database Monitoring Software Db2rss (July 30, 2009)">Database Monitoring Software Db2rss</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/01/11/using-cron-to-automate-linux-tasks/" title="Using Cron to Automate Linux Tasks (January 11, 2009)">Using Cron to Automate Linux Tasks</a> (7)</li>
	<li><a href="http://www.ghacks.net/2008/11/05/have-wordpress-back-ups-emailed/" title="Have WordPress back-ups emailed (November 5, 2008)">Have WordPress back-ups emailed</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/01/12/backup-mysql-databases-in-linux-regularly/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Web Development: Standardizing variables to code faster</title>
		<link>http://www.ghacks.net/2009/01/02/web-development-standardizing-variables-to-code-faster/</link>
		<comments>http://www.ghacks.net/2009/01/02/web-development-standardizing-variables-to-code-faster/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 16:33:19 +0000</pubDate>
		<dc:creator>Daniel Pataki</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=9555</guid>
		<description><![CDATA[Welcome to a new exploratory post here on gHacks! I actually work as a web designer specializing in standalone PHP and MySQL based sites, and I&#8217;ve always wanted to write a bit about coding, but it doesn&#8217;t really fit my own blog and I just don&#8217;t have time to start a whole new blog for [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to a new exploratory post here on gHacks! I actually work as a web designer specializing in standalone PHP and MySQL based sites, and I&#8217;ve always wanted to write a bit about coding, but it doesn&#8217;t really fit my own blog and I just don&#8217;t have time to start a whole new blog for it. Since gHacks is a tech blog we thought we&#8217;d try it out here with Martin and see how it goes. if you like the idea of similar posts here on gHacks please let us know in the comments (and also if you don&#8217;t), we want to post stuff you guys are interested in, so feel free to boo it on out of here! So here goes nothing:</p>
<p>If you&#8217;ve been coding for a while you probably have some set ways in which you work. I recommend you also widen this method to naming variables, which when done consistently can be a huge help, especially when you are using some fancy MySQL along with your PHP code. If you are building a site with 15 MySQL tables it is helpful if you know all the column names because you always name them in the same way, but the same thing goes for simple variables, and even ids and classes for HTML elements. </p>
<p>A very common example can be variables which hold a user&#8217;s data. In my case I always use the variable &#8216;$u&#8217; for holding the username, and the variable &#8216;$p&#8217; for holding the password. If you are grabbing a lot of data, like first name, last name, email and so on you can make up your own standard set, I use &#8216;$fn&#8217;, &#8216;$ln&#8217; and &#8216;$e&#8217; respectively for the three. </p>
<p><span id="more-9555"></span>Since you usually use these variables in the same script the importance of naming them consistently may not seem like a huge time saver. However when you get into session variables it saves you a lot of time if you don&#8217;t always have to look at where you are defining them to find out the names of each. I pull user data using a mysql query when a user logs in and I immediately place the whole array in a session variable name &#8220;$_SESSION['user']&#8220;. The names of the columns represent the values of this array, so the username and email would respectively become &#8220;$_SESSION['user']['Username']&#8220;, &#8220;$_SESSION['user']['Email']&#8220;. This is the same in my case for every single website I build where applicable. </p>
<p>User data naming consistency is also very prominent in the MySQL tables themselves. As you can see above my columns are also named the same in each case, a user&#8217;s email is always &#8220;Email&#8221;, his last name is always &#8220;LastName&#8221;. I steer clear of abbreviations with MySQL tables so other coders can easily see what&#8217;s going on as well. Consistency doesn&#8217;t just apply to the actual names, you can also apply it to cases. As you can see all my column names are always capitalized, they are like wikiwords, but user session variables which don&#8217;t come from MySQL are not capitalized. For example, when a user logs in he is assigned a time, which is usually one hour. If he/she is inactive for more than this time (no refreshes), he/she is logged out. There is no need to store this in the database, and so I know that this is not in there the session variable here is &#8220;$_SESSION['user']['time']&#8220;. This means that if I come back to work on a site a year after completion I know exactly where variables come from. </p>
<p>Even if you don&#8217;t yet know any PHP, you&#8217;re just getting into HTML and CSS you can still use these good practices. When assigning ids and classes to elements try and work out a structure for yourself that you always use. I use empty div tags to clear floats a lot, so I have a separate class named &#8220;cl&#8221; for this purpose. Whenever I start out a new webpage I include this class by default in the stylesheet since I know I will most likely need it. </p>
<p>That&#8217;s about it for standardizing your coding work, most of it is just common sense really. Try and work out your own method which works best for you. It takes time and a lot of practice to get a system working well since there is so much to think of, but if you always keep this in mind somewhere while coding you&#8217;ll be a faster and better coder in no time at all!</p>

	Tags: <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/03/16/web-development-roundup/" title="Web development roundup (March 16, 2009)">Web development roundup</a> (1)</li>
	<li><a href="http://www.ghacks.net/2008/12/28/portable-web-server/" title="Portable Web Server (December 28, 2008)">Portable Web Server</a> (8)</li>
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/" title="Local Apache Web Server Wampserver (September 17, 2009)">Local Apache Web Server Wampserver</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/01/02/web-development-standardizing-variables-to-code-faster/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Portable Web Server</title>
		<link>http://www.ghacks.net/2008/12/28/portable-web-server/</link>
		<comments>http://www.ghacks.net/2008/12/28/portable-web-server/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 15:28:53 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[The Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache portable]]></category>
		<category><![CDATA[apache server]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[pearl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[portable web server]]></category>
		<category><![CDATA[server2go]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=9407</guid>
		<description><![CDATA[Server2Go is a portable web server that can be run from any storage space in a Windows environment. It can be placed on USB devices, removable devices, CDs, DVDs or the hard drive of the computer. It requires no installation at all and can be run right from the location where it has been placed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.server2go-web.de/download/download.html">Server2Go</a> is a portable web server that can be run from any storage space in a Windows environment. It can be placed on USB devices, removable devices, CDs, DVDs or the hard drive of the computer. It requires no installation at all and can be run right from the location where it has been placed it.</p>
<p>The web server can be downloaded in various configurations. The various configurations range from a bare-bone Apache web server to a web server supporting MySQL, SQLite, Pearl and PHP. The configuration only has an effect on the type of applications that can be run on the web server. Most users will probably need at least MySQL and PHP support to run their websites locally.</p>
<p>The web server can be started by double-clicking on the Server2Go.exe executable file in the root directory of the server. This will load the various web server modules and display a start page in the web browser. The pms_config.ini file can be used to change various settings of the web server including the default web browser, the port and whether the modules like MySQL or PHP should be started as well.</p>
<p><span id="more-9407"></span><img src="http://www.ghacks.net/wp-content/uploads/2008/12/server2go-500x253.jpg" alt="server2go" title="server2go" width="500" height="253" class="alignnone size-medium wp-image-9408" /></p>
<p>The actual files of a website are placed in the htdocs directory of the web server. Loading them can be as easy as pointing your browser to 127.0.0.1:4001 or some subdirectory of it depending on the type of site.</p>
<p>MySQL comes with phpMyAdmin which is accessible from the main interface of the web server. Server2Go offers an uncomplicated way to run a web server, it is especially helpful in environments where software installations are restricted.</p>

	Tags: <a href="http://www.ghacks.net/tag/apache/" title="apache" rel="tag">apache</a>, <a href="http://www.ghacks.net/tag/apache-portable/" title="apache portable" rel="tag">apache portable</a>, <a href="http://www.ghacks.net/tag/apache-server/" title="apache server" rel="tag">apache server</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/pearl/" title="pearl" rel="tag">pearl</a>, <a href="http://www.ghacks.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://www.ghacks.net/tag/portable-web-server/" title="portable web server" rel="tag">portable web server</a>, <a href="http://www.ghacks.net/tag/server2go/" title="server2go" rel="tag">server2go</a>, <a href="http://www.ghacks.net/tag/sqlite/" title="sqlite" rel="tag">sqlite</a>, <a href="http://www.ghacks.net/tag/web-server/" title="web server" rel="tag">web server</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/" title="Local Apache Web Server Wampserver (September 17, 2009)">Local Apache Web Server Wampserver</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/" title="How to: Install a LAMP server (July 23, 2009)">How to: Install a LAMP server</a> (7)</li>
	<li><a href="http://www.ghacks.net/2007/01/31/host-your-own-webserver/" title="Host your own webserver (January 31, 2007)">Host your own webserver</a> (18)</li>
	<li><a href="http://www.ghacks.net/2009/01/02/web-development-standardizing-variables-to-code-faster/" title="Web Development: Standardizing variables to code faster (January 2, 2009)">Web Development: Standardizing variables to code faster</a> (18)</li>
	<li><a href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/" title="Web Development: PHP &#8211; what role does it fill (February 1, 2009)">Web Development: PHP &#8211; what role does it fill</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/12/28/portable-web-server/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Install phpmyadmin for easy MySQL administration</title>
		<link>http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/</link>
		<comments>http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 01:17:26 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[Tutorials Advanced]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux database server]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=9194</guid>
		<description><![CDATA[I have been working with LAMP (Linux Apache, MySQL, PHP) servers for a long time. But not matter how much experience I have with them one of the first things I, do after the LAMP installation, is to install phpMyAdmin. This tool makes database administration so much easier than the command line. And when your [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working with LAMP (Linux Apache, MySQL, PHP) servers for a long time. But not matter how much experience I have with them one of the first things I, do after the LAMP installation, is to install phpMyAdmin. This tool makes database administration so much easier than the command line. And when your job is rolling out sites that depend upon MySQL databases, you know how quickly MySQL can fubar a quick deployment.</p>
<p>In this article you will learn how to install and configure the phpMyAdmin MySQL tool.</p>
<p><span id="more-9194"></span>The first step is to download phpMyAdmin. You can get this tool from the <a title="phpMyAdmin download page" href="http://www.phpmyadmin.net/home_page/downloads.php" target="_blank">phpMyAdmin download page</a>. Once you have this downloaded you will need to move the file into the document root of your web server (you will need to have root or sudo access to do this and the setup) Most likely this will be either <em>/var/www/html </em>or <em>/var/www</em>. Once you have this file in the proper locaton it is time to take care of business.</p>
<p>The first thing to do is to unpack the file. The unpacking command will depend upon what file format you download. Let&#8217;s use the .gz file for an example. With the file <a href="http://prdownloads.sourceforge.net/phpmyadmin/phpMyAdmin-3.1.1-english.tar.gz?download#%21md5%217b92c4a670bba085484e7f3a7c25e825">phpMyAdmin-3.1.1-english.tar.gz</a> in place issue the command:</p>
<p>tar xvzf phpMyAdmin-3.11-english.tar.gz</p>
<p>The resulting directory will be <strong>phpMyAdmin</strong>. I highly recommend changing the name of that directory to something easier to navigate and remember. I generally just change the directory with the command <em>mv phpMyAdmin phpmyadmin</em>.</p>
<p>Now that the directory is correct move into the directory. There is one file in particular you must have which is the <strong>config.inc.php<em> </em></strong>file. You will notice there is a file called <strong>config.sample.inc.php</strong>. Some documentation instructs to change the name of <strong>config.sample.inc.php</strong> to <strong>config.inc.php</strong> and make your changes from within that file. It is my opinion that method can become confusing with all of the extra options included. Instead create the new config file with the following contents (depending upon your setup):</p>
<p><code>&lt;?php<br />
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */<br />
/*<br />
* Servers configuration<br />
*/<br />
$i = 0;<br />
/*<br />
* First server<br />
*/<br />
$i++;<br />
$cfg['Servers'][$i]['user'] = 'root';<br />
$cfg['Servers'][$i]['password'] = 'ROOT_PASSWORD';<br />
$cfg['Servers'][$i]['verbose'] = '';<br />
$cfg['Servers'][$i]['host'] = 'localhost';<br />
$cfg['Servers'][$i]['port'] = '';<br />
$cfg['Servers'][$i]['socket'] = '';<br />
$cfg['Servers'][$i]['connect_type'] = 'tcp';<br />
$cfg['Servers'][$i]['extension'] = 'mysqli';<br />
$cfg['Servers'][$i]['auth_type'] = 'config';<br />
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;<br />
$cfg['Servers'][$i]['nopassword'] = true;<br />
?&gt;<br />
</code></p>
<p>There are a few pieces to note. First make sure you use the actual root mysql password where you see ROOT_PASSWORD. Also, if you want to prompted each time for your login information change <em>&#8216;config&#8217; </em>to <em>&#8216;cookie&#8217;</em> in the <em>&#8216;auth_type&#8217; </em>line.</p>
<p>Once you have that configuration file in place you should be able to log into your phpmyadmin system. To do this you will enter http://ADDRESS_TO_SERVER/phpmyadmin/ in your browser (where ADDRESS_TO_SERVER is the IP Address or URL that points to the server.</p>
<p>If, for some reason, this configuration file does not work for you give the web-based setup script a try. To run this point your browser to http://ADDRESS_TO_SERVER/phpmyadmin/setup<em> </em>to start the graphical setup process.</p>
<p>After you are logged in it should be pretty obvious how to create a new database. You simple enter thename you want to give the database and click the Create button.</p>
<p>You&#8217;re done! You now have a phpmyadmin install ready to serve you.</p>

	Tags: <a href="http://www.ghacks.net/tag/database/" title="database" rel="tag">database</a>, <a href="http://www.ghacks.net/tag/lamp/" title="LAMP" rel="tag">LAMP</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/linux-database-server/" title="Linux database server" rel="tag">Linux database server</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/phpmyadmin/" title="phpmyadmin" rel="tag">phpmyadmin</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/" title="Set up MySQL database replication (April 9, 2009)">Set up MySQL database replication</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/10/install-drupal-on-a-lamp-server/" title="Install Drupal on a LAMP Server (February 10, 2009)">Install Drupal on a LAMP Server</a> (2)</li>
	<li><a href="http://www.ghacks.net/2009/01/12/backup-mysql-databases-in-linux-regularly/" title="Backup MySQL Databases In Linux Regularly (January 12, 2009)">Backup MySQL Databases In Linux Regularly</a> (11)</li>
	<li><a href="http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/" title="PHP &#8211; what it does and what it doesn&#8217;t (February 16, 2009)">PHP &#8211; what it does and what it doesn&#8217;t</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/" title="How to: Install a LAMP server (July 23, 2009)">How to: Install a LAMP server</a> (7)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Have WordPress back-ups emailed</title>
		<link>http://www.ghacks.net/2008/11/05/have-wordpress-back-ups-emailed/</link>
		<comments>http://www.ghacks.net/2008/11/05/have-wordpress-back-ups-emailed/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 18:01:59 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[The Web]]></category>
		<category><![CDATA[back up]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=8064</guid>
		<description><![CDATA[We are always told how important it is to back-up our blog, in case it is hacked, which does actually happen. My personal blog, Webby&#8217;s World, I am ashamed to admit, has been hacked a few times.
Backing up seems somewhat of a chore and whilst a cron job can be set up, a WordPress plug-in [...]]]></description>
			<content:encoded><![CDATA[<p>We are always told how important it is to back-up our blog, in case it is hacked, which does actually happen. My personal blog, Webby&#8217;s World, I am ashamed to admit, has been hacked a few times.</p>
<p>Backing up seems somewhat of a chore and <a href="http://www.tamba2.org.uk/wordpress/cron/">whilst a cron job can be set up</a>, a WordPress plug-in makes backing up a blog&#8217;s mySQL database absolutely hassle free.</p>
<p><a href="http://www.ilfilosofo.com/blog/wp-db-backup/">WordPress Database Backup</a> allows database backups to be emailed, saved to a hard disk or saved to a server.</p>
<p><span id="more-8064"></span>Having the back-up emailed may be favourable, especially if you use a service like <a href="http://www.ghacks.net/2009/02/09/gmail-90-tools-and-tips-to-make-you-a-gmail-pro/">Gmail</a> with large amounts of storage and reliable hosting. </p>
<p>A useful trick is to set up a Gmail filter to separate backups so quick access is available. Different tables can be backed up, so spam and statistics can be excluded.</p>
<p>Databases can be gzipped, and the SQL file inside the archive can then just be imported should the weblog to be hacked.</p>
<p>Naturally, WordPress Database Backup does not back up files, so images, templates and plugins must be backed up separately.</p>

	Tags: <a href="http://www.ghacks.net/tag/back-up/" title="back up" rel="tag">back up</a>, <a href="http://www.ghacks.net/tag/backup/" title="backup" rel="tag">backup</a>, <a href="http://www.ghacks.net/tag/database/" title="database" rel="tag">database</a>, <a href="http://www.ghacks.net/tag/mysql/" title="mysql" rel="tag">mysql</a>, <a href="http://www.ghacks.net/tag/wordpress/" title="wordpress" rel="tag">wordpress</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/" title="Set up MySQL database replication (April 9, 2009)">Set up MySQL database replication</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/09/30/lifestream-backup-free-1-year-accounts-for-ghacks-readers/" title="Lifestream Backup: Free 1 Year Accounts For Ghacks Readers (September 30, 2009)">Lifestream Backup: Free 1 Year Accounts For Ghacks Readers</a> (5)</li>
	<li><a href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" title="Install phpmyadmin for easy MySQL administration (December 20, 2008)">Install phpmyadmin for easy MySQL administration</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/" title="Database Monitoring Software Db2rss (July 30, 2009)">Database Monitoring Software Db2rss</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/" title="Basic postgresql server setup (November 10, 2009)">Basic postgresql server setup</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/11/05/have-wordpress-back-ups-emailed/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
