<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5107346567353753478</id><updated>2011-12-21T14:59:56.000-08:00</updated><title type='text'>Uploading MySQL database and dynamic site to the remote server</title><subtitle type='html'>This tutorial explains how to upload MySQL database and the dynamic site from the local machine to the remote, linux based server.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://uploaddynamicsitetotheserver.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5107346567353753478/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://uploaddynamicsitetotheserver.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sebastian Sulinski</name><uri>http://www.blogger.com/profile/08398739567480175441</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-Mkm1d_zEMok/TvJk4yPEiTI/AAAAAAAAAfw/_ZUYZFRcYRA/s220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5107346567353753478.post-1661574742857528207</id><published>2008-11-09T06:31:00.000-08:00</published><updated>2008-11-10T23:06:22.058-08:00</updated><title type='text'>Uploading MySQL database with dynamic site from the local machine to the remote server</title><content type='html'>&lt;p&gt;In the &lt;a href="http://uploadwebsitewithftp.blogspot.com/" target="_blank" title="Upload files to the remote server using FTP application"&gt;previous part&lt;/a&gt; of this tutorial I&amp;acute;ve shown you how to upload the site to the server.&lt;/p&gt;
&lt;p&gt;In this part I will show you how to upload your MySQL database to the remote server and how to modify your database connection file.&lt;/p&gt;

&lt;p&gt;On your local computer opent the &lt;strong&gt;phpMyAdmin&lt;/strong&gt; or any other MySQL management application and export the database you want to upload to the server.&lt;/p&gt;

&lt;p style="font-weight:bold;color:#900;"&gt;Exporting MySQL database using phpMyAdmin&lt;/p&gt;

&lt;p&gt;If you haven&amp;acute;t got phpMyAdmin installed on your machine you can learn how to do it by following &lt;a href="http://www.sebastiansulinski.co.uk/web_design_tutorials/web_server/phpmyadmin/phpmyadmin.php" target="_blank" title="Install phpMyAdmin"&gt;one of my tutorials&lt;/a&gt; which explains it step by step.&lt;/p&gt;
&lt;p&gt;Login to the phpMyAdmin on your local machine and one the left hand side click the name of the database you want to export (Fig. 01), in my case it will be &lt;strong&gt;my_database&lt;/strong&gt;.&lt;/p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_r5jym2VH3d0/SRb0tdrUTTI/AAAAAAAAAEQ/VUqYQl_sGzQ/s1600-h/fig_01.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 272px;" src="http://2.bp.blogspot.com/_r5jym2VH3d0/SRb0tdrUTTI/AAAAAAAAAEQ/VUqYQl_sGzQ/s400/fig_01.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266665876153978162" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 01&lt;br /&gt;

&lt;p&gt;You are now presented with the list of options and tables related to your selected database. My database consists of 3 tables (Fig. 02):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tbl_admin&lt;/li&gt;
&lt;li&gt;tbl_clients&lt;/li&gt;
&lt;li&gt;tbl_projects&lt;/li&gt;
&lt;/ul&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb1NMgUIXI/AAAAAAAAAEY/54LDQrkyVl8/s1600-h/fig_02.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 272px;" src="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb1NMgUIXI/AAAAAAAAAEY/54LDQrkyVl8/s400/fig_02.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266666421300240754" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 02&lt;br /&gt;

&lt;p&gt;To export your database, click on the &lt;strong&gt;Export&lt;/strong&gt; tab in the top navigation (Fig. 03).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb1VuiZvzI/AAAAAAAAAEg/DgiWglQ3OgU/s1600-h/fig_03.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 272px;" src="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb1VuiZvzI/AAAAAAAAAEg/DgiWglQ3OgU/s400/fig_03.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266666567874756402" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 03&lt;br /&gt;

&lt;p&gt;You&amp;acute;ll be taken to the &lt;strong&gt;Export&lt;/strong&gt; section. Click on &lt;strong&gt;Select All&lt;/strong&gt; link to select all of the tables from your database (unless you want to export just some of them) then select the &lt;strong&gt;Save as file&lt;/strong&gt; checkbox and click the &lt;strong&gt;Go&lt;/strong&gt; button (Fig. 04).&lt;/p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_r5jym2VH3d0/SRb1ec15YaI/AAAAAAAAAEo/-WXNjtNJEXI/s1600-h/fig_04.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 306px;" src="http://3.bp.blogspot.com/_r5jym2VH3d0/SRb1ec15YaI/AAAAAAAAAEo/-WXNjtNJEXI/s400/fig_04.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266666717743505826" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 04&lt;br /&gt;

&lt;p&gt;Save the file to your chosen location (Fig. 05).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_r5jym2VH3d0/SRb1ltSvKQI/AAAAAAAAAEw/QHpLGglhJ9Y/s1600-h/fig_05.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 306px;" src="http://2.bp.blogspot.com/_r5jym2VH3d0/SRb1ltSvKQI/AAAAAAAAAEw/QHpLGglhJ9Y/s400/fig_05.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266666842418522370" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 05&lt;br /&gt;

&lt;p&gt;You can now close the phpMyAdmin on your local machine. Next step is to create database on your remote server.&lt;/p&gt;

&lt;p style="font-weight:bold;color:#900;"&gt;Creating database on the remote server&lt;/p&gt;

&lt;p&gt;Now, this part really depends on what control panel your hosting company provided you with. In this section I will be using the &lt;strong&gt;eXtend&lt;/strong&gt; control panel to manage my hosting and database.&lt;/p&gt;
&lt;p&gt;Once you&amp;acute;re logged in to your hosting eXtend control panel, under &lt;strong&gt;Web Tools&lt;/strong&gt; section click on the &lt;strong&gt;MySQL Databases&lt;/strong&gt; button (Fig. 06).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb1vlOSyCI/AAAAAAAAAE4/UIjjpTv7gvM/s1600-h/fig_06.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 397px; height: 400px;" src="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb1vlOSyCI/AAAAAAAAAE4/UIjjpTv7gvM/s400/fig_06.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266667012051093538" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 06&lt;br /&gt;

&lt;p&gt;You&amp;acute;ll be taken to the new page where you can create new database. Create new database providing Username, Password and if necessary (what isn&amp;acute;t in my case) Database name (Fig. 07). Make a note of these as we will be using them later on to modify the connection file to your database.&lt;/p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_r5jym2VH3d0/SRb16PMu3-I/AAAAAAAAAFA/cCdAKkuBFK8/s1600-h/fig_07.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 312px;" src="http://3.bp.blogspot.com/_r5jym2VH3d0/SRb16PMu3-I/AAAAAAAAAFA/cCdAKkuBFK8/s400/fig_07.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266667195117527010" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 07&lt;br /&gt;

&lt;p&gt;Once you&amp;acute;re ready click the &lt;strong&gt;Create&lt;/strong&gt; button to create the new database (Fig. 08).&lt;/p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb2AsE5VfI/AAAAAAAAAFI/XoaOe9OoATM/s1600-h/fig_08.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 312px;" src="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb2AsE5VfI/AAAAAAAAAFI/XoaOe9OoATM/s400/fig_08.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266667305948501490" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 08&lt;br /&gt;

&lt;p&gt;Click on the &lt;strong&gt;Manage Now&lt;/strong&gt; button to open the &lt;strong&gt;phpMyAdmin&lt;/strong&gt; on on the remote server (Fig. 09).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb2I6mk0ZI/AAAAAAAAAFQ/bIBCPIJEmlA/s1600-h/fig_09.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 352px;" src="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb2I6mk0ZI/AAAAAAAAAFQ/bIBCPIJEmlA/s400/fig_09.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266667447286813074" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 09&lt;br /&gt;

&lt;p&gt;In the phpMyAdmin click on the name of your new databae on the left hand side (Fig. 10).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_r5jym2VH3d0/SRb2Q3PSs6I/AAAAAAAAAFY/uKNYzv9LTh8/s1600-h/fig_10.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 228px;" src="http://2.bp.blogspot.com/_r5jym2VH3d0/SRb2Q3PSs6I/AAAAAAAAAFY/uKNYzv9LTh8/s400/fig_10.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266667583822803874" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 10&lt;br /&gt;

&lt;p&gt;With the database opened click on the &lt;strong&gt;Import&lt;/strong&gt; tab in the top navigation (Fig. 11).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb2YbWmhCI/AAAAAAAAAFg/AmuiN6lcdyk/s1600-h/fig_11.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 192px;" src="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb2YbWmhCI/AAAAAAAAAFg/AmuiN6lcdyk/s400/fig_11.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266667713776223266" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 11&lt;br /&gt;

&lt;p&gt;Click on the &lt;strong&gt;Browse&lt;/strong&gt; button, select the database file (.sql) which you have exported at the beginning of this tutorial and click &lt;strong&gt;Open&lt;/strong&gt; (Fig. 12).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb2hLCAZFI/AAAAAAAAAFo/XdxMEgXQQeA/s1600-h/fig_12.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 224px;" src="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb2hLCAZFI/AAAAAAAAAFo/XdxMEgXQQeA/s400/fig_12.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266667864013694034" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 12&lt;br /&gt;

&lt;p&gt;Now simply click the &lt;strong&gt;Go&lt;/strong&gt; button to import your database to the remote server (Fig. 13).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_r5jym2VH3d0/SRb2oNDxOQI/AAAAAAAAAFw/_LBoRkC1Hc4/s1600-h/fig_13.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 221px;" src="http://2.bp.blogspot.com/_r5jym2VH3d0/SRb2oNDxOQI/AAAAAAAAAFw/_LBoRkC1Hc4/s400/fig_13.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266667984817043714" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 13&lt;br /&gt;

&lt;p&gt;Once your database has been imported you will see the confirmation message together with the SQL query which has been used to process our request (Fig. 14).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb2wFNY0oI/AAAAAAAAAF4/pWFypjb9LN0/s1600-h/fig_14.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb2wFNY0oI/AAAAAAAAAF4/pWFypjb9LN0/s400/fig_14.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266668120148857474" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 14&lt;br /&gt;

&lt;p&gt;Our database has been successfully imported so you can now close the phpMyAdmin.&lt;/p&gt;

&lt;p&gt;Next step will be to modify the connection file which connects our website to the database.&lt;/p&gt;

&lt;p style="font-weight:bold;color:#900;"&gt;Modifying connection file&lt;/p&gt;

&lt;p&gt;If you website has been developed using Dreamweaver and its built in tools then simply go to Connections folder and open the file with the name of the connection (in my case it&amp;acute;s conndb.php) (Fig. 15).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb24lPpj4I/AAAAAAAAAGA/i5prZkRApA0/s1600-h/fig_15.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 237px; height: 342px;" src="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb24lPpj4I/AAAAAAAAAGA/i5prZkRApA0/s400/fig_15.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266668266187231106" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 15&lt;br /&gt;

&lt;p&gt;In the source view you will see that the code has generated a few variables called:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;$hostname_conndb&lt;/li&gt;
&lt;li&gt;$database_conndb&lt;/li&gt;
&lt;li&gt;$username_conndb&lt;/li&gt;
&lt;li&gt;$password_conndb&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They will have different names depending on the name you&amp;acute;ve given to your connection (Fig. 16).&lt;/p&gt; 
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb3ApnZorI/AAAAAAAAAGI/iab_WOKhl0k/s1600-h/fig_16.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 76px;" src="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb3ApnZorI/AAAAAAAAAGI/iab_WOKhl0k/s400/fig_16.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266668404799546034" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 16&lt;br /&gt;

&lt;p&gt;Change the values of the $database_conndb, $username_conndb and $password_conndb to the values you&amp;acute;ve defined when you created your database on the remote server (server will most of the time add some syntax to it so check it again to make sure you have the right information) (Fig. 17).&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb3JCt4fUI/AAAAAAAAAGQ/3MgjnxAsw-I/s1600-h/fig_17.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 73px;" src="http://1.bp.blogspot.com/_r5jym2VH3d0/SRb3JCt4fUI/AAAAAAAAAGQ/3MgjnxAsw-I/s400/fig_17.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266668548976573762" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 17&lt;br /&gt;

&lt;p&gt;You can now save the file and upload it to the server using FTP application.&lt;/p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb3P-90NsI/AAAAAAAAAGY/j963B9j__UI/s1600-h/fig_18.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_r5jym2VH3d0/SRb3P-90NsI/AAAAAAAAAGY/j963B9j__UI/s400/fig_18.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5266668668228744898" /&gt;&lt;/a&gt;&lt;br /&gt;Fig. 18&lt;br /&gt;

&lt;p&gt;Your site is now connected to the MySQL database and ready to use.&lt;/p&gt;

&lt;p&gt;Created by &lt;a href="http://www.sebastiansulinski.co.uk/" target="_blank" title="Web Design Tutorials"&gt;Web Design Tutorials&lt;/a&gt; :: Sebastian Sulinski.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5107346567353753478-1661574742857528207?l=uploaddynamicsitetotheserver.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://uploaddynamicsitetotheserver.blogspot.com/feeds/1661574742857528207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5107346567353753478&amp;postID=1661574742857528207' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5107346567353753478/posts/default/1661574742857528207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5107346567353753478/posts/default/1661574742857528207'/><link rel='alternate' type='text/html' href='http://uploaddynamicsitetotheserver.blogspot.com/2008/11/uploading-mysql-database-with-dynamic.html' title='Uploading MySQL database with dynamic site from the local machine to the remote server'/><author><name>Sebastian Sulinski</name><uri>http://www.blogger.com/profile/08398739567480175441</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-Mkm1d_zEMok/TvJk4yPEiTI/AAAAAAAAAfw/_ZUYZFRcYRA/s220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_r5jym2VH3d0/SRb0tdrUTTI/AAAAAAAAAEQ/VUqYQl_sGzQ/s72-c/fig_01.jpg' height='72' width='72'/><thr:total>6</thr:total></entry></feed>
