<?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>PHP Tutorials &#187; mysql</title>
	<atom:link href="http://phpcollection.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpcollection.com</link>
	<description>PHP Tutorials collection</description>
	<lastBuildDate>Tue, 12 Jul 2011 11:53:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Database basics: Connect to a Mysql Database</title>
		<link>http://phpcollection.com/database-basics-connect-to-a-mysql-database/</link>
		<comments>http://phpcollection.com/database-basics-connect-to-a-mysql-database/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 11:00:30 +0000</pubDate>
		<dc:creator>Php Ninza</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.phpcollection.com/?p=610</guid>
		<description><![CDATA[This tutorial is part of the Tutorial Series Database basics !, Let us learn and try to understand how connecting a mysql database works in PHP Before learning how to connect to a database we should know how to create a database , For creating a database there are several methods that we can use [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This tutorial is part of the Tutorial Series <strong>Database basics</strong> !, Let us learn and try to understand how connecting a mysql database works in PHP</p>
<p>Before learning how to connect to a database we should know how to create a database  ,  For creating a database there are several methods that we can use , Some of the most common methods are Phpmyadmin , Cpanel Mysql database panel and Command line.</p>
<p><strong></strong></p>
<p> Let’s learn the method of connecting to the database, For this create a file called db_operations.php and put these contents there</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-7185707610518533";
/* 468x15, created 7/18/09 */
google_ad_slot = "4241642759";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<span id="more-610"></span></p>
<pre class="brush: php; title: ; notranslate">
$host = &quot;localhost&quot;;
$username = &quot;root&quot;;
$password = &quot;&quot;;
$conn = mysql_connect ($host, $username, $password);
mysql_select_db(&quot;cooking&quot;);
</pre>
<p>Here the variables $host , $username and $password are the three variables that we use to connect to the database , The $host contains the database server name , usually it’s a localhost or a ip address !</p>
<p>$username and the password are the mysql username and password that you require to connect to a database.</p>
<p>Once we have these three login credentials we can easily connect to the database , The mysql function mysql_connect is used to connect to a database . For example </p>
<pre class="php">
$conn = mysql_connect ($host, $username, $password);
</pre>
<p>Here mysql_connect is connecting to the server and storing the output value in the variable $conn, The variable $conn contains the connection handle and can be used anywhere to refer this particular connection.</p>
<p>We have also used the die() function with the mysql_connect which will make the script exit when a successful connection is not made !, Any error occured at unsuccessful connection will print on the browser due to the function mysql_error() called in the die function .</p>
<p>After connection we can easily connect to any database we want and work on sql operations.</p>
<p>Let us know what you think of this particular post ! , Any suggestions , comments are welcome !</p>
]]></content:encoded>
			<wfw:commentRss>http://phpcollection.com/database-basics-connect-to-a-mysql-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BigDump &#8212; Mysql importer&#8211;Ideal for big wordpress blogs</title>
		<link>http://phpcollection.com/bigdump-mysql-importer-ideal-for-big-wordpress-blogs/</link>
		<comments>http://phpcollection.com/bigdump-mysql-importer-ideal-for-big-wordpress-blogs/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 16:48:35 +0000</pubDate>
		<dc:creator>Php Ninza</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://phpcollection.com/?p=3</guid>
		<description><![CDATA[As a wordpress consultant we come across many issues that require us to import or export large mysql database sets. And usually the clients don&#8217;t have ssh access. Phpmyadmin is a great tool , But is a big fail when it comes to handle huge amount of mysql data. Usually ssh or some exporting tool [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>As a wordpress consultant we come across many issues that require us to import or export large mysql database sets. And usually the clients don&#8217;t have ssh access.</p>
<p>Phpmyadmin is a great tool , But is a big fail when it comes to handle huge amount of mysql data. Usually ssh or some exporting tool is used for it.</p>
<p><span id="more-765"></span></p>
<p>I came across a very impressive and blazingly fast mysql database import tool called Big Dump, It uploaded my 40 MB database set in less than 34 secs, which is pretty fast IMO. The same mysql dump was dieing when trying to import from phpmyadmin.</p>
<p>The setup and import function of bigdump is quite straight forward and just need few steps</p>
<p>1:- Just download bigdump zip file from <a href="http://www.ozerov.de/pphlogger/dlcount.php?id=bigdump&amp;url=http://www.ozerov.de/bigdump.zip">this link</a> and unzip it on your desktop.</p>
<p>2:- Open the file bigdump.php in any desired code editor and update the database configuration settings .</p>
<p>3:- After that upload the bigdump.php onto the server in a separate folder.(make sure you can acess this folder from your web broswer)</p>
<p>4:- Upload the desired sql file also in the same folder.</p>
<p>5:-  Run the bigdump script on browser (for example at www.domain.com/folder/bigdump.php ),  It will scan all sql files in the current directory and will give you the list of ones which can be imported.</p>
<p>6:- Click on Start import for starting the import of sql file and within seconds your database will be filled with the complete sql dataset.</p>
]]></content:encoded>
			<wfw:commentRss>http://phpcollection.com/bigdump-mysql-importer-ideal-for-big-wordpress-blogs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

