<?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>Chromic Design &#187; MySQL</title>
	<atom:link href="http://www.chromicdesign.com/category/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.chromicdesign.com</link>
	<description>Design With A Chrome</description>
	<lastBuildDate>Fri, 06 Aug 2010 05:59:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Setting Up Perl and CGI For Wamp Server WAMP(P)</title>
		<link>http://www.chromicdesign.com/2009/05/setting-up-perl-for-wampp.html</link>
		<comments>http://www.chromicdesign.com/2009/05/setting-up-perl-for-wampp.html#comments</comments>
		<pubDate>Tue, 05 May 2009 21:04:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CGI]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Wamp]]></category>

		<guid isPermaLink="false">http://www.chromicdesign.com/?p=229</guid>
		<description><![CDATA[I work on Perl and CGI recently for my college project and so I decided to write a few steps on setting up Perl and CGI with Wamp Server. I hope this might be useful. Step1: First you need to download Wamp Server from www.wampserver.com and install Wamp Server on your machine. The default installation [...]]]></description>
			<content:encoded><![CDATA[<p>I work on Perl and CGI recently for my college project and so I decided to write a few steps on setting up Perl and CGI with Wamp Server. I hope this might be useful.</p>
<p><strong>Step1:</strong><br />
First you need to download Wamp Server from <a title="Download Wamp Server" href="http://www.wampserver.com/en/download.php" target="_blank">www.wampserver.com</a> and install Wamp Server on your machine. The default installation directory is &#8216;<em>C:\wamp</em>&#8221; and here I am using the default options for installation. To complete the installation you have to set the host name for your mail server and your email address, here you can leave the default option again. That will do no harm.</p>
<p>The current Wamp Server will install Apache 2.2.11, PHP 5.2.9-2 + PECL, MySQL 5.1.33, SQLitemanager and PhpMyadmin. <span id="more-229"></span></p>
<p><strong>Step2:</strong><br />
Now you have to download ActivePerl (currently 5.10.0) from <a href="http://www.activestate.com/activeperl/" target="_blank">www.activestate.com</a> and install it. The default installation directory is &#8220;<em>C:\Perl</em>&#8220;, but for simplicity and ease of use I use different directory. I create a new folder name &#8220;<em>perl</em>&#8221; inside &#8220;<em>C:\wamp\bin</em>&#8220;. So I install Active Perl in &#8220;<em>C:\wamp\bin\perl</em>&#8221; directory. The next thing you need to do is configure the Apache web server to execute Perl and CGI script.</p>
<p><strong>Step3:</strong><br />
This is the most important part here. You need to edit the Apache configuration file. Now go to &#8220;<em>C:\wamp\bin\apache\Apache2.2.11\conf</em>&#8221; directory and open &#8220;<em>httpd.conf</em>&#8221; file. Edit the httpd.conf file as below.</p>
<p>1. Inside <em>httpd.conf</em>, look for the line that says &#8220;<em>&lt;Directory &#8220;c:/wamp/www/&#8221;&gt;</em>&#8220;, just a few lines below this you&#8217;ll find the line that says &#8220;<em>Options Indexes FollowSymLinks</em>&#8220;. Add &#8220;<em>Includes ExecCGI</em>&#8221; in the line just next to FollowSymLinks, thus it look like this</p>
<pre name="code" class="xhtml">Options Indexes FollowSymLinks Includes ExecCGI</pre>
<p>This will enable CGI script inside your www folder.</p>
<p>2. Now look for the line &#8220;<em>AddHandler cgi-script .cgi</em>&#8220;, this line is commented out. You need to enable this by un-comment this line, to do that remove the # character at the beginning of this line. This will add handler for files with .cgi extension. If you want to use .pl file extension in your server add &#8220;AddHandler cgi-script .pl&#8221; just below the above line. Now you will be able to execute CGI and Perl script with .cgi and .pl, extension.</p>
<p>Lines to add</p>
<pre name="code" class="xhtml">AddHandler cgi-script .cgi
AddHandler cgi-script .pl</pre>
<p>3. To add directory index file, look for the line &#8220;<em>DirectoryIndex index.php index.php3 index.html index.htm</em>&#8220;. Add <em>index.cgi</em> and <em>index.pl</em> in this line.</p>
<p>Lines to add</p>
<pre name="code" class="xhtml">DirectoryIndex index.php index.php3 index.html index.htm index.cgi index.pl</pre>
<p><em>Alternative:</em> If you do not want to waste your time doing the above 3 steps, you can download the edited configuration file <a href="http://www.chromicdesign.com/downloads/httpd.conf">httpd.conf</a> here. Replace the one inside your apache directory with this one.</p>
<p><strong>Step4:</strong><br />
Your server is now configured and ready to run perl and cgi script. Next thing you might need to do is to configure perl to use mysql database. You need to download and install mysql driver to enable database connection through your perl script. You have to grab the driver from the ActivePerl package repository. However, mysql driver module is not available in the default ActivePerl Package Repository. So, you need to add additional repository and install from that repository. Follow the steps below:</p>
<p>1. Open command prompt [<em>type cmd in run</em>], then type &#8220;<em>ppm repo add uwinnipeg</em>&#8221; and press enter.</p>
<p><a href="http://www.chromicdesign.com/wp-content/uploads/2009/05/perl-ppm-command-line1.jpg"><img class="aligncenter size-full wp-image-254" title="perl-ppm-command-line1" src="http://www.chromicdesign.com/wp-content/uploads/2009/05/perl-ppm-command-line1.jpg" alt="perl-ppm-command-line1" width="674" height="339" /></a></p>
<p>2. After the &#8220;<em>uwinnipeg</em>&#8221; repository is added successfully, you can install DBD-mysql by typing this command &#8220;<em>ppm install DBD-mysql</em>&#8221; and hit enter.</p>
<p><a href="http://www.chromicdesign.com/wp-content/uploads/2009/05/perl-ppm-command-line2.jpg"><img class="aligncenter size-full wp-image-254" title="perl-ppm-command-line2" src="http://www.chromicdesign.com/wp-content/uploads/2009/05/perl-ppm-command-line2.jpg" alt="perl-ppm-command-line2" width="674" height="339" /></a></p>
<p><em><strong>Note:</strong> The ActivePerl default package repository contains DBD-mysqlPP module. If you install that one, you will get an error in your SQL SELECT query and especially when you use the WHERE clause. Your localhost will hang if you run this kind of query with the WHERE clause, so to get it work you need to install the package that I mentioned above only.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromicdesign.com/2009/05/setting-up-perl-for-wampp.html/feed</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Renaming Multiple MySQL Tables Within A Few Seconds</title>
		<link>http://www.chromicdesign.com/2009/03/renaming-multiple-mysql-tables-within-a-few-seconds.html</link>
		<comments>http://www.chromicdesign.com/2009/03/renaming-multiple-mysql-tables-within-a-few-seconds.html#comments</comments>
		<pubDate>Sat, 28 Feb 2009 20:23:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://www.chromicdesign.com/?p=137</guid>
		<description><![CDATA[This can be used to rename the prefix or suffix of a table, but not the whole table name. I came up with this simple tips on renaming multiple tables in your MySQL database within a few seconds.Recently, I was googling on how to rename multiple tables at once in MySQL Database. I came across [...]]]></description>
			<content:encoded><![CDATA[<p><em>This can be used to rename the prefix or suffix of a table, but not the whole table name.</em></p>
<p>I came up with this simple tips on renaming multiple tables in your MySQL database within a few seconds.Recently, I was googling on how to rename multiple tables at once in MySQL Database. I came across few tips but they didn&#8217;t meet my needs. So I came up with this simple way of doing it.</p>
<p>First, you need to have a text editor having &#8216;<strong>Find and Replace</strong>&#8216; feature. Almost every text editor available will be having this feature. I am using Notepad++ for the text editor. The next thing you need to do is to export your database having the tables you need to rename. Export your database to an SQL file and save it on your computer. Now, fire up the text editor of your choice and open the SQL file you downloaded just now. Click the Find and Replace option from your text editor. Find your table name and then type the table name in the &#8216;<strong>Find</strong>&#8216; field, and type the replacement string in the &#8216;<strong>Replace</strong>&#8216; field. Then click &#8216;<strong>Replace All</strong>&#8216; and save the SQL file. For example, If your table name is <strong>tbl_mytable</strong>, you can find the string <strong>tbl_</strong> and replace it with <strong>tl1_. </strong>The find and replace procedure might be different with different editors but they are likely to be similar.</p>
<p>Now, go to phpMyAdmin and drop or backup all the tables inside your database. Import the SQL file you have just edited from your phpMyAdmin and now you are good to go with your tables having new name.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromicdesign.com/2009/03/renaming-multiple-mysql-tables-within-a-few-seconds.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

