<?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>huanix &#187; MySQL</title>
	<atom:link href="http://www.huanix.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.huanix.com</link>
	<description>chown -R huanix /</description>
	<lastBuildDate>Sat, 31 Dec 2011 14:53:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Connecting to MySQL 5.0.xx from a remote client on Ubuntu Gutsy (or other)</title>
		<link>http://www.huanix.com/2007/11/09/connecting-to-mysql-50xx-from-a-remote-client-on-ubuntu-gutsy-or-other/</link>
		<comments>http://www.huanix.com/2007/11/09/connecting-to-mysql-50xx-from-a-remote-client-on-ubuntu-gutsy-or-other/#comments</comments>
		<pubDate>Sat, 10 Nov 2007 02:48:30 +0000</pubDate>
		<dc:creator>huanix</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Moodle]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.huanix.com/2007/11/09/connecting-to-mysql-50xx-from-a-remote-client-on-ubuntu-gutsy-or-other/</guid>
		<description><![CDATA[It took me a few minutes to connect remotely to a mysql database. My use for this is to use the same database for multiple installations of web software (moodle). I&#8217;ll go into that in-depth later, but right now, let&#8217;s just connect to the database from remote. These instructions are based on Ubuntu Gutsy or [...]]]></description>
			<content:encoded><![CDATA[<p>It took me a few minutes to connect remotely to a mysql database. My use for this is to use the same database for multiple installations of web software (moodle). I&#8217;ll go into that in-depth later, but right now, let&#8217;s just connect to the database from remote. These instructions are based on Ubuntu Gutsy or Feisty, but should be pretty general to any mysql and linux server. These steps are done on the database server.</p>
<p>1. edit /etc/mysql/my.cnf to remove the lock for localhost (127.0.0.1)<br />
<code><br />
sudo nano +47 /etc/mysql/my.cnf</code><br />
comment out the line (add a # at the VERY beginning of the line)<br />
<code><br />
#bind-address            = 127.0.0.1<br />
</code></p>
<p>2. edit /etc/hosts.allow to allow connections from your server (10.0.0.1 in this example &#8211; change it to the address you are connecting FROM). Note: &#8220;ALL&#8221; is too general, but I had trouble using &#8220;mysqld&#8221;, which was recommended.<br />
<code><br />
sudo nano /etc/hosts.allow<br />
</code><br />
scroll to the bottom and add:<br />
<code><br />
ALL : 10.0.0.55</code></p>
<p><code> </code><br />
3. Add the user in mysql with the correct host identification. Enter mysql as root (mysql -u root -p) and do the following:<br />
<code><br />
create user remoteguy@10.0.0.55 identified by 'l33ta0l';<br />
</code><br />
4. You could restart your mysql and inet services, but i just restart the server &#8211; sometimes easier <img src='http://www.huanix.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>NOW, go to the client (in this case, we&#8217;re calling it 10.0.0.55) and do, (we&#8217;re calling the mysql server 10.0.0.2) :<br />
<code><br />
mysql -u remoteguy@10.0.0.55 -p -h 10.0.0.2<br />
</code></p>
<h4>Incoming search terms:</h4><ul><li>ubuntu mysql connect remotely</li><li>connect to mysql remotely ubuntu</li><li>ubuntu connect to mysql database remote</li><li>ubuntu connect to mysql remote</li><li>how to connect mysql remotely in ubuntu</li><li>how to connect to mysql ubuntu remotely</li><li>ubuntu mysql connect from remote</li><li>remote connection to mysql database ubuntu</li><li>connecting to mysql database remotely ubuntu</li><li>ubuntu connect to remote mysql database</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.huanix.com/2007/11/09/connecting-to-mysql-50xx-from-a-remote-client-on-ubuntu-gutsy-or-other/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The best CMS for 2007?</title>
		<link>http://www.huanix.com/2007/06/04/the-best-cms-for-2007/</link>
		<comments>http://www.huanix.com/2007/06/04/the-best-cms-for-2007/#comments</comments>
		<pubDate>Mon, 04 Jun 2007 13:21:43 +0000</pubDate>
		<dc:creator>huanix</dc:creator>
				<category><![CDATA[Apache2]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.huanix.com/2007/06/04/the-best-cms-for-2007/</guid>
		<description><![CDATA[I&#8217;m very new to the concept of using a CMS to publish a community website, so I&#8217;ve been doing some research to find the best and most current free Content Management System. The first valuable resource I found is wikipedia&#8217;s list of CMS&#8217;s, which is initially impressive, but I quickly found it overwhelming. To be [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m very new to the concept of using a CMS to publish a community website, so I&#8217;ve been doing some research to find the best and most current free Content Management System.</p>
<p>The first valuable resource I found is <a href="http://en.wikipedia.org/wiki/List_of_content_management_systems">wikipedia&#8217;s list of CMS&#8217;s</a>, which is initially impressive, but I quickly found it overwhelming. To be perfectly honest, I don&#8217;t feel like sorting through a list of hundreds of CMS&#8217;s, I want a CMS that meets two sets of criteria: One, it has to meet my platform preferences, and two, it has to be in current cutting-edge development.</p>
<p>My platform preferences:</p>
<ul>
<li>Linux 2.6</li>
<li>Apache 2.2</li>
<li>PHP 5</li>
<li>Mysql 5</li>
</ul>
<p>My development preferences:</p>
<ul>
<li>GNU license</li>
<li>In development 2+ years</li>
<li>The most downloads from <a href="http://www.sourceforge.net">Sourceforge</a>.</li>
<li>The site with the highest traffic on <a href="http://www.alexa.com">Alexa</a>.</li>
</ul>
<p>While I have yet to document my results, which I plan to share later on this blog, the winner appears to be <a href="http://www.joomla.org">Joomla!</a>. The only drawback to this point is that it does appear to require patience in implementation, something I lack! I spent a couple hours with it recently, and while I was impressed with it&#8217;s capability, I realized it would take signifcant experience to make it jump through the hoops I have in mind.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.huanix.com/2007/06/04/the-best-cms-for-2007/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dynamic Dependent Drop Down Select Forms using PHP, MySQL, and JavaScript</title>
		<link>http://www.huanix.com/2006/12/25/dynamic-dependent-drop-down-select-forms-using-php-mysql-and-javascript/</link>
		<comments>http://www.huanix.com/2006/12/25/dynamic-dependent-drop-down-select-forms-using-php-mysql-and-javascript/#comments</comments>
		<pubDate>Mon, 25 Dec 2006 21:39:53 +0000</pubDate>
		<dc:creator>huanix</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.huanix.com/?p=15</guid>
		<description><![CDATA[I knew it was possible to create a dynamic dependent drop down form using PHP, MySQL, and JavaScript, but I had never had an excuse to use one before my Christmas-break project. I have always thought the forms were neat &#8211; like when you select a Country and the next drop-down automagically displays the states [...]]]></description>
			<content:encoded><![CDATA[<p>I knew it was possible to create a dynamic dependent drop down form using PHP, MySQL, and JavaScript, but I had never had an excuse to use one before my Christmas-break project. I have always thought the forms were neat &#8211; like when you select a Country and the next drop-down automagically displays the states from that country. These are also referred to as drill down menus.<br />
It&#8217;s &#8220;family time&#8221;, so I&#8217;m building a basic inventory control system for the school I work at, and one of the basic goals is that users would select their &#8220;hardware type&#8221; (tv, pc computer, mac computer, laptop, etc.) and subsequently select the model # from a list rather than entering it manually. In addition, an administrator has the option to add both hardware types and models to the list at his/her discretion.</p>
<p>All of these things require a dynamic dependent drop down list. I found several resources for completing this task, and after several hours of work, I got it to work using what I believe is the simplest method. You may be far more skilled than I am, and this may be a breeze for you, but I have very little knowledge of JavaScript, so I relied on PHP as much as possible.<br />
Many folks use DreamWeaver to create these menus &#8211; I am challenge-oriented, so all of my techniques refer to hand-coded methods.</p>
<p>The first and most highly regarded source for creating dependent dynamic drop downs is the <a href="http://www.mattkruse.com/javascript/dynamicoptionlist/">Matt Kruse method</a>, Matt has written an extensive JavaScript library that simplifies the entire dynamic dropdown task.. and it does, but because of my unfamiliarity with JavaScript, I had trouble adding the database through PHP.<br />
I was initially stoked about an AJAX method, and I found one at <a href="http://www.webmonkey.com/webmonkey/06/15/index3a_page2.html?tw=authoring">webmonkey</a>, but I am a novice to AJAX, and I couldn&#8217;t make it happen.<br />
I also tried <a href="http://www.codefixer.com/codesnippets/dynamically_dependent_dropdown_lists.asp">codefixer</a>, but after some struggling, I decided it wasn&#8217;t the method for me.</p>
<p>All of this to say, I did eventually find the magic, and it was relatively easy to use (if you add a trick). The source is at <a href="http://p2p.wrox.com/topic.asp?TOPIC_ID=17383">wrox</a>, and the trick I used to make it work was to create a simulated database using their structure, and slowly migrate it over to my setup. It worked really well, used a minimum of code, and does the job perfectly!</p>
<p><strong> Here is my cleaned up and working version of the script:<a href="http://www.huanix.com/files/dependent_select/dependent_select.php">http://www.huanix.com/files/dependent_select/dependent_select.php</a></strong></p>
<h4>Incoming search terms:</h4><ul><li>php dependent drop down list</li><li>dependent dropdown in php</li><li>dependent drop down list in php</li><li>php dependent drop down</li><li>dependent drop down php</li><li>dependent drop down list php</li><li>dependent dropdown php</li><li>php dependent dropdown</li><li>dependent dropdowns php</li><li>php mysql dynamic dropdown</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.huanix.com/2006/12/25/dynamic-dependent-drop-down-select-forms-using-php-mysql-and-javascript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Lazy Saturday with Suse</title>
		<link>http://www.huanix.com/2006/12/02/lazy-saturday-with-suse/</link>
		<comments>http://www.huanix.com/2006/12/02/lazy-saturday-with-suse/#comments</comments>
		<pubDate>Sat, 02 Dec 2006 22:22:50 +0000</pubDate>
		<dc:creator>huanix</dc:creator>
				<category><![CDATA[Apache2]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Suse]]></category>
		<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://www.huanix.com/?p=11</guid>
		<description><![CDATA[Today I pulled out a copy of Suse 10.0 and installed it on one of the desktops I&#8217;ve got laying around. I had forgotten how user-friendly and well developed Suse is. I started running the install after reading in several places that the most stable MySQL setups are built from source on Suse machines. I [...]]]></description>
			<content:encoded><![CDATA[<p>Today I pulled out a copy of Suse 10.0 and installed it on one of the desktops I&#8217;ve got laying around. I had forgotten how user-friendly and well developed Suse is. I started running the install after reading in several places that the most stable MySQL setups are built from source on Suse machines. I have also been using Ubuntu for so long that I was sort of worried that I was getting out of &#8220;Linux&#8221; and into &#8220;Ubuntu&#8221;.<br />
I started hangingout at #planet.mysql &#8211; which is odd for me &#8211; I am a complete novice there, surrounded by the Gods of MySQL, but I look forward to hearing what they have to say and try to keep my mouth shut!<br />
Still frustrated with apache includes. It&#8217;s rare that I give up on a problem, and I haven&#8217;t worked on my apache2 include problem in awhile. I&#8217;m wondering if the source build that I&#8217;m doing on Suse will make things work better? FYI &#8211; if you missed it, I kept getting syntax errors when I tried to do server side includes in Apache.<br />
I have discovered the MySQL 5.1 manual (<a href="http://downloads.mysql.com/docs/refman-5.1-en.pdf" target="_blank">direct link</a>)is actually a great read &#8211; I would reccommend it. I&#8217;m only through the first couple hundred pages, but it&#8217;s a page-turner.. geek style.<br />
As a side note, my wonderful wife, (who is a &#8220;Linux rejectionist&#8221; ) has been running Vista RC2 on her 3.4GHz, 2GB system (we call it the &#8220;pink computer&#8221;). I have found a few things I like, and a few things I disliked about the setup &#8211; keep in mind that it&#8217;s RC2, not the retail release!</p>
<p>Likes:<br />
- The widget panel is nice &#8211; I like watching our photos, and the CPU/Memory widget.<br />
- The Windows Experience Rating is a nice tool &#8211; As a non-gamer, I was not aware that my NVidia 6200 was such a bottleneck.<br />
- The GUI is intuitive. This may be a result of my being a OS enthusiast, but I generally knew how to get what I wanted without having to search for help.</p>
<p>Dislikes:<br />
- Constantly having to tell Windows what could or couldn&#8217;t run. Security should be a system-level function, not a user process.<br />
- The NVidia drivers were difficult to install in Vista. The UI does a lot of hand-holding (which can be good), but the installer didn&#8217;t work with the driver files, so they had to be manually inserted (with &#8220;have disk&#8221;). Vista didn&#8217;t like my tinkering with the drivers either- if I removed my device driver, Vista would replace it with its own version. Good for a novice, irritating for a geek.<br />
- The Office 2007 Beta Powerpoint is attractive, and I like the menus, but the type-rate reminds me of a 486. I&#8217;m not sure what&#8217;s going on with the internals, but typing in powerpoint is laggy and makes me think of typing on a remote system with a bad connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.huanix.com/2006/12/02/lazy-saturday-with-suse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Lamp Group &#8211; The CLAMPP</title>
		<link>http://www.huanix.com/2006/11/25/geshi-test/</link>
		<comments>http://www.huanix.com/2006/11/25/geshi-test/#comments</comments>
		<pubDate>Sat, 25 Nov 2006 13:22:31 +0000</pubDate>
		<dc:creator>huanix</dc:creator>
				<category><![CDATA[Apache2]]></category>
		<category><![CDATA[Clarksville]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[LAMPP]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.huanix.com/?p=10</guid>
		<description><![CDATA[Good news everyone! There&#8217;s a new Linux &#8211; type group in Clarksville, Tennessee. Check out the Clarksville Linux Apache MySQL PHP Perl group &#8211;CLAMPP I just wanted to test php highlighting in geshi]]></description>
			<content:encoded><![CDATA[<p>Good news everyone! There&#8217;s a new Linux &#8211; type group in Clarksville, Tennessee. Check out the Clarksville Linux Apache MySQL PHP Perl group &#8211;<a href="http://www.clampp.com">CLAMPP</a></p>
<p>I just wanted to test php highlighting in geshi</p>
<p><code lang="php"><?echo 'check out www.CLAMPP.com!'; ?> </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.huanix.com/2006/11/25/geshi-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP_REFERER and HTML formatting (NOT HTTP_REFERRER )</title>
		<link>http://www.huanix.com/2006/11/21/http_referrer-and-html-formatting/</link>
		<comments>http://www.huanix.com/2006/11/21/http_referrer-and-html-formatting/#comments</comments>
		<pubDate>Wed, 22 Nov 2006 04:25:36 +0000</pubDate>
		<dc:creator>huanix</dc:creator>
				<category><![CDATA[HTML formatting]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.huanix.com/?p=6</guid>
		<description><![CDATA[I am sort of beginning to realize that I can get better site information from using PHP $_SERVER calls than by using the AWstats page. I discovered this because I built a &#8220;fake&#8221; login page at my direct IP address so I could distract people who portscan onto my server &#8211; the page looks like [...]]]></description>
			<content:encoded><![CDATA[<p>I am sort of beginning to realize that I can get better site information from using PHP $_SERVER calls than by using the AWstats page. I discovered this because I built a &#8220;fake&#8221; login page at my direct IP address so I could distract people who portscan onto my server  &#8211; the page looks like a login, but it&#8217;s really just a fake form that continually says the credentials are invalid. To make it more interesting, I wrote some PHP/MySQL to collect some data about my stumblers. As expected, most of them are coming from an IP similar to mine (port scanning), and none of them have actually supplied input to the login &#8211; though nearly all of them press &#8220;login&#8221; to check for a blank login ability. I will probably share a link to the fake login when i get around to writing a quick front-end for it. I always like to dial-back to ip&#8217;s that port scan me, and a simple php front end would make that easy.</p>
<p>Anyway &#8211; writing that gave me the idea to write a Apache2 include for tracking visitors &#8211; i LOVE the <a target="_blank" href="http://us2.php.net/reserved.variables">$_SERVER['HTTP_REFERER']</a> element, and I will have fun just toying with it. Here&#8217;s a short explanation how I did it:</p>
<p>First, set up  a database and table, then add a user on MySql:</p>
<blockquote><p># mysql -u root<br />
# create database  login;<br />
# create user login identified by &#8216;password&#8217;;<br />
# grant insert on login.* to login;</p></blockquote>
<p>This user will only be able to add data to the database, and because he hasn&#8217;t been granted &#8220;select&#8221; privileges, he won&#8217;t [easily] be able to see what he inserted.</p>
<p>Now set up the table using MySQL. You can do this from the root account if you choose:</p>
<blockquote><p>CREATE TABLE `login` (<br />
`count` int(11) NOT NULL auto_increment,<br />
`username` varchar(64) default NULL,<br />
`password` varchar(64) default NULL,<br />
`IP` varchar(20) default NULL,<br />
`refer` varchar(256) default NULL,<br />
PRIMARY KEY  (`count`));</p></blockquote>
<p>The fields are &#8220;count&#8221; it&#8217;s just a simple primary key, &#8220;username&#8221; will take the value the  user passes ,  &#8220;password&#8221; takes the password they passed &#8211;  if this were a real  password form that would  be an encrypted value &#8211;  but this is just a  toy to see what  values people will  attempt to pass to a login that they don&#8217;t own. &#8220;IP&#8221; will take the  $_SERVER['REMOTE_ADDR'] element, and &#8220;refer&#8221; takes the  $_SERVER['HTTP_REFERER'] element.<br />
Finally, you&#8217;ll write a form and a simple PHP page to take some variables and insert them into the database &#8211; here&#8217;s what I used:</p>
<p>##Add your css here if you want<br />
title>  /title> \ form method=&#8221;post&#8221; action=&#8221;?php echo $_SERVER['PHP_SELF']; ?>&#8221;>  label for=&#8221;username&#8221;>Username<br />
input type=&#8221;text&#8221; id=&#8221;username&#8221; name=&#8221;username&#8221; /><br />
label for=&#8221;password&#8221;>Password<br />
input type=&#8221;password&#8221; id=&#8221;password&#8221; name=&#8221;password&#8221; /><br />
input type=&#8221;submit&#8221; value=&#8221;log in&#8221; name=&#8221;submit&#8221; /><br />
$username = $_POST['username'];<br />
$password = $_POST['password'];<br />
$IP = $_SERVER['REMOTE_ADDR'];<br />
$refer = $_SERVER['HTTP_REFERER'];</p>
<p>if($db = @mysqli_connect(&#8216;localhost&#8217;, &#8216;USERNAME&#8217;, &#8216;PASSWORD&#8217;)) {<br />
mysqli_select_db($db, &#8216;login&#8217;);<br />
$query= &#8220;insert into login (username, password, IP, refer) values (&#8216;$username&#8217;, &#8216;$password&#8217;, &#8216;$IP&#8217;, &#8216;$refer&#8217;)&#8221;;<br />
mysqli_query($db, $query);<br />
mysqli_close($db);<br />
}else{<br />
echo &#8220;The db could not connect.&#8221;;}</p>
<p>if(isset($password)){<br />
echo &#8216;Your credentials failed.&#8217;;<br />
};<br />
?</p>
<p>That is really just gross. No kidding. It&#8217;s awful &#8211; I just started using wordpress and I have discovered that I&#8217;ll have to work on an effective way to share code, or at least learn how WordPress handles it. I do apolgize for the ugliness &#8211; hopefully it conveys the big picture!<br />
I have a confession. I suck at HTML formatting. I think it&#8217;s a failure to learn rather than a failure of creativity. At very point i am struggling with the layout of two tables on www.sl7pm.com that don&#8217;t even need to exist. I think I&#8217;m going to cruise over to amazon and pick up a good book on web2.0 formatting. My logical brain tells me that means using more CSS and XML, but my creative brain tells me it means making things look attractive.. and I know from my own experience that ugly sites aren&#8217;t sticky!</p>
<p>I am still using the 1999 &#8220;tables&#8221; style of formatting.. which i think is awesome for displaying database results, but needs to go out the door for attractive and functional web design.<br />
The title? I spent a good 5 minutes mis-spelling referer before i realized what  a goober i was. I thought i&#8217;d add that as a beacon to those who are still mispelling it!</p>
<h4>Incoming search terms:</h4><ul><li>html HTTP_REFERER</li><li>rde-dm:include referrer</li><li>android not http_referer</li><li>http referer in html</li><li>http_referer html</li><li>http_referrer html</li><li>why http_referer not http_referrer</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.huanix.com/2006/11/21/http_referrer-and-html-formatting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

