<?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>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; mysql</title> <atom:link href="http://www.ghacks.net/tag/mysql/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Fri, 10 Feb 2012 13:20:58 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Learn How To Use MySQL Online</title><link>http://www.ghacks.net/2011/11/28/learn-how-to-use-mysql-online/</link> <comments>http://www.ghacks.net/2011/11/28/learn-how-to-use-mysql-online/#comments</comments> <pubDate>Mon, 28 Nov 2011 10:29:57 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Online Services]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysql database]]></category> <category><![CDATA[php]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=53281</guid> <description><![CDATA[Most webmasters have started to learn HTML before they moved on to programming languages such as PHP. With PHP come databases like MySQL as the primary storage for project data. Many popular online applications, such as WordPress, use the PHP and MySQL combination to power sites online. You usually do not need to know PHP [...]]]></description> <content:encoded><![CDATA[<p>Most webmasters have started to learn HTML before they moved on to programming languages such as PHP. With PHP come databases like MySQL as the primary storage for project data. Many popular online applications, such as WordPress, use the PHP and MySQL combination to power sites online.</p><p>You usually do not need to know PHP or MySQL if you download and install an application like WordPress. But if you want to start developing your own applications, or modifying existing ones, then you need to know the ins and outs of SQL database commands.</p><p>Head first SQL: Hands On is a free service by <a
href="http://headfirstlabs.com/sql_hands_on/hf01.htm">O&#8217;Reilly</a> that can be used to learn and execute MySQL queries online. when you open the Head First Labs site for the first time you see a form near the top that you can use to run MySQL commands.</p><p>The service provides access to several tables that are listed above the form. All you need to do is to enter a SQL query in the form to execute it. The core benefit of testing SQL commands here is that you do not have to create your own database first and fill it with data. Plus, you cannot really damage the database or tables this way.</p><p><a
href="http://www.ghacks.net/wp-content/uploads/2011/11/learn-how-to-use-mysql.jpg"><img
class="alignnone size-full wp-image-53282" title="learn how to use mysql" src="http://www.ghacks.net/wp-content/uploads/2011/11/learn-how-to-use-mysql.jpg" alt="learn how to use mysql" width="529" height="412" /></a></p><p>The results are displayed right beneath the for.  But the site offers more than just an option to run your own MySQL queries, which is especially useful for users who are just getting started and do not know anything about SQL.</p><p>The Get Started section of the page lists 33 MySQL lessons. The majority of lessons teach a specific command or command sets. This ranges from basic queries such as SELECT or INSERT to more complex operations. Not all lessons make sense, which can be attributed that some require that you have read the Head First SQL: Hands On book.</p><p>Some on the other hand can be used without having the book in reach. MySQL beginners will probably like the form on the start page the most, as it allows them to run custom SQL queries on sample database tables.</p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/11/28/learn-how-to-use-mysql-online/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Typo3 Winstaller, Windows Typo3 Environment</title><link>http://www.ghacks.net/2011/01/31/typo3-winstaller-windows-typo3-environment/</link> <comments>http://www.ghacks.net/2011/01/31/typo3-winstaller-windows-typo3-environment/#comments</comments> <pubDate>Mon, 31 Jan 2011 09:57:35 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[The Web]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[php]]></category> <category><![CDATA[typ3 windows]]></category> <category><![CDATA[typo3]]></category> <category><![CDATA[typo3 winstaller]]></category> <category><![CDATA[wamp]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=39448</guid> <description><![CDATA[Typo3 is a powerful Open Source content management system that runs on system that support recent versions of PHP and MySQL. Linux users usually do not have a problem installing PHP and MySQL on their systems, while Windows users may have troubles finding a solution to run them on their system. Typo3 Winstaller is a [...]]]></description> <content:encoded><![CDATA[<p>Typo3 is a powerful Open Source content management system that runs on system that support recent versions of PHP and MySQL. Linux users usually do not have a problem installing PHP and MySQL on their systems, while Windows users may have troubles finding a solution to run them on their system.</p><p>Typo3 Winstaller is a free WAMP (which means Windows, Apache, MySQL and PHP) webserver that comes preinstalled with the Typo3 content manangement system. It basically offers everything needed to get started eliminating the need to install and configure the dependencies individually.</p><p>The installer sets up a full Typo3 environment on the system that can be used immediately without configuration. This can be helpful for developers, students, employees and everyone else who wants or needs to work with Typo3.</p><p><strong>The main features of Typo3 Winstaller</strong></p><ul><li>Download and Play &#8211; no configuration and no other manually intervention is required</li><li>simple user interface</li><li>includes preconfigured Quickstart, Testsite and Dummy packages of TYPO3 (demo pages)</li><li>easy to try the full functionality of the CMS TYPO3</li><li>TYPO3Winstaller runs from portable hardware (i.e. MemorySticks) and from CD/DVD</li></ul><p>The package is offered as a zip file and executable. The executable handles the unpacking for the user, the remaining process remains the same.</p><p>The application offers a basic control panel that displays information about running services (Apache, MySQL), options, logs and the ability to start and stop the Typo3 content management system.</p><p><a
href="http://www.ghacks.net/wp-content/uploads/2011/01/typo3winstaller.jpg"><img
src="http://www.ghacks.net/wp-content/uploads/2011/01/typo3winstaller.jpg" alt="typo3winstaller" title="typo3winstaller" width="502" height="254" class="alignnone size-full wp-image-39451" /></a></p><p>Typo3 runs on the local system. The control panel launches the web interface in the default browser after installation or manual activation. This is at the same time the final test that everything is up and running.</p><p><a
href="http://www.ghacks.net/wp-content/uploads/2011/01/typo3-winstaller.jpg"><img
src="http://www.ghacks.net/wp-content/uploads/2011/01/typo3-winstaller-550x400.jpg" alt="typo3 winstaller" title="typo3 winstaller" width="550" height="400" class="alignnone size-medium wp-image-39452" /></a></p><p>The welcome page links to several Typo3 related resources which is handy for beginners who want to learn Typo3.</p><p>Interested users can download Typo3 <a
href="http://typo3winstaller.sourceforge.net/?home">Winstaller</a> from its project page over at Sourceforge.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/01/31/typo3-winstaller-windows-typo3-environment/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Incredibly simple MySQL administration with SQL Buddy</title><link>http://www.ghacks.net/2011/01/12/incredibly-simple-mysql-administration-with-sql-buddy/</link> <comments>http://www.ghacks.net/2011/01/12/incredibly-simple-mysql-administration-with-sql-buddy/#comments</comments> <pubDate>Wed, 12 Jan 2011 21:52:27 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[database]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[php]]></category> <category><![CDATA[phpmyadmin]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=38925</guid> <description><![CDATA[If you have a need to manage MySQL databases, you know that learning the syntax for the various MySQL tools can be a real nightmare. Fortunately there are tools out there that make this job far more easy. But of the web-based tools, which are easiest? You might have given phpMyAdmin a try, but found [...]]]></description> <content:encoded><![CDATA[<p>If you have a need to manage MySQL databases, you know that learning the syntax for the various MySQL tools can be a real nightmare. Fortunately there are tools out there that make this job far more easy. But of the web-based tools, which are easiest? You might have given phpMyAdmin a try, but found it a bit complex to get up and running (if you&#8217;re curious about phpMyAdmin, read my article &#8220;<a
href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" target="_blank">Install phpmyadmin for easy MySQL administration</a>&#8220;). If that is the case, and you&#8217;re still looking for an easy way to manage your MySQL databases, look no further than <a
href="http://www.sqlbuddy.com/" target="_blank">SQL Buddy</a>.</p><p>SQL Buddy is one of the easiest web-based admin tools you will ever find. Not only does it make the process of creating and editing MySQL databases easy, it is also incredibly easy to install. Let&#8217;s see just how easy this is to manage.</p><p><span
id="more-38925"></span><strong>What you need</strong></p><p>You will, of course, need a working installation of MySQL. You will also have to have your MySQL admin user and password handy. As far as dependencies, you will need to have the following installed:</p><ul><li>PHP &gt;= 4.3</li><li>MySQL &gt;= 4</li></ul><p>Of course, if you already have the MySQL server up and running you might only need the PHP piece installed. You can install the PHP dependency easily from your Add/Remove Software tool. Search for &#8220;php&#8221; (no quotes) and install the version recommended for your distribution and release.</p><p>You will also need to download the SQL Buddy file. You can find that from the <a
href="http://www.sqlbuddy.com/" target="_blank">SQL Buddy main page</a>. This file will be a .zip file. Save that file into your web server&#8217;s document root (on a Ubuntu machine that would be <strong>/var/www</strong>).</p><p><strong>Installation</strong></p><div
id="attachment_38926" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/01/sql_buddy.png"><img
class="size-medium wp-image-38926 " src="http://www.ghacks.net/wp-content/uploads/2011/01/sql_buddy-550x371.png" alt="" width="330" height="223" /></a><p
class="wp-caption-text">Figure 1</p></div><p>You will be shocked to know there really is no installation. All you need to do is unzip the sqlbuddy_XXX.zip (Where XXX is the release number) within your web server document root and then point your browser to http://ADDRESS_TO_SERVER/sqlbuddy. Where ADDRESS_TO_SERVER is the actual address of your MySQL server. When you do this you will be prompted for the MySQL admin credentials. Enter the credentials and, upon successful authentication, you will find yourself on the SQL Buddy main page (see Figure 1).</p><div
id="attachment_38927" class="wp-caption alignright" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/01/sql_buddy_table.png"><img
class="size-medium wp-image-38927 " src="http://www.ghacks.net/wp-content/uploads/2011/01/sql_buddy_table-550x444.png" alt="" width="330" height="266" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Once you are in you will find the interface very simple to use. Here you can create new databases by entering a name for the database, selecting the correct charset (Very important), and hitting Submit. Once you do that you will find yourself at a new screen. This new screen (Figure 2) allows you to edit the database and create tables for the database.</p><p>You do need to pay close attention to the creation of tables for your database. Make sure you add the correct fields for the the table or you will get an SQL error and the table will not be saved.</p><p>After you successfully enter the data for your tables, click Submit and your table will be added to the new Database (and the database will be successfully saved).</p><p><strong>Final thoughts</strong></p><p>If you have been searching for an easy method to manage your MySQL databases, search no more&#8230;SQL Buddy will have you easily creating and managing databases on your MySQL server.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/01/12/incredibly-simple-mysql-administration-with-sql-buddy/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Use gkDebconf to reconfigure debconf-using programs</title><link>http://www.ghacks.net/2010/12/16/use-gkdebconf-to-reconfigure-debconf-using-programs/</link> <comments>http://www.ghacks.net/2010/12/16/use-gkdebconf-to-reconfigure-debconf-using-programs/#comments</comments> <pubDate>Thu, 16 Dec 2010 20:21:07 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[deb]]></category> <category><![CDATA[debconf]]></category> <category><![CDATA[gpkg]]></category> <category><![CDATA[gpkg-reconfigure]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[MySQL root password]]></category> <category><![CDATA[samba]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=38038</guid> <description><![CDATA[There are certain applications, such as MySQL and Apache that are configured upon installation. The most familiar to you might be MySQL. At the point of installation you configure the server address, admin password, etc. But what happens when you need to reconfigure that tool and you don&#8217;t want to go through the process of [...]]]></description> <content:encoded><![CDATA[<p>There are certain applications, such as MySQL and Apache that are configured upon installation. The most familiar to you might be MySQL. At the point of installation you configure the server address, admin password, etc. But what happens when you need to reconfigure that tool and you don&#8217;t want to go through the process of unistalling/reinstalling? Fortunately there is a tool to handle that task. That tool is dpkg-reconfigure. Of course this tool is a command line tool and many newer users do not want to bother with commands.</p><p>For those users who do not want to bother with commands, but still need to re-configure certain packages, there is a front end called gkDebconf that can be used to easily reconfigure those already installed packages. Let&#8217;s see how to install and use this tool.</p><p><span
id="more-38038"></span><strong>Installation</strong></p><p>Since gkDebconf is found in the standard repositories, installation is very simple. Just follow these steps:</p><ol><li>Open up the Ubuntu Software Center.</li><li>Search for &#8220;gkdebconf&#8221; (No quotes).</li><li>Click the Install button.</li><li>Enter your sudo password when prompted.</li><li>When the installation is complete, close the Software Center.</li></ol><p>Once installed, you will find the application in <strong>System &gt; Administration &gt; gkDebconf</strong>.</p><p><strong>Usage</strong></p><div
id="attachment_38039" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/gkdebconf.png"><img
class="size-medium wp-image-38039 " src="http://www.ghacks.net/wp-content/uploads/2010/12/gkdebconf-550x499.png" alt="" width="330" height="299" /></a><p
class="wp-caption-text">Figure 1</p></div><p>One of the problems with starting the tool from the menu is that it will not ask you for your sudo password, therefore you will not have administrative access. For some of the package re-configuration (such as MySQL) you must have admin access. So if you are reconfiguring a package that you know requires admin access, start gkDebconf from the command line. To do this open up a terminal window and issue the command <em>sudo gkdebconf</em>. When this command is issued the main window for gkDebconf will open (see Figure 1) where you can locate the package you want to reconfigure.</p><p>As you can see there are numerous packages available to you. I am illustrating the MySQl-server package as that is the package that I get the most questions regarding re-configuring.</p><div
id="attachment_38040" class="wp-caption alignright" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/gkdebconf_reconfig.png"><img
class="size-medium wp-image-38040 " src="http://www.ghacks.net/wp-content/uploads/2010/12/gkdebconf_reconfig-550x386.png" alt="" width="330" height="232" /></a><p
class="wp-caption-text">Figure 1</p></div><p>So to run the re-configuration process select the package you want to reconfigure and click the Configure button. When you do this a new window will open, that window being the debconf configuration window for the package in question (see Figure 2). In my example you can see the first step is asking you for the MySQL root user password. If you have already installed this package, you will have already walked through this wizard so it will be very familiar.</p><p>Some of the more important applications you can reconfigure include:</p><ul><li>adduser</li><li>apparmor</li><li>cups</li><li>gdm</li><li>openssh-server</li><li>quota</li><li>Samba</li><li>Snort</li></ul><p>For those who would like to to do this same task from the command line, you can use the <em>dpkg-reconfigure</em> like so:</p><p><code>sudo dpkg-reconfigure APPLICATION</code></p><p>Where APPLICATION is the package you want to reconfigure. So if you want to reconfigure Samba you would issue the command:</p><p><code>sudo dpkg-reconfigure samba</code></p><p><strong>Final thoughts</strong></p><p>Although the task isn&#8217;t too challenging to handle from the command line, it&#8217;s always nice to not have to guess the name of the package you want to configure (remember, Linux is very case-sensitive, so MySQL is not mysql). gkDebconf makes this task much easier.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/12/16/use-gkdebconf-to-reconfigure-debconf-using-programs/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Creating your header.inc.php for eGroupware</title><link>http://www.ghacks.net/2010/04/12/creating-your-header-inc-php-for-egroupware/</link> <comments>http://www.ghacks.net/2010/04/12/creating-your-header-inc-php-for-egroupware/#comments</comments> <pubDate>Sun, 11 Apr 2010 23:25:48 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[CRM]]></category> <category><![CDATA[egroupware]]></category> <category><![CDATA[ERP]]></category> <category><![CDATA[groupare]]></category> <category><![CDATA[mysql]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=24410</guid> <description><![CDATA[My past post instructed you (minus the &#8220;j&#8221; &#8211; thank you Simon) how to begin the process of installing eGoupware. That article was primarily about getting the requirements out of the way so you can begin the real installation process. That time is nigh, and in this article I am going to continue on with [...]]]></description> <content:encoded><![CDATA[<p>My past post instructed you (minus the &#8220;j&#8221; &#8211; thank you Simon) how to begin the process of installing eGoupware. That article was primarily about getting the requirements out of the way so you can begin the real installation process. That time is nigh, and in this article I am going to continue on with what I started.</p><p>But what is the <strong>header.inc.php</strong> you ask? That file is the configuration file eGroupware uses for the server and the database information. It is not, however, the only configuration necessary for this groupware tool. But it is one of the most important as it dictates the very foundation of the system. Without this file, eGroupware can not, and will not, work. So&#8230;now that you&#8217;ve all the requirements met, let&#8217;s set about to work on the header admin section.</p><p><span
id="more-24410"></span></p><p><strong>Getting to this section</strong></p><div
id="attachment_24412" class="wp-caption alignleft" style="width: 309px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/04/egroupware_header_top.png"><img
class="size-medium wp-image-24412 " src="http://www.ghacks.net/wp-content/uploads/2010/04/egroupware_header_top-499x410.png" alt="" width="299" height="246" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Once you have passed all the tests you need to pass (remember, there may be some you do not need &#8211; say, for example, you are using MySQL and you don&#8217;t need any of the PostgreSQL extensions) all you need to do is to click on the Continue on to the Header Admin button. When you get to this page you will notice number configuration options (see Figure 1 for the top portion of this page).</p><p>At minimum these are the options you need to configure (in order to continue with the eGroupware installation):</p><p>1. Server root path. This is where you have unpacked the tar file. Most likely this will be in a sub-folder of your web servers&#8217; document root (i.e. <strong>/var/www/egroupware</strong>).</p><p>2. Header username. This can be the same as the admin user name you will select later on. You can leave this as admin if you like.</p><p>3. Header password. You MUST add this and you MUST remember it. It will be wise to also create a password that is strong.</p><p>4. Database type. This will be dictated by the type of database you are going to use.</p><p>5. DB Host. If you are using the same server which is housing eGroupware as database server, this can be left as localhost.</p><p>5. DB Port. Unless you are using a non-standard port for your database, leave this as the default &#8211; 3306.</p><p>6. DB Name. The name of the database you created before you began installation. If you have not created the database, now would be a good time to do so.</p><p>7. DB User. This will, most likely, be root. At least by default that is the easiest way to make sure eGroupware can communicate to your database. If you configure a user other than root, make sure that user has full access to the database you use.</p><p>8. DB Password. This is the password used by your DB User to connect to the database. I hope you have not left this blank, because that is just not secure.</p><p>9. Configuration user. This will be the user you use for the domain configuration. This can be the same as the header admin you configured earlier.</p><p>10. Configuration password. The password you will use for the Configuration user. Again, this password needs to be remembered and strong.</p><div
id="attachment_24413" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/04/egroupware_setup_config.png"><img
class="size-medium wp-image-24413 " src="http://www.ghacks.net/wp-content/uploads/2010/04/egroupware_setup_config-500x219.png" alt="" width="300" height="131" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Now, if you notice at the bottom of this page the warning &#8220;Cannot create the header.inc.php due to file permission restrictions.&#8221; that means the eGroupware installer does not have write access so it can write the configuration file. This is not a problem. What you can do is download the file (by clicking the Download button) and then moving that file to <strong>/var/www/egroupware</strong>. To be safe change the permissions of that file with the command <em>sudo chmod 777 header.inc.php</em> and then click the Add new Database Instance. This will then take you to the Setup/Config login page (see Figure 2), where you can then log into as the Setup/Config administrative user. The next phase &#8211; installing the eGroupware applications&#8230;stay tuned for the next entry.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/04/12/creating-your-header-inc-php-for-egroupware/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>How to install eGroupware</title><link>http://www.ghacks.net/2010/04/11/how-to-install-egroupware/</link> <comments>http://www.ghacks.net/2010/04/11/how-to-install-egroupware/#comments</comments> <pubDate>Sun, 11 Apr 2010 00:30:14 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[CRM]]></category> <category><![CDATA[egroupware]]></category> <category><![CDATA[ERP]]></category> <category><![CDATA[groupware]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[Pear]]></category> <category><![CDATA[php]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=24325</guid> <description><![CDATA[Quite some time ago I wrote an article that illustrated how eGroupware could serve as a legitimate Exchange replacement (see my article &#8220;eGroupware: Your Exchange replacement has arrived&#8220;). I very briefly skimmed over the process of installing this outstanding groupware tool. In this case, skimming will get you nowhere. Recently I revisited the installation of [...]]]></description> <content:encoded><![CDATA[<p>Quite some time ago I wrote an article that illustrated how eGroupware could serve as a legitimate Exchange replacement (see my article &#8220;<a
title="eGroupware: Your Exchange replacement has arrived" href="http://www.ghacks.net/2009/01/21/egroupware-your-exchange-replacement-has-arrived/" target="_blank">eGroupware: Your Exchange replacement has arrived</a>&#8220;). I very briefly skimmed over the process of installing this outstanding groupware tool. In this case, skimming will get you nowhere.</p><p>Recently I revisited the installation of eGroupware and thought I should give a bit more detail on the procedure of installing this rather challenging tool. So in this article I will walk you through the steps on installing eGroupware.</p><p><span
id="more-24325"></span><strong>Download and unpack and prerequisites<br
/> </strong></p><p>I will assume you have a working Apache and MySQL installation, on your Linux server,  ready to go. If not, go ahead and take care of that major prerequisite first. Once you have completed that task you are ready to being. Almost. There are still a few other prerequisites to get out of the way. You will want to fire up Synaptic (or whatever package manager you use) and make sure you have the following installed:</p><ul><li>PHP</li><li>php-pear</li><li>An SMTP server (Postfix is a good choice)</li><li>IMAP server (Dovecot is a good choice)</li></ul><p>There will also be a LOT of pear extensions to install &#8211; we will deal with those in a moment. Before going any further create the database you intend on using (let&#8217;s stick with the name egroupware). If you&#8217;re not sure how to create the database give my article &#8220;<a
title="MySQL Workbench" href="http://www.ghacks.net/2009/12/25/complete-database-administration-package-mysql-workbench/" target="_blank">Complete database administration with MySQL Workbench</a>&#8221; a read.</p><p>Now it&#8217;s time. move the the downloaded tar file for eGroupware into the <strong>/var/www/</strong> directory and then unpack it with the commands:</p><p><em>bunzip2 eGroupware-XXX.tar.bz2 </em></p><p>Where XXX is the release number.</p><p><em>tar xvzf eGroupware-XXX.tar</em></p><p>Where XXX is the release number.</p><p>You will now have a newly created directory <strong>/var/www/egroupware</strong>. Point your browser to <em>http://ADDRESS_TO_SERVER/egroupware</em> and you will begin the installation process. This is where it gets fun. On the first page you will have a link that allows you to run the installation tests. Click that and you will be presented with a long list of items. Each of these items will be preceded by either a green check, a yellow lightning bolt, or a red X. Anything marked with a red X MUST be resolved. Yellow lightning bolts are only warnings. Some of these you can ignore (for instance features you know you won&#8217;t use). The green checks &#8211; those are all right.</p><p>Most likely you will need to deal with some php issues and some Pear modules. Let&#8217;s examine each.</p><p><strong>PHP</strong></p><p>In the directory <strong>/etc/php5/apache2/ </strong>is the main php configuration file (<strong>php.ini</strong>). You will need to make some modifications to this file in order for the installation to work. Typically the modifications you will need to deal with are:</p><p><strong>upload_max_filesize &gt;= 8M </strong>By default PHP has a 2MB upload limit. You will need to change that.</p><p><strong>mbstring.func_overload = 7 </strong>By default this is set to 0. You will need to change this.</p><p><strong>Pear</strong></p><p>Now you will enjoy quite a few pear module installations. This is hit or miss on how many your system will have installed by default. What you need is the following:</p><ul><li>HTTP_WebDAV_Server</li><li>Net_Socket</li><li>Auth_SASL</li><li>Net_IMAP</li><li>Net_Sieve</li><li>XML_Feed_Parser</li><li>Log</li></ul><p>Some of these modules can be found in Synaptic. The best way to locate them is do a search for &#8220;pear&#8221; (No quotes) and then mark the necessary modules for installation (and then, of course, install them). Those that you do not find you will have to install from the command line, like so:</p><p><em>sudo pear install MODULE_NAME</em></p><p>Typically these install very quickly.</p><p>You should now be at the point where all of the X&#8217;s are gone and all of the necessary warnings have been replaced with green checks as well. The next step is to click Continue with the Header Admin. That we will deal with in our next article.</p><p><strong>Final thoughts</strong></p><p>It may seem like eGroupware is a pain to install. It&#8217;s not really as bad as some I have tried to work with. But it is, most certainly, worth the effort.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/04/11/how-to-install-egroupware/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Post-install configurations for osTicket</title><link>http://www.ghacks.net/2010/03/30/post-install-configurations-for-osticket/</link> <comments>http://www.ghacks.net/2010/03/30/post-install-configurations-for-osticket/#comments</comments> <pubDate>Tue, 30 Mar 2010 11:22:46 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Project]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tools]]></category> <category><![CDATA[troubleshooting]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[help desk]]></category> <category><![CDATA[helpdesk]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[trouble tickets]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=24048</guid> <description><![CDATA[Recently I showed you how to get the open source osTicket up and running (see my article &#8220;Install osTicket for a free &#8211; open source &#8211; help desk tool&#8220;). That article only got the tool installed. But now what? How do you make that tool come to life and serve as your one and only [...]]]></description> <content:encoded><![CDATA[<p>Recently I showed you how to get the open source osTicket up and running (see my article &#8220;<a
title="Install osTicket for a free (open source) help desk tool" href="http://www.ghacks.net/2010/03/30/install-osticket-for-a-free-open-source-help-desk-tool/" target="_blank">Install osTicket for a free &#8211; open source &#8211; help desk tool</a>&#8220;). That article only got the tool installed. But now what? How do you make that tool come to life and serve as your one and only help desk solution?</p><p>In this article we will take a look at the necessary configurations to get osTicket up to speed for your help desk needs. You should find, upon completion of these configurations, osTicket is quite the useful help desk tool.</p><p><span
id="more-24048"></span><strong>Assumptions</strong></p><p>This article will assume your support staff is not terribly large and that you already have the necessary tools setup to take advantage of osTicket&#8217;s features. Such tools include an SMTP server for the outgoing alerts responses and a POP or IMAP server for incoming mail. And, of course, this will assume you have osTicket up and running. Finally, I will assume you took care of the initial configurations upon installation. These configurations are handled in the Settings tab and should be completed when you bring the site online after installation. NOTE: If, after you fill out the web-based installer, you get a blank screen &#8211; most likely you do not have php5-mysql installed. Install that and re-run the web install and you should be fine.</p><p><strong>First things first</strong></p><div
id="attachment_24051" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/03/ost_dept.png"><img
class="size-medium wp-image-24051 " src="http://www.ghacks.net/wp-content/uploads/2010/03/ost_dept-500x310.png" alt="" width="300" height="186" /></a><p
class="wp-caption-text">Figure 1</p></div><p>The first thing you will want to do is set up your departments. By default osTicket has two departments: Billing and Support. You may find this plenty. But for some consulting firms there may be more necessary. For example, you might need Residential Support and Commercial Support. Or you might want Remote and On Site. To set these up click on the Departments tab and then click the Add New Dept link.</p><p>If this department wants to have its very own email address, you will need to first create an email address for it. That includes both on your email server and in the Emails tab in osTicket (this is why it&#8217;s important to understand the flow of configuration for osTicket).  If the department just needs to use the same email addy as another, umbrella, department you can select it here. This is, after all, just the outgoing email address (which will probably want to be something like <em>support@yourdomain.com</em>.)</p><div
id="attachment_24052" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/03/ost_staff.png"><img
class="size-medium wp-image-24052 " src="http://www.ghacks.net/wp-content/uploads/2010/03/ost_staff-500x198.png" alt="" width="300" height="119" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Once you have finished creating all the necessary departments you will want to the Staff tab and create the necessary elements here. In the Staff tab (see Figure 2)  you can set up both groups and staff members. Again, this will depend upon your needs. You might, for example, have certain staff that only do one particular type of work (say Residential vs. Commercial). Before you create those staff members, make sure you create any (if needed) groups they would belong to.</p><p>You will also notice there are groups. By default there are three groups: Admins, Managers, and Staff. These groups determine the permissions a staff member has. Use caution when you give a staff member Admin rights. You can, of course, add a new group and give that group specific permissions. Take a look at each group to see what their permissions are before you do this.</p><p>Finally you will want to take a look at the Help Topics tab. This is a very nice feature added to osTicket. What you can do with Help Topics is create a particular topic that has a specific Priority. Say you have a few clients that always get top priority. You can create a VIP (or such) category that has Emergency priority. This will always bump them to the top of the list. Is it fair? Not really. But when you have VIP-type clients, they expect VIP-type treatment.</p><p><strong>Final thoughts</strong></p><p>I hope that, upon setting up osTicket, you come to the same conclusion that I have drawn &#8211; this tool is the equal to some Help Desk tools costing quite a bit of your IT dollars. If you find a tip or trick that takes osTicket to the next level, share it with your fellow Ghacks readers.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/03/30/post-install-configurations-for-osticket/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Check and repair corrupted tables on MySQL database</title><link>http://www.ghacks.net/2010/02/04/check-and-repair-corrupted-tables-on-mysql-database/</link> <comments>http://www.ghacks.net/2010/02/04/check-and-repair-corrupted-tables-on-mysql-database/#comments</comments> <pubDate>Thu, 04 Feb 2010 17:40:54 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[troubleshooting]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[database]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[table corruption]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=22806</guid> <description><![CDATA[This morning I woke up to find one of the sites I administer down. The error on the page was very clear in that it could not connect to the database due to a corrupt table. I had two choices, recover from a backup or attempt to repair the corrupted tables. I opted to try [...]]]></description> <content:encoded><![CDATA[<p>This morning I woke up to find one of the sites I administer down. The error on the page was very clear in that it could not connect to the database due to a corrupt table. I had two choices, recover from a backup or attempt to repair the corrupted tables. I opted to try the repair. In the end, it worked. And now, you will get to benefit from that success.</p><p>The initial problem was trying to figure out which table was corrupt. The database in question wasn&#8217;t HUGE, by any stretch of the imagination; but it was big enough that an attempt to repair all tables would have taken quite some time. Fortunately, when I went to restart MySQL, the output of the command even helped me narrow down the corrupted table. In this article I will show you my process for repairing this corruption.</p><p><span
id="more-22806"></span></p><p>As I said, the error message I received only pointed me in the right direction. What the error message indicated was that there was corruption in the cache. This wound up only be part of the issue. But I had a starting point. So the first steps were to locate the exact name of the cache table in the database. Here&#8217;s how this is done.</p><ol><li>Log into the MySQL server with the command <em>mysql -u USER -p </em>(Where USER is the name of the database admin user).</li><li>Enter the user password when prompted.</li><li>Switch to the database in question with the command <em>use DATABASE; </em>(Where DATABASE is the name of the database containing the corrupted table).</li><li>List the tables on the database with the command <em>show tables;</em></li><li>Search for the table. In my case the table was actually called <em>cache</em>.</li><li>Exit out of the MySQL command prompt with the command <em>quite.</em></li><li>Check the table in question for errors with the following command <em>myisamchk /var/lib/mysql/DATABASENAME/TABLE_NAME.myi </em>(Where DATABASENAME is the name of the database you are working with and TABLE_NAME is the name of the table to be checked.)</li><li>The above command should indicate there are errors on the table. If this is the case you will need to repair them. In my case the output actually pointed me to another table <em>mod_layout_config, </em>so I knew I actually had to re-run the check command (show above) on the file <em>mod_layout_config.myi</em>.</li><li>When the <em>myisamchk</em> command report errors, it&#8217;s time to repair the table. But before you run this next command, make sure you back up that database! You do not want to run the risk of losing your entire database. To repair the table in question issue the command <em>myisamchk &#8211;recover /var/lib/mysql/DATABASENAME/TABLE_NAME.myi <span
style="font-style: normal">(</span>Where DATABASENAME is the name of the database you are working with and TABLE_NAME is the name of the table to be checked.)</em></li><li>If this does not fully recover the table, you can re-run the command replacing <em>&#8211;recover </em>with <em>&#8211;safe-recover</em> which is slower and more thorough.</li></ol><p>That should do it. You should now be able to restart your MySQL database server and your web site should be able to connect to its database. <em></em></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/02/04/check-and-repair-corrupted-tables-on-mysql-database/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>How to import and export a database in MySQL</title><link>http://www.ghacks.net/2009/12/29/how-to-import-and-export-a-database-in-mysql/</link> <comments>http://www.ghacks.net/2009/12/29/how-to-import-and-export-a-database-in-mysql/#comments</comments> <pubDate>Mon, 28 Dec 2009 23:48:24 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[database export]]></category> <category><![CDATA[database import]]></category> <category><![CDATA[disaster recovery]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysqldump]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=21887</guid> <description><![CDATA[Lately I have been doing a lot of coverage of MySQL. Of course there are a lot of reasons for that &#8211; MySQL is as popular a database as it is flexible and reliable. And so far I&#8217;ve covered MySQL Workbench (see my article &#8220;Complete database administration package MySQL Workbench&#8220;), MySQL Administrator (see my article [...]]]></description> <content:encoded><![CDATA[<p>Lately I have been doing a lot of coverage of MySQL. Of course there are a lot of reasons for that &#8211; MySQL is as popular a database as it is flexible and reliable. And so far I&#8217;ve covered MySQL Workbench (see my article &#8220;<a
title="MySQL Workbench" href="http://www.ghacks.net/2009/12/25/complete-database-administration-package-mysql-workbench/" target="_blank">Complete database administration package MySQL Workbench</a>&#8220;), MySQL Administrator (see my article &#8220;<a
title="MySQL Administrator" href="http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/" target="_blank">Creating a database with MySQL Administrator</a>&#8220;), MySQL Navigator (see my article &#8220;<a
title="MySQL Navigator" href="http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/" target="_blank">Manage you MySQL databases with an easy to use GUI</a>&#8220;), or PhpMyAdmin (see my article &#8220;<a
title="PhpMyAdmin" href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" target="_blank">Install PhpMyAdmin for easy MySQL administration</a>&#8220;). Through my LAMP article, &#8220;<a
title="LAMP" href="http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/" target="_blank">How to install a LAMP server</a>&#8220;, you learned how to install MySQL. This time around I am going to show you how to export a database and then import it into another MySQL server. And finally the ability to connect to a MySQL server from a remote machine was illustrated in my article &#8220;<a
title="Allow remote connections to your MySQL server" href="http://www.ghacks.net/2009/12/27/allow-remote-connections-to-your-mysql-server/" target="_blank">Allow remote connections to your MySQL server</a>&#8220;.</p><p>Why would you do this? One very good reason is for hardware update or replacing dying hardware on your MySQL server. If that hardware is dying, you will need to get your databases off the dying drive and onto a free drive. The most reliable, and easiest, way to do this, is by using built-in MySQL command line tools. That is exactly what we are going to do here.</p><p><span
id="more-21887"></span><strong>The tools you need</strong></p><p>First and foremost you will be using two commands, both of which are already installed on your MySQL server. The two commands are:</p><ul><li>mysqldump: This is the command to use to export your database.</li><li>mysql: This is the command you will use to import your database.</li></ul><p>You will also need a means to transport your database from one machine to another. I would recommend either writable CD/DVD (depending upon the size) or USB flash drive. If you use FTP there can be data corruption issues that you don&#8217;t want to have to deal with. Plus, if you place those databases on a removable device, you will have a backup copy should something go awry.</p><p>Along with a means to transport the export the database, you will also need the MySQL administrators password. With everything in hand, let&#8217;s get to exporting.</p><p><strong>Exporting</strong></p><p>You will not need your administrator password to issue the mysqldump command. Nor will you have to use sudo to issue this command. So, to export your database open up a terminal window and issue the following command:</p><p><em>mysqldump -u USER -p DATABASE &gt; FILENAME.sql</em></p><p><em> </em>Where <em>USER </em>is the MySQL administrator user, <em>DATABASE </em>is the database you want to export, and <em>FILENAME </em>is the file name you want to name the exported file (best just to use the database name for the filename, so to avoid confusion.)</p><p>When you issue this command you will be prompted for the MySQL admin password. Enter that password and hit the Enter key. In the directory you issued the command you will now have a file with the .sql extension which is the file you then need to copy to your CD, DVD, or USB flash drive.</p><p><strong>Importing</strong></p><p>Now that you have that file on a removable media, transport that file to the new machine, insert the media, mount the media (if necessary), and copy the file to your users&#8217; home directory. Now open up a terminal window and issue the command:</p><p>mysql -u <em>USER</em> -p <em>DATABASE</em> &lt; <em>FILENAME</em>.sql</p><p>Where <em>USER </em>is the MySQL admin username, <em>DATABASE </em>is the name of the database to be imported, and <em>FILENAME.sql</em> is the dump that was exported from the initial machine.</p><p>You will be prompted for the MySQL administrator password and then, most likely, you will be returned to your prompt, sans errors.</p><p>That&#8217;s it. You have officially exported and imported a database from one machine to another.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/12/29/how-to-import-and-export-a-database-in-mysql/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Allow remote connections to your MySQL server</title><link>http://www.ghacks.net/2009/12/27/allow-remote-connections-to-your-mysql-server/</link> <comments>http://www.ghacks.net/2009/12/27/allow-remote-connections-to-your-mysql-server/#comments</comments> <pubDate>Sun, 27 Dec 2009 20:55:26 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[database administration]]></category> <category><![CDATA[database server]]></category> <category><![CDATA[dba]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysql server]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=21865</guid> <description><![CDATA[I have covered MySQL in a number of ways so far. You can read how to administer your MySQL database with MySQL Workbench (see my article &#8220;Complete database administration package MySQL Workbench&#8220;), MySQL Administrator (see my article &#8220;Creating a database with MySQL Administrator&#8220;), MySQL Navigator (see my article &#8220;Manage you MySQL databases with an easy [...]]]></description> <content:encoded><![CDATA[<p>I have covered MySQL in a number of ways so far. You can read how to administer your MySQL database with MySQL Workbench (see my article &#8220;<a
title="MySQL Workbench" href="http://www.ghacks.net/2009/12/25/complete-database-administration-package-mysql-workbench/" target="_blank">Complete database administration package MySQL Workbench</a>&#8220;), MySQL Administrator (see my article &#8220;<a
title="MySQL Administrator" href="http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/" target="_blank">Creating a database with MySQL Administrator</a>&#8220;), MySQL Navigator (see my article &#8220;<a
title="MySQL Navigator" href="http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/" target="_blank">Manage you MySQL databases with an easy to use GUI</a>&#8220;), or PhpMyAdmin (see my article &#8220;<a
title="PhpMyAdmin" href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" target="_blank">Install PhpMyAdmin for easy MySQL administration</a>&#8220;). Through my LAMP article, &#8220;<a
title="LAMP" href="http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/" target="_blank">How to install a LAMP server</a>&#8220;, you learned how to install MySQL. Now, it&#8217;s time to see how you can extend that MySQL server to remote machines.</p><p>Why would you want to do this? A database server is a precious commodity in the world of data. To have that same server pitch other forms of data and other service could quickly become a detriment to your MySQL in both performance and security categories. Because of this it is wise to isolate that MySQL such that it is only used for that service. But to do this you have to configure that server to be able to serve up databases to remote machines. Although not terribly complicated, without knowing where to look and what to do, this task can be seemingly impossible. But after this tutorial, your databases will be accessible to user/machines you configure &#8211; and only those user/machines.</p><p><span
id="more-21865"></span><strong>Before we begin</strong></p><p>You will be glad to know, assuming you have MySQL up and running, there is no installation necessary for this task. You will need access to the MySQL administrators password as well as administrative access so you can edit a MySQL configuration file. Other than that simple necessity (and a terminal window), you are ready to get cracking.</p><p><strong>Editing my.conf</strong></p><p>Before you actually start editing the <strong>/etc/mysql/my.conf</strong> file, I would suggest you back up your current file. Do this with the command:</p><p><em>sudo cp /etc/mysql/my.conf /etc/mysql/my.conf.bak</em></p><p>Now that the file is backed up let&#8217;s open this baby up for editing. When you have the file open you are going to want to look for this line:</p><p><em>bind-address = 127.0.0.1</em></p><p>What the above line does is limit connections to the localhost and only the localhost. You want to comment this line out by changing it to:</p><p>#<em>bind-address = 127.0.0.1</em></p><p>Now save that file and restart MySQL with the command:</p><p><em>sudo /etc/init.d/mysql restart</em></p><p>When MySQL has restarted you now need to get to the MySQL command prompt.</p><p><strong>The mysql prompt</strong></p><p>In order to get to the mysql prompt you will want to issue the command:</p><p><em>mysql -u root -p</em></p><p>Where <em>root </em>is the MySQL administrative user (most like it is root).</p><p>You will be prompted for the MySQL administrators password. After you have successfully authenticated you will have a new prompt that looks like:</p><p><em>mysql&gt;</em></p><p>You are now at the MySQL prompt. You only have one command to enter for this to work. You will want to enter this command carefully:</p><p><em>GRANT ALL PRIVILEGES ON *.* TO username@address IDENTIFIED BY &#8220;password&#8221;;</em></p><p>Where username is the <em>username</em> on the remote machine that will be connecting, <em>address</em> is the IP address of the remote machine, and <em>password</em> is the password that will be used by the remote user.</p><p>When that command is issued successfully you should see something like:</p><p><em>Query OK, 0 rows affected (0.00 sec)</em></p><p>As long as you get Query OK, you should be good to go.</p><p>Now when you need to connect from a remote machine you will use the IP address of the MySQL server, the username you entered in the MySQL command prompt, and the username will be the username you entered in the MySQL command prompt.</p><p>That&#8217;s it. Your MySQL server is ready to accept remote connections.</p><p><strong>Final thoughts</strong></p><p>It should go without saying that you will also want to make sure this MySQL server is protected with a good firewall.  For this you can check out any of the <a
title="iptables on ghacks" href="http://www.ghacks.net/tag/iptables/" target="_blank">iptables articles here on Ghacks</a>. Enjoy that MySQL server!</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/12/27/allow-remote-connections-to-your-mysql-server/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>Complete database administration package MySQL Workbench</title><link>http://www.ghacks.net/2009/12/25/complete-database-administration-package-mysql-workbench/</link> <comments>http://www.ghacks.net/2009/12/25/complete-database-administration-package-mysql-workbench/#comments</comments> <pubDate>Thu, 24 Dec 2009 22:03:02 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[database administration]]></category> <category><![CDATA[db]]></category> <category><![CDATA[dba]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysql database]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=21783</guid> <description><![CDATA[Recently I covered the MySQL GUI tool MySQL Administrator (see the article &#8220;Create a database with MySQL Administrator&#8220;). However, this tool was just given the official EOL (End of Life) announcement by the MySQL dev team. Although this is sad news for a tool that had recently become my standard for working with databases, this [...]]]></description> <content:encoded><![CDATA[<p>Recently I covered the MySQL GUI tool MySQL Administrator (see the article &#8220;<a
title="Create a database with MySQL Administrator" href="http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/" target="_blank">Create a database with MySQL Administrator</a>&#8220;). However, this tool was just given the official EOL (End of Life) announcement by the MySQL dev team. Although this is sad news for a tool that had recently become my standard for working with databases, this death knoll has lead me to another, even better, tool <a
title="MySQL Workbench" href="http://wb.mysql.com/" target="_blank">MySQL Workbench</a>.</p><p>MySQL Workbench replaces all of the MySQL GUI tools, adds numerous power-user features, and wraps them up into a tool that any DBA (data base administrator) will be drooling over. This tool is not just about power, it&#8217;s also about being one of the best cross-platform, visual database design tools around. And even in beta release, the MySQL Workbench shows it might well succeed in that quest.</p><p>In this article I will introduce you to this tool. You will see how MySQL Workbench is install as well as how to connect to a server and create a database.</p><p><span
id="more-21783"></span><strong>Installation</strong></p><p>You will not find the beta version of MySQL Workbench in your repositories. Instead you will have to download the necessary installation package from the <a
title="Download" href="http://dev.mysql.com/downloads/workbench/" target="_blank">Workbench download page</a>. From that page you can select from the following platforms:</p><ul><li>Windows</li><li>Fedora</li><li>Ubuntu</li><li>Mac OSX</li></ul><p>You can also download the source code and install from that method. Download your preferred file and install the package. Be careful. If you are installing on Ubuntu 9.10 you will want to click on the Development Releases tab and download the latest version. I installed version 5.2.11 and had great success on 9.10. The stable release, however, wasn&#8217;t so successful (it would install but couldn&#8217;t connect to the necessary mysqlclient libraries).  You might also find that, to install the development release on Ubuntu 9.10, you will have to also install python-paramiko and python-pexpect. Both of these can be found within Synaptic.</p><p><strong>Starting the workbench</strong></p><p><strong> </strong></p><div
id="attachment_21784" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_workbench_main.png"><img
class="size-medium wp-image-21784 " src="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_workbench_main-500x362.png" alt="" width="300" height="217" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Once installed, you will find the MySQL Workbench located  (at least in GNOME) in the Programming sub-menu of the Applications menu.  When you first start the workbench you will see the very well laid out home screen (see Figure 1). From the first look it is obvious we are dealing with a serious dba tool.</p><p>The first thing that you must do is open a connection to your database server. For simplicity&#8217;s sake I am going to demonstrate connecting to localhost.</p><div
id="attachment_21785" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_workbench_connect.png"><img
class="size-medium wp-image-21785 " src="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_workbench_connect-500x327.png" alt="" width="300" height="196" /></a><p
class="wp-caption-text">Figure 2</p></div><p>To do this click the New Connection link, which will bring up a the DB Connections Manager (see Figure 2). Since this will be a localhost connection, the only thing you should have to edit is your root user password. Remember, this is the MySQL administrator password (not your system admin password). Before you click OK it is best to click the Test Connection button. This way you will know, immediately, if your connection is successful.  When you see that it is successful, click the OK button to make the connection and dismiss the window.</p><div
id="attachment_21786" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_workbench_edit.png"><img
class="size-medium wp-image-21786 " src="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_workbench_edit-500x362.png" alt="" width="300" height="217" /></a><p
class="wp-caption-text">Figure 3</p></div><p>The next step is to double-click on the new connection you just made (listed  in the Open Connection&#8230; window in the main window). When you double click the target connection the SQL Editor will open in a new tab (see Figure 3). When this tab opens you will see all of the current databases listed in the tabs in the lower pane. If you click on a database (Schema) you will see all tables included on that database.</p><p>To create a new database all you have to do is click on the &#8220;+&#8221; symble in the upper right corner of the lower left pane. When you click this a new window will open where you have to enter the following information:</p><ul><li>Name: Give the db a name.</li><li>Default Collation: What is the default character set used. For example: A Drupal database uses utf8_general_ci.</li><li>Comments: (Optional) Any comments you want to add to the db.</li></ul><p>When you finish entering the information click Apply which will then open yet another window. This next window displays the SQL statement to be executed. You can review that statement and make changes if necessary. If the statement is correct click Apply Changes to create the database.</p><p>You might not see the database appear in the lower pane immediately. You might have to close the SQL Editor tab and then re-open the connection to see your new database.</p><p><strong>Final thoughts</strong></p><p>We&#8217;ve just scratched the surface on a tool that will serve all of your MySQL database needs from now until this tool sees its EOL (which hopefully won&#8217;t be for a long, long time). The MySQL developers have really scored big with this tool.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/12/25/complete-database-administration-package-mysql-workbench/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>MySQL Database Comparison Software Mysql Structure Compare</title><link>http://www.ghacks.net/2009/12/22/mysql-database-comparison-software-mysql-structure-compare/</link> <comments>http://www.ghacks.net/2009/12/22/mysql-database-comparison-software-mysql-structure-compare/#comments</comments> <pubDate>Tue, 22 Dec 2009 14:24:47 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[database comparison]]></category> <category><![CDATA[linux software]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysql database]]></category> <category><![CDATA[mysql structure compare]]></category> <category><![CDATA[portable software]]></category> <category><![CDATA[windows software]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=21713</guid> <description><![CDATA[A website that is run by one of my friends got hacked recently resulting in several unpleasant manipulations like redirecting visitors to another domain. My friend suspected that the hacker manipulated the MySQL database of the website but there was not an easy way to find out. The only way he could think of was [...]]]></description> <content:encoded><![CDATA[<p>A website that is run by one of my friends got hacked recently resulting in several unpleasant manipulations like redirecting visitors to another domain. My friend suspected that the hacker manipulated the MySQL database of the website but there was not an easy way to find out. The only way he could think of was to manually browse the settings to see if a table in the database contained values that did not look correct. A tedious process with a high probability to miss some of the changes.</p><p>A quick Google search revealed the software Mysql Structure Compare which could help in the process. The software basically allows a webmaster to compare two MySQL databases with each other.</p><p><span
id="more-21713"></span><img
src="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_database_comparison-500x362.jpg" alt="" title="mysql database comparison" width="500" height="362" class="alignnone size-medium wp-image-21714" /></p><p>This can be a very effective way of comparing snapshots of the same database, e.g. a current version and a backup. This is exactly what we did to check for changes between the hacked database and a database backup that was created the other day.</p><p>Mysql Structure Compare required two running databases that can either be hosted locally or remotely. The database name, user, password, host and port need to be specified in the application. The easiest way to setup the second database is to use a local AMP installation as the database host, this can be done with <a
href="http://www.ghacks.net/2007/01/31/host-your-own-webserver/">XAMPP</a> or <a
href="http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/">WAMPserver</a> for instance.</p><p>It is also possible to run both databases locally. Mysql Structure Compare is a portable software program for the Windows and Linux operating system that can effectively compare two MySQL databases with each other.</p><p>The software is <a
href="http://rubyforge.org/frs/?group_id=4838">available</a> at the developer&#8217;s website where it can be downloaded for all supported operating systems.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/12/22/mysql-database-comparison-software-mysql-structure-compare/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Creating a database with MySQL Administrator</title><link>http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/</link> <comments>http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/#comments</comments> <pubDate>Wed, 09 Dec 2009 19:43:38 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[database administration]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysql administration]]></category> <category><![CDATA[mysql database]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=21228</guid> <description><![CDATA[My last article illustrated how to manage your MySQL databases with a simple (albeit outdated) GUI MySQL Navigator (see my article &#8220;Manage your MySQL databases with an easy to use GUI&#8220;). Although that tool is outdated, it does still work for basic functionality. But there are better tools for managing your MySQL databases. One of [...]]]></description> <content:encoded><![CDATA[<p>My last article illustrated how to manage your MySQL databases with a simple (albeit outdated) GUI MySQL Navigator (see my article &#8220;<a
title="MySQL Navigator" href="http://www.ghacks.net/2009/12/08/manage-your-mysql-databases-with-an-easy-to-use-gui/" target="_blank">Manage your MySQL databases with an easy to use GUI</a>&#8220;). Although that tool is outdated, it does still work for basic functionality. But there are better tools for managing your MySQL databases. One of those tools, MySQL Administrator, is actually released by the MySQL developers. This tool will work with any MySQL installation &gt;= 4.0 and makes the daunting task of administrating MySQL databases far easier than any other desktop GUI tool.</p><p>And, to make matters even easier, MySQL Administrator is found in the standard distribution repositories, so installation is a breeze. And MySQL Administrator is available for both Linux and Windows, so even the non-Linux crowd can enjoy this fantastic tool. In this article you will see how to install MySQL Administrator as well as create a schema (aka database) and a table for your database.</p><p><span
id="more-21228"></span><strong>Installation</strong></p><p>As you would expect, all you need to do is fire up your software installation tool (such as Synaptic or the Ubuntu Software Center), do a search for &#8220;mysql administrator&#8221;, select the results, and install. You should already have a running MySQL installation, but if you do not the software installer should pick up all of the dependencies.</p><p>Once installed you will find this tool located in the Programming sub-menu of the Applications menu.</p><p><strong>Using MySQL Administrator</strong></p><div
id="attachment_21229" class="wp-caption alignleft" style="width: 268px"><a
rel="attachment wp-att-21229" href="http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/mysql_admin_login/"><img
class="size-full wp-image-21229 " src="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_admin_login.png" alt="Figure 1" width="258" height="221" /></a><p
class="wp-caption-text">Figure 1</p></div><p>When you first start up the MySQL Administrator tool the login window will appear (see Figure 1). From this window you can create a local or a remote login. If you go for a remote login you have to make sure your remote MySQL server will allow for remote connections.</p><p>For this article we will focus on a local connection. So the information you need to enter will be similar to what you see in Figure 1. Once you enter the information click the Connect button to establish your connection. When the connection is made you will find yourself in the MySQL Administrator main window (see Figure 2). This window will immediately give you plenty of information about your MySQL connection as well as all the tools you need to work with MySQL.</p><div
id="attachment_21232" class="wp-caption alignright" style="width: 310px"><a
rel="attachment wp-att-21232" href="http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/mysql_admin_main/"><img
class="size-medium wp-image-21232 " src="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_admin_main-500x269.png" alt="Figure 2" width="300" height="161" /></a><p
class="wp-caption-text">Figure 2</p></div><p>In order to create a new schemata you need to first open up the Catalogs window. The catalogs window is a listing of your current schemata (database collection). To open up the catalogs window double click on the Catalogs listing in the left pane.</p><div
id="attachment_21237" class="wp-caption alignleft" style="width: 310px"><a
rel="attachment wp-att-21237" href="http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/my_admin_catalogs/"><img
class="size-medium wp-image-21237 " src="http://www.ghacks.net/wp-content/uploads/2009/12/my_admin_catalogs-500x309.png" alt="Figure 3" width="300" height="185" /></a><p
class="wp-caption-text">Figure 3</p></div><p>When the catalogs listing opens (see Figure 3) take a look at the lower left pane. In this pane you will see a listing of your current schemata. In order to create a new schema right-click inside of that pane and select Create Schema. When you select this a small window will appear asking you to enter a name for your new schema. Do this and click OK and you will have an empty schema ready for you to add tables.</p><div
id="attachment_21244" class="wp-caption alignright" style="width: 310px"><a
rel="attachment wp-att-21244" href="http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/create_table/"><img
class="size-medium wp-image-21244 " src="http://www.ghacks.net/wp-content/uploads/2009/12/create_table-500x350.png" alt="Figure 4" width="300" height="210" /></a><p
class="wp-caption-text">Figure 4</p></div><p>In order to create a table in your schema you need to click the Create Table button after you have selected the schema you want to work with (see Figure 4).  The first thing you need to do is give your table a name.  Once that is done click in the Colun and Indices area and you will then be able to start building the fields for your table.</p><p>A couple of notes about fields:</p><ul><li>You will want to have one field with a primary key.</li><li>A primary key&#8217;s Data Type should be Integer.</li></ul><p>When you finish filling out the data for the first table click the Apply Changes button which will then bring up a window showing you the MySQL command to be executed. Click the Execute button and the command should go off smoothly. Once the command is finished you will see your new field in the Columns and Indices window. In order to create a new field click below the newly created field and start all over.</p><p>When you are finished working with your table click Close to dismiss this window. You have now added fields to your table in your schema. When you are finished with that scheme click Close and you are done.</p><p><strong>Final thoughts</strong></p><p>Don&#8217;t think this is all you can do with the MySQL Administrator tool. This tool can handle nearly every aspect of MySQL administration. After you become familiar with creating schema, tables, and fields, start poking around the rest of the tool and see if it will take care of all of your MySQL needs.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/12/09/creating-a-database-with-mysql-administrator/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> <item><title>Manage your MySQL databases with an easy to use GUI</title><link>http://www.ghacks.net/2009/12/08/manage-your-mysql-databases-with-an-easy-to-use-gui/</link> <comments>http://www.ghacks.net/2009/12/08/manage-your-mysql-databases-with-an-easy-to-use-gui/#comments</comments> <pubDate>Tue, 08 Dec 2009 20:23:17 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[database management]]></category> <category><![CDATA[datbase]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysql database]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=21181</guid> <description><![CDATA[If you&#8217;ve read my Linux content here on Ghacks enough, you have most likely noticed my preference for not using the MySQL command line. That is not to say I don&#8217;t ever use it, I just prefer tools to help make that aspect of database use easier. My preference, until recent, has been PhpMyAdmin (see [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve read my Linux content here on Ghacks enough, you have most likely noticed my preference for not using the MySQL command line. That is not to say I don&#8217;t ever use it, I just prefer tools to help make that aspect of database use easier. My preference, until recent, has been PhpMyAdmin (see my article &#8220;<a
title="Install PhpMyAdmin for easy MySQL administration" href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" target="_blank">Install PhpMyAdmin for easy MySQL administration</a>&#8220;). I have, however, found a new tool I am growing very fond of.</p><p>When you are looking to manage a local database, and you&#8217;re looking for a good GUI tool, look no further than MySQL Navigator for all your MySQL administrative needs. This tool makes for simple database creation, administration, and does so (for most tasks) with a simple to use GUI. That doesn&#8217;t mean you can get completely away from understanding the MySQL syntax &#8211; you may need it. But for much of the functioning, MySQL Navigator can handle the task.</p><p>In this tutorial you will see how to install MySQL Navigator and create a database with this simple GUI tool.</p><p><span
id="more-21181"></span><strong>Installation</strong></p><p>The MySQL Navigator tool should be found in your distributions&#8217; repository. So all you will need to do is fire up your software installation tool (such as the Ubuntu Software Center or Synaptic), search for &#8220;mysql navigator&#8221;, select the results, and install. Naturally you will need to have MySQL installed. If you do not, the installation tool should pick up these dependencies for you.</p><p>Once installed, you will find the MySQL Navigator executable in the Accessories sub-menu of the Applications menu in GNOME. Now let&#8217;s start using this tool.</p><p>NOTE: I am going to assume you already have your MySQL root user password handy. You will need it in order to connect to your databases.</p><p><strong>Usage</strong></p><div
id="attachment_21182" class="wp-caption alignleft" style="width: 310px"><a
rel="attachment wp-att-21182" href="http://www.ghacks.net/2009/12/08/manage-your-mysql-databases-with-an-easy-to-use-gui/mysql_navigator_main/"><img
class="size-medium wp-image-21182 " src="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_navigator_main-500x378.png" alt="Figure 1" width="300" height="227" /></a><p
class="wp-caption-text">Figure 1</p></div><p>When you fire up MySQL Navigator two windows will appear (see Figure 1). What you have to do is select the database you want to manage. You can manage remote databases if you like, but for the purposes of this article, we will stick with local machines. In order to connect to the default server you need to right click the <em>root@localhost</em> listing and select modify. In this new window you will need to enter the MySQL administrator username (probably root) and password.</p><p>NOTE: If you do not see the smaller window when you first fire up the tool you will need to go to the File menu and select New.</p><div
id="attachment_21183" class="wp-caption alignright" style="width: 310px"><a
rel="attachment wp-att-21183" href="http://www.ghacks.net/2009/12/08/manage-your-mysql-databases-with-an-easy-to-use-gui/mysql_nav/"><img
class="size-medium wp-image-21183 " src="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_nav-500x438.png" alt="Figure 2" width="300" height="263" /></a><p
class="wp-caption-text">Figure 2</p></div><p>After you enter the proper information, dismiss the settings window and double click the <em>root@localhost</em> entry to open up the listing of databases (see Figure 2).</p><p>In order to create a new database, right-click the Database entry and select Create Database. This will open up a simple window with only a text area where you give the new database a name. Enter that name and click OK. I am going to create a sample database called &#8220;ghacks&#8221;.</p><p>Let&#8217;s create a table on our &#8220;ghacks&#8221; database. From the MySQL menu select the &#8220;Tables&#8221; entry to open up the Table tool (see Figure 3). In this new window you will first want to select the newly created &#8220;ghacks&#8221; database from the Database drop-down. Once you have the correct database selected you can go through and fill out the necessary information for the table.</p><div
id="attachment_21186" class="wp-caption alignleft" style="width: 310px"><a
rel="attachment wp-att-21186" href="http://www.ghacks.net/2009/12/08/manage-your-mysql-databases-with-an-easy-to-use-gui/mysql_nav_table/"><img
class="size-medium wp-image-21186 " src="http://www.ghacks.net/wp-content/uploads/2009/12/mysql_nav_table-500x407.png" alt="Figure 3" width="300" height="244" /></a><p
class="wp-caption-text">Figure 3</p></div><p>You can create more than one field for your table by adding the field information (in the right pane) and clicking the Save button. When the table info is complete click the Fire button to add your table. NOTE: You must at least create one set of fields or you will get an error when you click the Fire button.</p><p>You will also want to click on the Key tab and make sure you create a Primary Key for your table.</p><p>When you are finished creating your table, click the Close button to dismiss this window.</p><p>You can continue getting more and more granular with this tool. If you go back to the main window you will see the listing of the new database. Expand that database and you will see your newly created table. If you double-click the newly created table a new window will open where you can add data for values in the fields of your table. This isn&#8217;t as intuitive as the other functions. To insert a value right click inside of the new window and select &#8220;Insert&#8221;. This new window will list your data as a MySQL statement tat looks like:</p><p><code>INSERT INTO categories</code></p><p><code> </code></p><p><code>(</code></p><p><code>linux,</code></p><p><code>windows</p><p>)</p><p>VALUES</p><p>(</p><p>"",</p><p>""</p><p></code></p><p>In this instance you have to actually add your values in the text. So let&#8217;s say we want to add the following values for the fields:</p><p>linux &#8211; Ubuntu</p><p>windows &#8211; Windows 7</p><p>To do this the MySQL syntax would look like:</p><p><code>INSERT INTO categories</code></p><p><span
style="font-family: monospace">(</span></p><p><code>linux,</code></p><p><code>windows</code></p><p><code>)</p><p>VALUES</p><p>(</p><p>"Ubunutu",</p><p>"Windows 7"</p><p></code></p><p><code>)</code></p><p>When you have made these edits click the File menu and select Fire to execute.</p><p><strong>Final thoughts</strong></p><p>If you are looking for a simple to use GUI for the management of your MySQL databases, look no further than MySQL Navigator. Although you will need to have a cursory understanding of MySQL, it will make the administration of your databases much easier.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/12/08/manage-your-mysql-databases-with-an-easy-to-use-gui/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Basic postgresql server setup</title><link>http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/</link> <comments>http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/#comments</comments> <pubDate>Mon, 09 Nov 2009 23:09:50 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[database]]></category> <category><![CDATA[database user]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[postgresql]]></category> <category><![CDATA[ubuntu server]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=18345</guid> <description><![CDATA[So many tool require databases. If you are a web administrator or a company with large stores of information, then you know the importance of databases. One of the most oft-used databases available is MySQL. But that is not the only player on the court. Another cross platform object-relational database management tool is PostgreSQL. Many [...]]]></description> <content:encoded><![CDATA[<p>So many tool require databases. If you are a web administrator or a company with large stores of information, then you know the importance of databases. One of the most oft-used databases available is MySQL. But that is not the only player on the court. Another cross platform object-relational database management tool is <a
title="PostgreSQL" href="http://www.postgresql.org/" target="_blank">PostgreSQL</a>. Many people refer to PostgreSQL as the Oracle of the open source world. That is because PostgreSQL is dense with features but not as fast as MySQL. And where MySQL is a simple to use database management tool, PostgreSQL is often seen as overly complicated.</p><p>Of course there are variations on that opinion. But that is neither here nor there. The purpose of this tutorial is to help you get a PostgreSQL server up and running quickly and easily. To make this simple we will make this a part of our Ubuntu Server series, so all you have to do is have your Ubuntu Server up and running (see my article &#8220;<a
title="Installing Ubuntu Server 9.04" href="http://www.ghacks.net/2009/09/03/installing-ubuntu-server-9-04/" target="_blank">Installing Ubuntu Server 9.04</a>&#8221; to get started.) Once you have that server up and running you are ready to get your PostgreSQL server up.</p><p><span
id="more-18345"></span><strong>Installation</strong></p><p>The first thing you need to do is to install the necessary software. Since this is Ubuntu, it&#8217;s quite easy. Open up a terminal window and issue the command:</p><p><em>sudo apt-get install postgresql</em></p><p>Once the software is installed you are ready to set it all up.</p><p><strong>Change the default user password</strong></p><p>One of the first steps you want to take is to change the default password for the user postgres. Sine we are using Ubuntu you will have to use the sudo command to change to the postgres user like so:</p><p><em>sudo su &#8211; postgres</em></p><p>You will have to enter your sudo password after which you will now be issuing commands as the user postgres. The next step is to gain access to the postgresql command prompt with the command:</p><p><em>psql</em></p><p>Your new command prompt will look like:</p><p><em>postgres=#</em></p><p>NOTE: The only user that can open the PostgreSQL prompt without defining a database to work with is the user postgres. Other users would have to gain access to the command prompt with a command like:</p><p><em>psql DB_NAME</em></p><p>Where <em>DB_NAME </em>is the name of an existing database.</p><p>Changing the password is as simple as issuing the command:</p><p><em>\password postgres</em></p><p>You will then be asked to enter a password and then verify that password.</p><p>Your default password has not been changed. You can exit from the PostgreSQL prompt by issuing the command:</p><p><em>\q</em></p><p><strong>Create a database</strong></p><p>Now, while still logged in as the postgres user, let&#8217;s create a database. For this you do not have to be logged into the PostgreSQL command prompt. Instead just issue the command:</p><p><em>createdb testdb</em></p><p>Where <em>testdb</em> is the name of the database you want to create. To check to make sure that database was created go back to the PostgreSQL command prompt (remember, the command <em>psql</em>) and enter:</p><p><em>\l</em></p><p>You should see a listing for your new database like:</p><p><code>testdb | postgres | UTF8 | en_US.UTF-8  | en_US.UTF-8</code></p><p>Once again, log out of the PostgreSQL command prompt with the command:</p><p><em>\q</em></p><p><strong>Create a user</strong></p><p>By default, the only user that can connect to a database is the postgres user. This will be of no help when you need to connect with another user. To create a new user (that can connect to databases) you would issue the command (as the user <em>postgres</em>):</p><p><em>createuser &#8211;superuser USERNAME</em></p><p>Where <em>USERNAME </em>is the name of the user you want to create.</p><p><strong>Final thoughts</strong></p><p>Now you should have a basic PostgreSQL installation with a test database and a user, besides postgres, that can work with the tools. Next time we work with PostgreSQL we&#8217;ll discuss more challenging issues with this outstanding database tool.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/11/10/basic-postgresql-server-setup/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Local Apache Web Server Wampserver</title><link>http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/</link> <comments>http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/#comments</comments> <pubDate>Thu, 17 Sep 2009 09:08:17 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[apache server]]></category> <category><![CDATA[apache web server]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[php]]></category> <category><![CDATA[wampserver]]></category> <category><![CDATA[webmaster]]></category> <category><![CDATA[xampp]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=16430</guid> <description><![CDATA[Running a local Apache web server is essential for many webmasters. It is always a good idea to test code locally before publishing it on the Internet. Professional webmasters usually test their code in a local web server before it gets published. Mainly to avoid possible downtimes in the live environment but also to avoid [...]]]></description> <content:encoded><![CDATA[<p>Running a local Apache web server is essential for many webmasters. It is always a good idea to test code locally before publishing it on the Internet. Professional webmasters usually test their code in a local web server before it gets published. Mainly to avoid possible downtimes in the live environment but also to avoid the hassle of having to upload and edit code on the Internet or network. It&#8217;s simply faster to test everything locally.</p><p>Wampserver is an Apache web server for the Windows operating system. It provides in many regards the same functionality of other web server solutions like <a
href="http://www.ghacks.net/2007/01/31/host-your-own-webserver/">XAMPP</a> or <a
href="http://www.ghacks.net/2009/03/28/home-web-server/">Home Web Server</a> which we have reviewed in the past. The latest version of the local web server package will install Apache 2.2.11, MySQL 5.1.36 and PHP 5.3.0 on the local computer system.</p><p><span
id="more-16430"></span>One interesting unique feature is the ability to add different versions of Apache, MySQL and PHP to the installation in the form of add-ons. This can be very handy to test a website locally under multiple different Apache, MySQL or PHP release versions.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2009/09/apache_web_server.gif" alt="apache web server" title="apache web server" width="281" height="289" class="alignnone size-full wp-image-16431" /></p><p>The installation of Wampserver will always install the latest versions of Apache, MySQL and PHP. One interesting security feature is the ability to limit access to the web server to localhost. It is required to click on the &#8220;put online&#8221; option to make it available to other computer systems as well.</p><p>Additional Apache, MySQL and PHP versions can be installed from the Wamp add-ons <a
href="http://www.wampserver.com/en/add-ons.php">page</a>. All add-ons are provided as executables that can be installed easily on the operating system.</p><p>Webmasters who need to test code offline can use Wampserver to do so. It is especially useful to test code against multiple versions of Apache, MySQL and PHP. Something that the other home server solutions do not provide.</p><p><a
href="http://www.wampserver.com/en/">Wampserver</a> is Open Source and can be downloaded from the developer&#8217;s website.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/09/17/local-apache-web-server-wampserver/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Database Monitoring Software Db2rss</title><link>http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/</link> <comments>http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/#comments</comments> <pubDate>Thu, 30 Jul 2009 12:18:57 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[blackfish sql]]></category> <category><![CDATA[database]]></category> <category><![CDATA[database monitoring]]></category> <category><![CDATA[db2rss]]></category> <category><![CDATA[interbase]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysql database]]></category> <category><![CDATA[Network Monitoring]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=14903</guid> <description><![CDATA[Database monitoring is not only important for businesses who want to monitor their online and offline services and applications but also for individuals. Webmasters who make use of databases like MySQL need to make sure that the databases are up and running and the best way to ensure that is to monitor them 24/7. Quite [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.ghacks.net/wp-content/uploads/2009/04/microsoft_windows.jpg" alt="microsoft windows" title="microsoft windows" width="128" height="128" class="alignleft size-full wp-image-11907" />Database monitoring is not only important for businesses who want to monitor their online and offline services and applications but also for individuals. Webmasters who make use of databases like MySQL need to make sure that the databases are up and running and the best way to ensure that is to monitor them 24/7. Quite a few monitoring services exist. It is possible to use online services &#8211; most of them paid depending on the quality and quantity of monitoring &#8211; but also services that run on a local PC.</p><p>We have dealt with several services in the past including the <a
href="http://www.ghacks.net/2009/05/28/network-monitoring-software/">network monitoring software</a> Open Monitor or the online service <a
href="http://www.ghacks.net/2008/07/19/monitor-your-servers-with-livewatch/">Livewatch</a>.</p><p><span
id="more-14903"></span>The database monitoring software dv2rss is different from these solutions. The main difference is that it can &#8211; as the title implies &#8211; monitor databases but also because it can only be run from the command line or a script. That&#8217;s not as bad as it sounds and it could be welcome in certain situations where no graphical user interface is needed or wanted.</p><p><a
href="http://www.be-precision.com/products/precision-utils/#db2rss">Db2rss</a> supports MySQL, Interbase and Blackfish SQL databases at the moment and can monitor them in a computer network or on the Internet. It comes with several command line parameters that define important information such as the database&#8217;s host name, the username and password. There are quite a few additional parameter that include running an SQL command on the database, comparing the results to a local copy and defining templates and title of the resulting RSS feed. The RSS feed is another aspect of this database monitoring software that is usually not found in other monitoring software programs.</p><p>It is then possible to subscribe to the RSS feed to receive the database monitoring information after the script&#8217;s execution. The software developer suggests to use the Windows task scheduler to run the database monitoring software regularly.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/07/30/database-monitoring-software-db2rss/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to: Install a LAMP server</title><link>http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/</link> <comments>http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/#comments</comments> <pubDate>Thu, 23 Jul 2009 17:43:55 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[LAMP]]></category> <category><![CDATA[lamp server]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[php]]></category> <category><![CDATA[tasksel]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=14678</guid> <description><![CDATA[If you&#8217;ve read enough of my Ghacks tutorials you have most likely come across mention of a LAMP server. If you are not sure what a LAMP server is: Linux Apache MySQL P (can mean PHP or PERL &#8211; depends upon your needs) LAMP servers are very popular, cheap, effective, flexible, and reliable servers. But [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve read enough of my Ghacks tutorials you have most likely come across mention of a LAMP server. If you are not sure what a LAMP server is:</p><ul><li>Linux</li><li>Apache</li><li>MySQL</li><li>P (can mean PHP or PERL &#8211; depends upon your needs)</li></ul><p>LAMP servers are very popular, cheap, effective, flexible, and reliable servers. But how are they installed? Actually, it&#8217;s not that hard. In this tutorial I am going to show you how to install a LAMP in two different ways: From the command line (using separate tools) and using the <em>tasksel</em> tool.</p><p><span
id="more-14678"></span><strong>Hardware needed</strong></p><p>Fortunately a LAMP server can be installed on lower-end hardware and still serve as a fairly efficient server. Naturally if you are going to be using your LAMP server for high traffic, you will want to select your hardware wisely.</p><p><strong>Install prerequisite</strong></p><p>Before you begin the installation of your server you will need to have your operating system installed. This is the &#8220;L&#8221; of LAMP. So find your favorite Linux distribution and install the operating system. For the purposes of this installation I am going to be installing on a Ubuntu 9.04 server installation. This will be a console only server (no GUI desktop) which is fine because the installation is done via command line only.</p><p>Once you have your operating system installed you are ready to install your server.</p><p><strong>Apache</strong></p><p>This is the easiest portion to install. Either log in to your console or open up a terminal window (if you are working from a GUI desktop) and enter the following command:<br
/> <code>sudo apt-get install apache2</code></p><p>You will have to enter your sudo user password for this installation to continue. Once this installation is complete check it by pointing a browser to that server IP address. You should instantly know if Apache is up and running.</p><p><strong>PHP</strong></p><p>For the purposes of this article we will assume the &#8220;P&#8221; stands for PHP. To install PHP (and all of its requirements) issue the command:</p><p><code>sudo apt-get install php5 libapache2-mod-php5</code></p><p>Once this installation is complete restart Apache with the command:</p><p><code>sudo /etc/init.d/apache2 restart</code></p><p>Let&#8217;s make sure this portion works properly. To test this create a file in the Apache document root (for this install it will be <strong>/var/www</strong>) called test.php. The contents of this file will be:<br
/> <code>&lt; ?php phpinfo(); ?&gt;</code></p><p>Save that file and then point your browser to http://IP_ADDRESS/test.php</p><p>Where IP_ADDRESS is the actual IP address of your server.</p><p>You should see &#8220;Test PHP Page&#8221; written on your browsers page. If so, you&#8217;re good to go.</p><p><strong>MySQL</strong></p><p>Now to install MySQL. To do this issue the command:</p><p><code>sudo apt-get install mysql-server</code></p><p>Once this is done you then need to set a password for MySQL. To do this issue the command:</p><p><code>mysql -u root</code></p><p>which will put you in the MySQL prompt. From this prompt (which looks like <em>mysql&gt; </em>) enter the command:<br
/> <code>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YOURPASSWORD');</code></p><p>Where YOURPASSWORD is the password you want to use for the mysql user.</p><p>Now start your MySQL server with the command:</p><p><code>/etc/init.d/mysql start</code></p><p>That&#8217;s it. Your LAMP server is up and running.</p><p><strong>The quick version</strong></p><p>You can actually install a full-on LAMP server on a (Ubuntu server install) with a single command:</p><p><code>sudo tasksel</code></p><p>You will need to select LAMP from the list and you will eventually be prompted for a MySQL password. That&#8217;s it.</p><p><strong>Final thoughts</strong></p><p>Getting a powerful, flexible web server up and running will take you less time and effort than you think. LAMP servers are an outstanding choice for your web servers&#8217; needs.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/07/23/how-to-install-a-lamp-server/feed/</wfw:commentRss> <slash:comments>16</slash:comments> </item> <item><title>Automatically Send MySQL Database Backup To Gmail</title><link>http://www.ghacks.net/2009/07/13/automatically-send-mysql-database-backup-to-gmail/</link> <comments>http://www.ghacks.net/2009/07/13/automatically-send-mysql-database-backup-to-gmail/#comments</comments> <pubDate>Mon, 13 Jul 2009 13:14:26 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Online Services]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[database backup database]]></category> <category><![CDATA[gmail]]></category> <category><![CDATA[linux server]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[mysql backup]]></category> <category><![CDATA[mysql database backup]]></category> <category><![CDATA[server]]></category> <category><![CDATA[sql backup]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=14370</guid> <description><![CDATA[Webmasters have to make sure that their websites and files are getting backed up regularly to be prepared when something unforeseen happens. This unforeseen event can be a hacker attack, a database crash, a fire in the data center of the hoster or human error. Whatever the cause is it can have a severe impact [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.ghacks.net/wp-content/uploads/2009/07/mysql.gif" alt="mysql" title="mysql" width="128" height="85" class="alignleft size-full wp-image-14371" />Webmasters have to make sure that their websites and files are getting backed up regularly to be prepared when something unforeseen happens. This unforeseen event can be a hacker attack, a database crash, a fire in the data center of the hoster or human error. Whatever the cause is it can have a severe impact on the service and business if backups are not available to restore the website or service.</p><p>Many web hosting companies offer backup space and create backups regularly. Some on the other hand ask for additional payments or do not offer this backup service at all. It then is up to the webmaster or server administrator to ensure that the data gets backed up regularly so that it can be restored when needed.</p><p><span
id="more-14370"></span>One option that is becoming increasingly popular is to backup data and send it to an offsite storage space. <a
href="http://www.backup2mail.com/">Backup2Mail</a> is such a script. It can initiate automatic MySQL database backups on Linux servers using cron jobs and transfer these backups to a Gmail account. The only restriction is that the size of the zipped database should not exceed the maximum attachment limit of Gmail which is currently 25 Megabytes.</p><p>The developer provides instructions on how to setup the MySQL database backup and Gmail transfer on his website. It basically means that the user needs to edit an index.php file to provide the script with the MySQL information and GMail data. The only thing left after this step is to create a cron job so that the script is executed regularly on the server. Backups will from then on be created automatically on the web server and send to the Gmail account.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/07/13/automatically-send-mysql-database-backup-to-gmail/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Set up MySQL database replication</title><link>http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/</link> <comments>http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/#comments</comments> <pubDate>Thu, 09 Apr 2009 17:58:26 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[database]]></category> <category><![CDATA[database replication]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[replication]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=11853</guid> <description><![CDATA[If you use databases then you know how important it is to back them up. But backing up a database and being able to use that backup depends upon the back up being always up to date. There is a method that ensures you will always have an up to date backup. That method is [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.ghacks.net/wp-content/uploads/2009/04/logo_mysql_sun_a.gif"><img
class="alignleft size-full wp-image-11857" src="http://www.ghacks.net/wp-content/uploads/2009/04/logo_mysql_sun_a.gif" alt="logo_mysql_sun_a" width="114" height="68" /></a>If you use databases then you know how important it is to back them up. But backing up a database and being able to use that backup depends upon the back up being always up to date. There is a method that ensures you will always have an up to date backup. That method is database replication.Replication is a way to configure a MySQL database to update on a remote server whenever the local client is updated.</p><p>Database replication will require the use of two machines. The reason you want to use two machines is to ensure you will always have a working copy of your database (should one machine die). When using replication you think of your machines as Master and Slave. The Master is the machine that holds the original database. The Slave is the machine that holds the replicated database (the backup per say.) Both machines must have a working MySQL installation and must be networked together. You will need root access as well as access to the database administrator on both machines.</p><p><span
id="more-11853"></span><strong>Setting up the Master</strong></p><p>For purpose of example our database to replicate will be called &#8220;sample_database&#8221;.? The first thing you need to do is open up the <strong>/etc/mysql/my.conf</strong> file for editing. You need to search for the lines:</p><p><code>#skip-networking<br
/> #bind-address = 127.0.0.1</code></p><p>Uncomment out these lines (remove the &#8220;#&#8221; character). If these lines do not exist, add them. Now we have to inform mysql which database we plan on replicating. For this you will add the following lines:<br
/> <code>log-bin = /var/log/mysql/mysql-bin.log<br
/> binlog-do-db=sample_database<br
/> server-id=1</code></p><p>The above lines do the following:</p><p>Line 1: Instruct mysql what log file to use.</p><p>Line 2: Instruct mysql which database to replicate</p><p>Line 3: Instruct mysql that this machine is the master.</p><p>Restart mysql on this machine with the following command:</p><p>/etc/init.d/mysql restart</p><p>The next step is to log into the mysql terminal and create a user that has replication privileges. To do this issue the command:</p><p>mysql -u root -p</p><p>You will prompted for the mysql admin password. Now we have to make some mysql magic. From the mysql prompt issue the following:</p><p><code>GRANT REPLICATION SLAVE ON *.* TO 'USER'@'%' IDENTIFIED BY '';</code></p><p>Where NEW_PASSWORD is the actual password and USER is the actual username that will have replication privileges.</p><p>Now issue the command:</p><p><code>FLUSH PRIVILEGES;</code></p><p>You&#8217;re not done with mysql yet. Now issue the command:</p><p><code>USE sample_database;</code></p><p>And now the command:</p><p><code>FLUSH TABLES WITH READ LOCK;</code></p><p>And now you need to make sure mysql is seeing the Master and can show the status of the master with the command:</p><p><code>SHOW MASTER STATUS;</code></p><p>When you issue the above command you should see a listing printed out for your sample_database. Write this information down (you will see a Position number that you will need later).<br
/> Now you need to get tables and data from the sample_database. The method I will show you requires that the database on the Master be locked momentarily. To that end the database will be unavailable until the database is unlocked. Keep this in mind when setting this up.</p><p>Now you&#8217;re ready to set up the Slave. Move over to the machine that will serve as the slave.</p><p>The first thing to do on the Slave is to create the database the Master will write to. On the slave open up the mysql shell with:</p><p><code>mysql -u root -p</code></p><p>You will be prompted for the password. Now enter the following command to create the database:</p><p><code>CREATE DATABASE sample_database;</code></p><p>And quit mysql with the &#8220;quit&#8221; command.</p><p>Now to configure MySQL to know it is the slave and open up the <strong>/etc/mysql/my.conf</strong> file for editing. Add the following lines:<br
/> <code>server-id=2<br
/> master-host=IP_ADDRESS_OF_MASTER<br
/> master-user=USER<br
/> master-password=USER_PASSWORD<br
/> master-connect-retry=60<br
/> replicate-do-db=sample_database</code></p><p>Where IP_ADDRESS_OF_MASTER is the actual IP address of the master server, USER is the user created on the master for replication, and USER_PASSWORD is the password given to the replication user on the Master.</p><p>Save that file and restart mysql on the slave with the command:</p><p><code>/etc/init.d/mysql restart</code></p><p>Now we have to load the data from the Master into the Slave. This is when the database will be locked. Here are the commands to load the data:</p><p><code>mysql -u root -p</code></p><p>Enter the mysql admin password. Now from the mysql prompt enter the following command:</p><p><code>LOAD DATA FROM MASTER;</code></p><p>Now exit the mysql prompt with the command <em>quit</em>.</p><p>The next step is to stop the slave so you can finish up the Slave configuration. Issue the following:</p><p><code>mysql -u root -p</code></p><p>You will prompted for the root password.</p><p>now enter the command:</p><p><code>SLAVE STOP;</code></p><p>Now the next command is a bit lengthy:</p><p><code>CHANGE MASTER TO MASTER_HOST='IP_ADDRESS_OF_MASTER', MASTER_USER='USER', MASTER_PASSWORD='USER_PASSWORD', MASTER_LOG_FILE='mysql-bin.007', MASTER_LOG_POS=NUMBER;</code></p><p>Where:<br
/> IP_ADDRESS_OF_MASTER is the actual IP address of the Master server.<br
/> USER is the actual user you created on the Master.<br
/> USER_PASSWORD is the actual password you gave the user on the Master.<br
/> mysql-bin.007 is the File name from the output of the SHOW MASTER STATUS command from above.<br
/> MASTER_LOG_POS is the Position given in the output of the SHOW MASTER STATUS command from above.</p><p>Finally issue the command:</p><p>SLAVE START;</p><p>and then quit the mysql prompt with the command &#8220;quit&#8221;.</p><p>You&#8217;re done. If you have phpmyadmin installed you can check the status of the databases as they updated. You now have database replication up and running. Congratulations.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
