<?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>TechPitcher &#187; MySQL</title>
	<atom:link href="http://www.techpitcher.com/category/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.techpitcher.com</link>
	<description></description>
	<lastBuildDate>Mon, 20 Dec 2010 10:28:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing mysql in linux</title>
		<link>http://www.techpitcher.com/installing-mysql-in-linux.html</link>
		<comments>http://www.techpitcher.com/installing-mysql-in-linux.html#comments</comments>
		<pubDate>Fri, 27 Feb 2009 05:47:08 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[J2ee]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=152</guid>
		<description><![CDATA[To install mysql type following command in terminal

$ sudo apt-get install mysql-server

When installation is done, you may want to setup password for root

sudo mysqladmin -u root -h localhost password 'test'
sudo mysqladmin -u root -h hostname password 'test'

Replace hostname and &#8216;test&#8217; with your actually hostname and desired 
]]></description>
			<content:encoded><![CDATA[<p>To install mysql type following command in terminal</p>
<pre class="brush: xml;">
$ sudo apt-get install mysql-server
</pre>
<p>When installation is done, you may want to setup password for root</p>
<pre class="brush: xml;">
sudo mysqladmin -u root -h localhost password 'test'
sudo mysqladmin -u root -h hostname password 'test'
</pre>
<p>Replace hostname and &#8216;test&#8217; with your actually hostname and desired </p>
<p><a href="http://techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html"><< Back to Setting up j2ee developer environment … </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/installing-mysql-in-linux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up j2ee developer environment in ubuntu/linux</title>
		<link>http://www.techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html</link>
		<comments>http://www.techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html#comments</comments>
		<pubDate>Tue, 03 Feb 2009 18:10:37 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[J2ee]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=110</guid>
		<description><![CDATA[A java developer machine has following most frequent tools in his machine.
1.  Sun JDK 6.0
2.  Eclispe 3.4
3.  Tomcat 6.X
4.  MySql 5
5.  Apache 2
Currently above are the popular versions, please update version if a newer version is available. Also, I have tried to list down all the necessary links and commands so that you can save [...]]]></description>
			<content:encoded><![CDATA[<p>A java developer machine has following most frequent tools in his machine.<br />
1.  <a href="http://techpitcher.com/installing-jdk-in-ubuntulinux.html">Sun JDK 6.0</a><br />
2.  <a href="http://techpitcher.com/installing-eclipse-in-ubuntulinux.html">Eclispe 3.4</a><br />
3.  <a href="http://techpitcher.com/installing-tomcat-in-ubuntulinux.html">Tomcat 6.X</a><br />
4.  <a href="http://techpitcher.com/installing-mysql-in-linux.html">MySql 5</a><br />
5.  Apache 2</p>
<p>Currently above are the popular versions, please update version if a newer version is available. Also, I have tried to list down all the necessary links and commands so that you can save time in finding these links or commands.</p>
<p>if you find something missing, please post a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Connecting to mysql database</title>
		<link>http://www.techpitcher.com/connecting-to-mysql-database.html</link>
		<comments>http://www.techpitcher.com/connecting-to-mysql-database.html#comments</comments>
		<pubDate>Sun, 16 Nov 2008 13:28:05 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=89</guid>
		<description><![CDATA[Below is the code for creating mysql connection in java and php.
Please make sure that mysql-connector-java-5.0.6-bin.jar is in class path.

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MySqlConnectionTest {
    public static void main(String[] args) {
        Connection connection = null;

        try {
 [...]]]></description>
			<content:encoded><![CDATA[<p>Below is the code for creating mysql connection in java and php.<br />
Please make sure that mysql-connector-java-5.0.6-bin.jar is in class path.</p>
<pre class="brush: java;">
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MySqlConnectionTest {
    public static void main(String[] args) {
        Connection connection = null;

        try {
            Class.forName(&quot;com.mysql.jdbc.Driver&quot;).newInstance();
            // We want to connect to a database name 'test' in mysql.
            connection = DriverManager.getConnection(&quot;jdbc:mysql://127.0.0.1:3306/test&quot;, &quot;root&quot;, &quot;root&quot;);

            if (!connection.isClosed()) {
                System.out.println(&quot;Successfully connected to MySQL server...&quot;);
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (connection != null) {
                    connection.close();
                }
           } catch (SQLException e) {
       }
    }
  }
}
</pre>
<p>Below is the code in php for mysql connection.</p>
<pre class="brush: php;">
&lt;?php
    $hostname='localhost'; //// specify host
    $user='root'; //// database user name
    $password='root'; //// database password
    $database='test'; //// database name
    $connection = mysql_connect(&quot;$hostname&quot; , &quot;$user&quot; , &quot;$passwprd&quot;)
    or die (&quot;Unable connect to MySQL&quot;);
    $db = mysql_select_db($database , $connection) or die (&quot;Can't find database.&quot;);
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/connecting-to-mysql-database.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup of mysql database</title>
		<link>http://www.techpitcher.com/backup-of-mysql-database.html</link>
		<comments>http://www.techpitcher.com/backup-of-mysql-database.html#comments</comments>
		<pubDate>Wed, 22 Oct 2008 18:09:40 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=75</guid>
		<description><![CDATA[Use the following command to get backup of complete mysql database.

shell&#62; mysqldump -u [username] -p[password] –all-databases &#62; [backupfile.sql]
–if you want to take backup of selective database then u need to specify database name like
shell&#62; mysqldump -u [username] -p[password] –databases [databasename] &#62; [backupfile.sql]

Syntax in above commands are explained below
username &#8211; User name of mysql database
password &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Use the following command to get backup of complete mysql database.</p>
<pre class="brush: xml;">
shell&gt; mysqldump -u [username] -p[password] –all-databases &gt; [backupfile.sql]
–if you want to take backup of selective database then u need to specify database name like
shell&gt; mysqldump -u [username] -p[password] –databases [databasename] &gt; [backupfile.sql]
</pre>
<p>Syntax in above commands are explained below<br />
username &#8211; User name of mysql database<br />
password &#8211; Password of mysql database<br />
databasename &#8211; Name of the database you want to take backup<br />
backupfile &#8211; Name of the backup file<br />
<a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/backup-of-mysql-database.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing root user password in mysql</title>
		<link>http://www.techpitcher.com/changing-root-user-password-in-mysql.html</link>
		<comments>http://www.techpitcher.com/changing-root-user-password-in-mysql.html#comments</comments>
		<pubDate>Sat, 18 Oct 2008 15:23:32 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=71</guid>
		<description><![CDATA[Changing root user password in mysql
Resetting root password on window
1. Log in to the window using admin credentials
2. Check if ur mysql server is running, if so stop it. To stop mysql server go to
Start Menu -&#62; Control Panel -&#62; Administrative Tools -&#62; Services
Go to MYSQL and stop it.
3. Save the following commands in a [...]]]></description>
			<content:encoded><![CDATA[<p>Changing root user password in mysql</p>
<p>Resetting root password on window<br />
1. Log in to the window using admin credentials<br />
2. Check if ur mysql server is running, if so stop it. To stop mysql server go to<br />
Start Menu -&gt; Control Panel -&gt; Administrative Tools -&gt; Services<br />
Go to MYSQL and stop it.<br />
3. Save the following commands in a file. lets call it mysql-password-reset.txt and save this file to c drive.</p>
<pre class="brush: xml;">
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;
</pre>
<p>4.Start MYSQL using mysqld-nt with file option.<br />
The mysqld-nt.exe process is used within the mySQL Database server application to handle SQL requests and provide general access to the database.<br />
5. C:\Program Files\MySQL\MySQL Server 5.0\bin&gt;mysqld-nt &#8211;init-file=C:\mysql-password-reset.txt<br />
6. MYSQL server will start successfully.<br />
7. Stop the server and delete the file and start the MYSQL server in normal mode.<br />
8. To start server in normal mode go to services and start the MYSQL service.</p>
<p>Resetting root password on unix system<br />
1. Stop mysql server if running.</p>
<pre class="brush: xml;">
$ /etc/init.d/mysql stop
</pre>
<p>2. Now start MYSQL using following command.</p>
<pre class="brush: xml;">
$ mysqld_safe --skip-grant-tables &amp;
</pre>
<p>3. Now log into mysql server using</p>
<pre class="brush: xml;">
$ mysql -u root
</pre>
<p>4. You will see mysql command line. Now you can reset your new root password</p>
<pre class="brush: xml;">
mysql&gt; use mysql;
mysql&gt; update user set password=PASSWORD(&quot;NEW-PASSWORD&quot;) where User='root';
mysql&gt; flush privileges;
mysql&gt; quit
</pre>
<p>5. Stop mysql server</p>
<pre class="brush: xml;">
$ /etc/init.d/mysql stop
</pre>
<p>6. Your new password is set. You can use new passowrd to log in to mysql.</p>
<p>References<br />
<a href="http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html">http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/changing-root-user-password-in-mysql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>java.lang.UnsupportedClassVersionError: Bad version number in .class file</title>
		<link>http://www.techpitcher.com/javalangunsupportedclassversionerror-bad-version-number-in-class-file.html</link>
		<comments>http://www.techpitcher.com/javalangunsupportedclassversionerror-bad-version-number-in-class-file.html#comments</comments>
		<pubDate>Thu, 16 Oct 2008 15:11:39 +0000</pubDate>
		<dc:creator>Arora</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Exception]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=70</guid>
		<description><![CDATA[
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)

Why is this exception coming?
]]></description>
			<content:encoded><![CDATA[<pre class="brush: java;">
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
</pre>
<p>Why is this exception coming?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/javalangunsupportedclassversionerror-bad-version-number-in-class-file.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>java.lang.ClassNotFoundException: com.mysql.jdbc.Driver</title>
		<link>http://www.techpitcher.com/javalangclassnotfoundexception-commysqljdbcdriver.html</link>
		<comments>http://www.techpitcher.com/javalangclassnotfoundexception-commysqljdbcdriver.html#comments</comments>
		<pubDate>Wed, 04 Jun 2008 19:03:11 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[J2ee]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Exception]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=10</guid>
		<description><![CDATA[I am getting following exception while connecting to mysql. Please let me know where am I wrong? Thank in advance.

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at MySqlTest.main(MySqlTest.java:18)

]]></description>
			<content:encoded><![CDATA[<p>I am getting following exception while connecting to mysql. Please let me know where am I wrong? Thank in advance.</p>
<pre class="brush: xml;">
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at MySqlTest.main(MySqlTest.java:18)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/javalangclassnotfoundexception-commysqljdbcdriver.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Restoring mysql dump file</title>
		<link>http://www.techpitcher.com/restoring-mysql-dump-file.html</link>
		<comments>http://www.techpitcher.com/restoring-mysql-dump-file.html#comments</comments>
		<pubDate>Tue, 03 Jun 2008 12:27:50 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=12</guid>
		<description><![CDATA[
We have a complex database involving foreign keys and we want to restore such database from dump file. If we try to run mysql dump file directly then there might be some errors related to foreign key constrain. The cause for such errors is that a table restore is called while it has foreign key [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>We have a complex database involving foreign keys and we want to restore such database from dump file. If we try to run mysql dump file directly then there might be some errors related to foreign key constrain. The cause for such errors is that a table restore is called while it has foreign key dependency to some other table which has not been restored yet. To ignore such errors, we need to put one simple sql line (SET FOREIGN_KEY_CHECKS=0;) in the beginning of sql dump file. After adding &#8220;SET FOREIGN_KEY_CHECKS=0;&#8221; remember to add the &#8220;SET FOREIGN_KEY_CHECKS=1;&#8221; at the end of the dump file.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/restoring-mysql-dump-file.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

