<?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>HelpSpa &#187; MySQL</title>
	<atom:link href="http://helpspa.com/category/programming/mysql-p/feed/" rel="self" type="application/rss+xml" />
	<link>http://helpspa.com</link>
	<description>Computer Advice, Help. and Video Tutorials</description>
	<lastBuildDate>Thu, 12 Jan 2012 03:18:39 +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>MySQL Remote Acccess via cPanel &#8211; DHCP &#8211; Dynamic IP</title>
		<link>http://helpspa.com/networking_internet/mysql-remote-acccess-via-cpanel-dhcp-dynamic-ip/</link>
		<comments>http://helpspa.com/networking_internet/mysql-remote-acccess-via-cpanel-dhcp-dynamic-ip/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 14:46:58 +0000</pubDate>
		<dc:creator>David W</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Networking/Internet]]></category>
		<category><![CDATA[cPanel]]></category>

		<guid isPermaLink="false">http://helpspa.com/?p=1809</guid>
		<description><![CDATA[Though it positively has its uses, not everyone like phpMyAdmin for managing databases.  Personally I still like to use the good old MySQL Query Browser, but when your database is hosted via cPanel, getting remote access from your local machine (e.g. your development laptop) can be a pain in the neck.  I&#8217;ve done extensive research [...]]]></description>
			<content:encoded><![CDATA[<p>Though it positively has its uses, not everyone like phpMyAdmin for managing databases.  Personally I still like to use the good old MySQL Query Browser, but when your database is hosted via cPanel, getting remote access from your local machine (e.g. your development laptop) can be a pain in the neck.  I&#8217;ve done extensive research and while there doesn&#8217;t seem to be a solid one-stop solution, in this article I will show you an easy way to get secure remote access to your MySQL database from your development machine (laptop, desktop).</p>
<p>1.<strong> Find the IP of your mysql database server</strong> &#8212; this is the host.  Usually it&#8217;s the shared IP of your hosting account or the dedicated IP of your VPS.  You can go to cPanel and in the left column you should see your IP.   Remember &#8212; this is the <strong>host IP</strong> address for your connection.</p>
<p>2. <strong> Now let&#8217;s find out your IP and domain name<br />
(e.g. how does the word see your computer coming through your cable modem connection). </strong> I tried using a DYNDNS/NO-IP setup to get around the problem of DHCP and cPanel but I couldn&#8217;t get it to work.   So we&#8217;re going to use a workaround to find your exact hostname (the hostname of YOUR machine &#8212; the laptop, desktop, etc) &#8212; and this technique should work even when you are going through a DHCP laptop, for example, through your router through a cable modem.</p>
<p>Go to the connection properties for whatever program you are using. In my case I&#8217;m using MySQL Query Browser which looks like this:</p>
<p><img class="alignnone size-full wp-image-1811" title="qbConng" src="http://helpspa.com/wp-content/uploads/2010/09/qbConng.gif" alt="qbConng" width="502" height="427" /></p>
<p>Note that I just made up this database host  IP address but  what you will do here is put in the real IP of your database host (that you found in step 1), and then enter your username and password.</p>
<p>And naturally, as expected, you will get an error &#8212; which is exactly what we want!</p>
<p>For some reason, even with a service like no-ip running, cPanel didn&#8217;t like the no-ip domain as a host .  So when you hit &#8220;OK&#8221;, you are going to get the mysql 1130 error, which will basically tell you that your database host cannot accept a connection from your machine &#8212; and it will give you the domain you are currently coming from.</p>
<p>3.  <strong>Allow your domain access to your MySQL database in cPanel</strong>.  Now you can take your newly discovered local domain (host) name (e.g the name of the computer you are connecting FROM [your laptop, desktop, etc]) &#8212; and enter this domain name  in the cPanel Remote MySQL area.  To get to this area in cPanel, browse to the Remote MySQL option:</p>
<p><img class="alignnone size-full wp-image-1812" title="remotemysqlg" src="http://helpspa.com/wp-content/uploads/2010/09/remotemysqlg.gif" alt="remotemysqlg" width="430" height="211" /></p>
<p>and in the screen that appears, enter your newly discovered domain name (the name you were given from the mySQL error):</p>
<p><img class="alignnone size-full wp-image-1814" title="mysqlremote2g" src="http://helpspa.com/wp-content/uploads/2010/09/mysqlremote2g.gif" alt="mysqlremote2g" width="482" height="437" /></p>
<p>You will now see this host (what I&#8217;ve been calling your local domain) added to your list.  This list is the list of hosts (domains or computers) that can access your MySQL database remotely.</p>
<p><strong>Now Make the Remote Connection</strong></p>
<p>At this point  you should be able to connect to your MySQL database from your client of choice (e.g MySQL Query Browser) &#8212; using a username and password that has already been created in your database (if not, create a MySQL user in cPanel).    Once you are done with your updating I&#8217;d recommend that you go back into cPanel and remove the host. The reason I suggest this is that it just isn&#8217;t safe to leave a possible open door to your database. You can read more about this in the paragraph below.</p>
<p><strong>Considerations and Caveats</strong></p>
<p>I admit that this is not the cleanest way to get access &#8212; but I find  that it&#8217;s easy.  There&#8217; no SSH to configure and no keys to mess with.   The downside is that each time you want remote access, you need to find your domain (which may or may not change based on your cable/internet provider), you have to add this host to the cPanel approved list, and then you should remove it when you are done.  In theory &#8212; if your cable/internet provider domain doesn&#8217;t change &#8212; then you could leave the host name stored in cPanel.  The risk to leaving this name stored there is that if someone gets your password, then can have full access to your database.  Naturally you should have a VERY strong password if you are even thinking of this approach.  Personally I remove the host when I&#8217;m done so there&#8217;s no risk of unintended access from this port of entry.  And generally speaking, I do many of my database updates in bulk, so taking 2 minutes to go through these steps when I have to do an hour of updating is well worth it considering the time I am saving using my preferred updating program vs MySQL Query Browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://helpspa.com/networking_internet/mysql-remote-acccess-via-cpanel-dhcp-dynamic-ip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Change the Root MySql Password in Windows (video)</title>
		<link>http://helpspa.com/programming/mysql-p/how-to-change-the-root-mysql-password-in-windows-video/</link>
		<comments>http://helpspa.com/programming/mysql-p/how-to-change-the-root-mysql-password-in-windows-video/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 19:48:53 +0000</pubDate>
		<dc:creator>David W</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://helpspa.com/?p=1166</guid>
		<description><![CDATA[In this tutorial we will go over how to change the root password in MySql.   Note that we are not going to use the MySql console, and like with the mysqldump command,  we will be using the windows command prompt.  The root password can also be changed by direct manipulation of the sql tables [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial we will go over how to change the root password in MySql.   Note that we are <strong>not </strong>going to use the MySql console, and like with the mysqldump command,  we will be using the windows command prompt.  The root password can also be changed by direct manipulation of the sql tables via the MySql console, but I believe that the method in the video  below (using the command prompt) is a faster, easier, and safer way to get the job done.  I never like the idea of directly accessing the mysql  tables that store password data, as one wrong keystroke can be catastrophic.</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/QyN46KSfhqU&#038;hl=en_US&#038;fs=1&#038;rel=0&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/QyN46KSfhqU&#038;hl=en_US&#038;fs=1&#038;rel=0&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://helpspa.com/programming/mysql-p/how-to-change-the-root-mysql-password-in-windows-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Setup a Local PHP/MySql Test Environment with WAMPSERVER</title>
		<link>http://helpspa.com/programming/mysql-p/how-to-setup-a-local-phpmysql-test-environment-with-wampserver/</link>
		<comments>http://helpspa.com/programming/mysql-p/how-to-setup-a-local-phpmysql-test-environment-with-wampserver/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 02:38:16 +0000</pubDate>
		<dc:creator>David W</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[wampseve]]></category>

		<guid isPermaLink="false">http://helpspa.com/?p=902</guid>
		<description><![CDATA[One of the most important things we do as web developers is test websites.  While it’s easy to test static .html pages on your local development machine, it’s not as easy to test dynamic pages without some tweaking first.  In this tutorial I will review how to quickly and easily setup a PHP/MySql development environment [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most important things we do as web developers is test websites.  While it’s easy to test static .html pages on your local development machine, it’s not as easy to test dynamic pages without some tweaking first.  In this tutorial I will review how to quickly and easily setup a PHP/MySql development environment on your local PC using WAMPSERVER.   For this tutorial I will assume that you are conceptually familiar with the fact that PHP is a programming language that is commonly used with the MySql database system, which runs on the Apache web server.</p>
<p>Note that the acronym WAMP (Windows – Apache, MySql, PHP) comes from the parallel acronym LAMP (Linux – Apache, MySql, PHP).</p>
<p>Moving along, in order to get PHP and MySql going on your local development machine you need, in general, three things:</p>
<ol>
<li>Apache</li>
<li>PHP</li>
<li>MySQL</li>
</ol>
<p>You may also want to install GUI management software so you don’t have to run MySql from the command line.  Installation of this GUI software is completely optional.  So let’s add an optional item #4.</p>
<p>4.  MySql      GUI software such as phpMyAdmin or MySQL GUI Tools.  (<a href="http://helpspa.com/programming/mysql-p/free-mysql-gui-tools-for-database-development-and-maintenance/">You can read my review of tools for      MySQL GUI access here</a>).</p>
<p>Now that we know what our end goal is, there are two ways to install these three (or four) tools.</p>
<p>1.  <strong>The first is tedious and is the way I used to do it.</strong> First I’d install Apache, then I’d install PHP and configure it to work with Apache, then I’d install MySql and get that running.  Lastly I’d install a GUI tool.  While this method works well and will teach you a thing or two about installing a development environment, it’s often fraught with difficulty due to version compatibly issues and .ini configurations.  Enter WAMPSERVER.</p>
<p>2. <strong> You can install WAMPSERVER. </strong> WAMPSERVER is a package that will install a fully functional PHP/MySql development environment on your PC. It’s available free for <a href="http://www.wampserver.com/en/">download here</a>.</p>
<p>One of the best features of WAMPSERVER is the ability for you to configure PHP extension and Apache modules with one-click ease, as opposed to having to manually configure .ini files (this feature alone makes WAMPSERVER worth it’s weight in gold).</p>
<p><a href="http://helpspa.com/wp-content/uploads/2009/12/wampserver-1.gif"><img class="alignnone size-full wp-image-905" title="wampserver-1" src="http://helpspa.com/wp-content/uploads/2009/12/wampserver-1.gif" alt="wampserver-1" width="232" height="277" /></a></p>
<p>Another fantastic feature is the ability to run multiple versions of PHP at the same time.  Without getting into why you’d need to do this (usually when working with certain PHP frameworks), there are (unfortunate) times where a certain version of PHP is incompatible with what you are working on.  Imagine now, having to install an entirely new WAMP configuration just to change the version of PHP.  Because everything else you are working on may not be compatible with a different PHP version, you may be asking for trouble by upgrading PHP solely for this one problem application or project.   Your only real alternative would be to run a Virtual Machine where you could encapsulate this specific configuration.  And while this isn’t really difficult to do, it’s still time consuming – WAMPSERVER, however, makes this “double PHP” situation completely avoidable.</p>
<p><strong> Post Install</strong></p>
<p>One you install WAMPSERVER you will be able to use it immediately. WAMPSERVER will install an icon in the taskbar that will enable you to seamlessly run your server.</p>
<p>In order to actually run .PHP pages or MySql, you will need to make sure that WAMPSERVER is turned “on”.  To do so, you will need to head to “Start WAMPSERVER” in your Start Menu (for ease of use, I keep the Start WAMPSERVER shortcut in my quick launch menu).</p>
<p><a href="http://helpspa.com/wp-content/uploads/2009/12/wampserver-2.gif"><img class="alignnone size-full wp-image-906" title="wampserver-2" src="http://helpspa.com/wp-content/uploads/2009/12/wampserver-2.gif" alt="wampserver-2" width="289" height="189" /></a></p>
<p>Because WAMPSERVER automatically installs phpMyAdmin, you don’t necessarily need to install any other MySQL GUI tools.  Because phpMyAdmin is great for certain tasks but not others, I also run the free MySql query browser for most of my administration.</p>
<p>I could go on for hours, but now it’s time for you to download and install WAMPSERVER, and see how easy WAMP can be.</p>
]]></content:encoded>
			<wfw:commentRss>http://helpspa.com/programming/mysql-p/how-to-setup-a-local-phpmysql-test-environment-with-wampserver/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Free MySQL GUI tools for Database Development and Maintenance</title>
		<link>http://helpspa.com/programming/mysql-p/free-mysql-gui-tools-for-database-development-and-maintenance/</link>
		<comments>http://helpspa.com/programming/mysql-p/free-mysql-gui-tools-for-database-development-and-maintenance/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 05:16:07 +0000</pubDate>
		<dc:creator>David W</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL GUI]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://helpspa.com/?p=685</guid>
		<description><![CDATA[I&#8217;ve been working with mysql/php for many years, and although there is no substitute for the command line when it comes to certain tasks (like running mysqldump), there are a few MySql GUI programs that I use for almost all of my mysql database development.   I&#8217;ve tested many commercial products, but in the end [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with mysql/php for many years, and although there is no substitute for the command line when it comes to certain tasks (like <a href="http://helpspa.com/programming/mysql-p/mysqldump-error-1064-solved-how-to-use-the-mysqldump-command/">running mysqldump</a>), there are a few MySql GUI programs that I use for almost all of my mysql database development.   I&#8217;ve tested many commercial products, but in the end I still wind up using these free GUI tools for MySql  development.</p>
<p>I will break the tools up into three categories:</p>
<p><strong><a href="#design">I. Database Design and Layout</a></strong><br />
<strong><a href="#admin">II. Database administration, maintenance and data tools.</a></strong><br />
<strong><a href="#query">III. Query Generation, Testing and Maintenance</a></strong></p>
<p><strong><a name="design">I. Database Design and Layout</a></strong></p>
<p>I&#8217;ve tried quite a few database modeling programs and I find myself returning to the<strong> MySql Workbench</strong>, available from MySql directly at <a href="http://dev.mysql.com/downloads/select.php?id=8">http://dev.mysql.com/downloads/select.php?id=8</a>.</p>
<p>This tools is invaluable in  planning, designing, and laying out a database, and  I recommend it for advanced beginners and intermediate users.  I did run into some difficulty, however, when it came to generating sql code from a design where foreign keys are involved. Sometimes the program would not correctly export the foreign key relationships.  Other than that, this is the tool I use to design all of my databases.</p>
<p><strong><a name="admin">II. Database administration, maintenance and data tools.</a></strong><br />
The second set of tools I will describe below are available directly from the MySql websites as the &#8220;GUI Tools&#8221; (<a href="http://dev.mysql.com/downloads/gui-tools/5.0.html">http://dev.mysql.com/downloads/gui-tools/5.0.html</a>).  They are:</p>
<div>MySQL Query Browser</div>
<div>MySQL Administrator</div>
<div>MySQL Migration Toolkit</div>
<p>The most useful of these tools for me is the MySql Query Browser.</p>
<p>1.  The<strong> MySql Query Browser</strong> is a one-stop shop for database creation, modification and data entry.  You can easily execute sql scripts as well as queries.  One of the most useful features is the ability to rapidly create databases as well as the ability to modify databases (e.g. add fields), as these tasks can often be cumbersome via the command line.  It&#8217;s important to understand the sql that&#8217;s going on in the background, but this tool will really allow you to speed-up your development.</p>
<p>2.  <strong>MySQL Administrator</strong> is very helpful for basic user administration tasks.  I don&#8217;t use it nearly as  frequently as the query browser, but it is helpful once again in saving time vs using the command line.</p>
<p>3.  Because I don&#8217;t often work outside of MySql anymore, I don&#8217;t really use the  <strong>MySQL Migration Toolkit</strong>, so I can&#8217;t provide a review for that product here.</p>
<p><strong><a name="query">III. Query Generation, Testing and Maintenance</a><br />
</strong>Working with complex queries can be a chore, and that&#8217;s where <a href="http://www.activedbsoft.com/overview-querytool.html">FlySpeed SQL Query</a> comes into play.  This program comes in  a freeware as well as a commercial version. I use this program to generate and test almost all of my sql queries, prior to using them in my live code.  When I develop I find it&#8217;s imperative to use my time wisely, so by using this tool, I know that my queries are fully functional with the results that I want, <em>prior to adding them to my application</em>.  Because it&#8217;s a GUI, it can really simplify your JOIN queries and queries that use querystrings.</p>
<p>I&#8217;d be interested to see what your experience has been with these tools, or if you have tools that you find to be &#8220;required&#8221;  in your development process.</p>
]]></content:encoded>
			<wfw:commentRss>http://helpspa.com/programming/mysql-p/free-mysql-gui-tools-for-database-development-and-maintenance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create a New Database in MySQL Query Browser</title>
		<link>http://helpspa.com/programming/mysql-p/create-a-new-database-in-mysql-query-browser/</link>
		<comments>http://helpspa.com/programming/mysql-p/create-a-new-database-in-mysql-query-browser/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 01:42:04 +0000</pubDate>
		<dc:creator>David W</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://helpspa.com/?p=289</guid>
		<description><![CDATA[MySQL Query Browser is an excellent (and FREE) GUI tool for managing your MySQL databases. In order to create a new database, follow the steps below. 1. Open MySQL Query Browser. You will be presented with the login screen. Fill in the appropriate information and click OK. 2. You may be presented with the following [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL Query Browser is an excellent (and FREE) GUI tool for managing your MySQL databases.  In order to create a new database, follow the steps below.</p>
<p>1.  Open MySQL Query Browser.  You will be presented with the login screen.  Fill in the appropriate information and click <code>OK</code>.</p>
<p><a href="http://helpspa.com/wp-content/uploads/2009/10/qbdb-12.gif"><img class="alignnone size-full wp-image-299" title="qbdb-1" src="http://helpspa.com/wp-content/uploads/2009/10/qbdb-12.gif" alt="qbdb-1" width="460" height="388" /></a></p>
<p>2.  You may be presented with the following dialog box about the default schema (i.e. database).  Personally because I&#8217;m working with so many databases, I don&#8217;t set a default schema.  So I check the box to not show the message again and then I click <code>Ignore</code>.</p>
<p><a href="http://helpspa.com/wp-content/uploads/2009/10/qbdb-2.gif"><img class="alignnone size-full wp-image-291" title="qbdb-2" src="http://helpspa.com/wp-content/uploads/2009/10/qbdb-2.gif" alt="qbdb-2" width="640" height="297" /></a></p>
<p>3.  Once you are in query browser, go to the right colum where you will see the list of exisiting schema.  Right-click and select <code>Create New Schema</code> or just use the shortcut <code>CTRL-N</code>.</p>
<p><a href="http://helpspa.com/wp-content/uploads/2009/10/qbdb-3.gif"><img class="alignnone size-full wp-image-292" title="qbdb-3" src="http://helpspa.com/wp-content/uploads/2009/10/qbdb-3.gif" alt="qbdb-3" width="631" height="390" /></a></p>
<p>4.  In the box that appears type the name of the new database. In this example I was working with a test install of Joomla so I named the database Joomla. Click <code>OK</code> and that&#8217;s it.</p>
<p><a href="http://helpspa.com/wp-content/uploads/2009/10/qbdb-4.gif"><img class="alignnone size-full wp-image-293" title="qbdb-4" src="http://helpspa.com/wp-content/uploads/2009/10/qbdb-4.gif" alt="qbdb-4" width="553" height="392" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://helpspa.com/programming/mysql-p/create-a-new-database-in-mysql-query-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mySql error 1005 (errno: 150)</title>
		<link>http://helpspa.com/programming/mysql-p/mysql-error-1005-errno-150/</link>
		<comments>http://helpspa.com/programming/mysql-p/mysql-error-1005-errno-150/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 03:01:58 +0000</pubDate>
		<dc:creator>David W</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://helpspa.com/?p=167</guid>
		<description><![CDATA[mySql error 1005 (errno: 150) solution This mysql error occurs when creating a table with the InnoDB engine and is basically telling you that there is a &#8220;foreign key problem&#8221; with your schema. The thing to check to fix this error is to make sure that your foreign key fields are of the same datatype [...]]]></description>
			<content:encoded><![CDATA[<p><strong>mySql error 1005 (errno: 150) solution </strong></p>
<p>This mysql error occurs when creating a table with the InnoDB engine and is basically telling you that there is a &#8220;foreign key problem&#8221; with your schema.</p>
<p>The thing to check to fix this error is to make sure that your foreign key fields are of the same datatype as their source fields.</p>
<p>As an example, assume the main table is &#8220;people&#8221;, and the second table is &#8220;city&#8221;, and that you want the field &#8220;cityID&#8221; in the &#8220;people&#8221; table to relate to the &#8220;cityID&#8221; field in the &#8220;city&#8221; table. Make sure that both &#8220;cityID&#8221; fields are the same datatype (in this case INT).</p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://helpspa.com/programming/mysql-p/mysql-error-1005-errno-150/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL:  How to Change the Database Name</title>
		<link>http://helpspa.com/programming/mysql-p/mysql-how-to-change-the-database-name/</link>
		<comments>http://helpspa.com/programming/mysql-p/mysql-how-to-change-the-database-name/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 03:49:49 +0000</pubDate>
		<dc:creator>David W</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://helpspa.com/?p=106</guid>
		<description><![CDATA[Once you&#8217;ve created a MySQL database and named it you cannot rename the database using standard SQL commands such as ALTER in the same manner as you would rename a table. The way to rename a database is as simple as creating a new, empty database, and then recreating the old database in this new [...]]]></description>
			<content:encoded><![CDATA[<p>Once you&#8217;ve created a MySQL database and named it you cannot rename the database using standard SQL commands such as <code>ALTER</code> in the same manner as you would rename a table. The way to rename a database is as simple as creating a new, empty database, and then recreating the old database in this new database.</p>
<p>Here are the detailed steps:</p>
<p>1. Run a <code>mysqldump</code> on the existing database. Let&#8217;s assume you named the export file <code>myDatabase.sql</code>. For instructions how to do this see <a href="http://www.helpspa.com/programming/mysqldump-error-1064-solved-how-to-use-the-mysqldump-command/" target="_blank">my post about running the mysqldump command</a>.</p>
<p>2. Create a new database using the create database command.</p>
<pre class="brush: shell">CREATE DATABASE newDatabase;</pre>
<p>where <code>newDatabase</code> is the name of the new (renamed) database.</p>
<p>3. Use the USE command to make sure you are working with the new database.</p>
<pre class="brush: shell">USE newDatabase;</pre>
<p>4. Execute the .sql script you generated in step 1 from the old database &#8212; which is easiest to do from phpMyAdmin or from the query browser.</p>
<p>Don&#8217;t forget to add &#8220;;&#8221; to end your statements.</p>
<p>Presto! You now have a renamed database!</p>
]]></content:encoded>
			<wfw:commentRss>http://helpspa.com/programming/mysql-p/mysql-how-to-change-the-database-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysqldump error 1064 &#8212; Solved &#8211; How to use the mysqldump command (video)</title>
		<link>http://helpspa.com/programming/mysql-p/mysqldump-error-1064-solved-how-to-use-the-mysqldump-command/</link>
		<comments>http://helpspa.com/programming/mysql-p/mysqldump-error-1064-solved-how-to-use-the-mysqldump-command/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 03:40:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://helpspa.com/?p=74</guid>
		<description><![CDATA[As I was trying to backup my mysql database with the following command: mysql&#62; mysqldump -uuser -ppass databaseDB &#62; output.sql (where user is the username, pass is the password, and databaseDB is the database name) I continued to receive the following error: ERROR 1064(42000):  You have an error in your SQL syntax; check the manual  [...]]]></description>
			<content:encoded><![CDATA[<p>As I was trying to backup my mysql database with the following command:</p>
<p><code>mysql&gt; mysqldump -uuser -ppass databaseDB &gt; output.sql</code></p>
<p>(where <code>user</code> is the username, <code>pass</code> is the password, and <code>databaseDB</code> is the database name)</p>
<p>I continued to receive the following error:</p>
<p class="alert">ERROR 1064(42000):  You have an error in your SQL syntax; check the manual  that corresponds to your MySQL server version for the right syntax to use near &#8216;mysqldump&#8217; at line 1.</p>
<p>After some searching I realized that my syntax was correct, but I was putting the command in the wrong place!</p>
<p><strong>The mysqldump command needs to run from the command prompt (for windows), NOT in the mysql console!</strong></p>
<p>That&#8217;s it.  Problem solved!</p>
<p>Here is a video that will walk you through basic usage of the mysqldump command:</p>
<div id="video"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/2hsOk0XcYC4" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/2hsOk0XcYC4"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://helpspa.com/programming/mysql-p/mysqldump-error-1064-solved-how-to-use-the-mysqldump-command/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

