Toubabou

June 1, 2011

Starting and restarting MySQL

Filed under: Uncategorized

I’ve had adequate opportunities to install/reïnstall MySQL in the past year that I’m starting to find what the hiccups are. Oracle can’t seem to figure out how to reliably start/restart/stop MySQL in Mac OS X. The control panel (sorry, preference pane) is really only adequate for telling if the server is running or not. Trying to actually start the server using Oracle’s preference pane fails, and the check box to start automatically doesn’t work, either.

What does work, in 10.6 Snow Leopard, is using launchd to manage the starting and stopping of MySQL.

Most of these details are from Dan Benjamin’s website, hivelogic, where he advocates rolling your own MySQL from source. I’m not opposed to compiling from source, but lacking a need for it I find these instructions work just as well for the pre-compiled MySQL from Oracle.

Anyway, first you’ll need a plist file for launchd to use to start and stop MySQL. I’m not sure if mine originally cam from Dan’s page, but it’s identical anyway.

Save the following as com.mysql.mysqld.plist.


!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>com.mysql.mysqld</string>
    <key>Program</key>
    <string>/usr/local/mysql/bin/mysqld_safe</string>
    <key>RunAtLoad</key>
    <true/>
    <key>UserName</key>
    <string>mysql</string>
    <key>WorkingDirectory</key>
    <string>/usr/local/mysql</string>
</dict>
</plist>

The next step is to get the Mac to do something with this plist file. Copy or move it to /Library/LaunchDaemons/

I don’t know how important these settings are to the function, but I set the owner of the file to root and tightened the privs a bit:

   sudo chown root.wheel /Library/LaunchDaemons/com.mysql.mysqld.plist
   sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysqld.plist

Finally, to start MySQL, enter the following:

   sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysqld.plist

Stopping MySQL can be accomplished with this command:

   sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist

The last thing that needs doing is to set the root user’s password for MySQL:

   mysqladmin -u root password NEWPASSWORD

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

February 9, 2011

Blitz blitzed

Filed under: Uncategorized

Well, I’ve owned and used Blitz for some time, and it’s come in handy many times. Blitz is a program used to pause background applications so that your important apps get more processor time. Unfortunately, it can be a little unstable, and it’s a problem un-pausing your apps once Blitz crashes.


Today I was in this situation. I figured that Blitz must be tying in to part of the underlying *nix of the Mac OS, and apparently I was right. There is a CLI command, kill, that I have used in the past to get rid of unruly processes. Unknown to me, however, was its ability to pause and continue processes. Using this newly gained knowledge, I set about un-pausing my machine.

The first thing I had to do was log in via ssh and unpause the Terminal on my paused computer. Then, I unpaused the Finder and located the Activity Monitor and launched it. I could have launched it remotely, as well, using open -a Activity\ Monitor, but I didn’t.

Once Activity Monitor was running I had a nice alphabetical list of my programs, and the paused programs were listed in red. All I had to do at that point was find the process id number (leftmost in the Activity Monitor display) and type sudo kill -cont #pid, where #pid is the process number for each paused program.

Finally, I removed Blitz from my list of apps opened at login. I’ll have to find some other way to deal with slowdowns in the future.

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

February 3, 2011

Google Chrome

Filed under: Uncategorized

I have had a chance to look at Google’s Chrome OS/browser. My overall reaction is a big YUCK! It reminds me of everything that I hate about Microsoft except the viruses and instability (though I have heard some people have stability issues, too). In any case, I logged in with a throw-away id that I’ve registered to Google. They immediately tried to get me to get a gmail account. Now, if I wanted a gmail account, I would have registered a gmail account. People complain that the Mac (or the iPhone or iPad) are closed systems, but this is ridiculous!

Of course, I don’t trust Google, and that plays a role in my reaction as well, but the insularity of Chrome gives me a creepy feeling, especially with the realization that everything is being done through Google’s servers. I believe that anonymity and privacy on the Internet, while frequently abused, is absolutely vital to the usefulness of the medium. The closer Google gets to complete hegemony the less safe I will feel in using the Internet. They have shown themselves amenable to dealing with dictators. 

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

January 26, 2011

Asterisk and Softphones (and perhaps BlueTooth)

Filed under: Uncategorized

Well, I’m trying to set up an Asterisk server that will allow me to use a softphone on my Mac to make and receive calls over my iPhone via BlueTooth. The first step is to get Asterisk working.

That is complete, having downloaded and compiled the source from here. (You need the Apple Developer Tools [now simply called XCode, I believe] to do this.)

Getting the server started was a little more complicated, but I was able to do it by creating the appropriate plist file using the instructions here.

I don’t know if I’m doing something wrong or if it’s supposed to work this way, but I’m running Asterisk as root. I will probably change this in the future.

Now I am trying to configure the softphone - I’m using Telephone right now - thanks, Doug. I’m also following the Asterisk Wiki directions for configuration (well, as closely as I ever follow directions…)

Thanks to the help from #asterisk I was able to determine

  1. that the config directory on a Mac install is /usr/etc/asterisk rather than /etc/asterisk
  2. that Telephone has some problem with connecting. I’m currently connecting using X-Lite 4.
Now I need to figure out how to get the iPhone connected. It requires chan_mobile which requires bluetooth, which I have, but apparently not to the satisfaction of asterisk. 

Update: Apparently, the Bluetooth API used by asterisk (libbluetooth) is different than that used by the Mac (IOBluetooth). Therefore I will have to investigate a serious patch before I will be able to use Bluetooth and asterisk on the Mac. On the other hand, I am proceeding apace towards doing so on Linux! :-)

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

September 14, 2010

Kindle and iPad

Filed under: Uncategorized

Well, there have been enough other posts on this subject that I may as well weigh in and be ignored… I have read that the Kindle is in competition with the iPad, and some have asserted that Apple desperately needs a 7" iPad in order to better compete with the Kindle.

This is utter nonsense. I have a Kindle on order from Amazon. Amazon is doing well enough that they can afford to make me wait for the Kindle because demand is so high, and they know that there is nothing that competes (properly understood) with the Kindle. Oh, sure, there are other eBook readers, and many of them use an eInk display, but from my (admittedly limited) research there is nothing that approaches the Kindle’s ease of use, weight, battery life, etc. When it comes to dedicated eBook readers, the Kindle is the king, and no other device approaches it, not even the iPad.

I intend to order an iPad. Now, one might think that if I’m so gung-ho about the iPad I would have one already, so I must not think as highly of the iPad as I do the Kindle. One would be wrong. I could point out that the Kindle is on its third iteration – not its first. The iPad is on its first, and much as I want one, I am willing to wait a few more months and see what upgrades are on the way. A camera would be great, and I won’t be too surprised if it happens.

So, what is the iPad, if it’s not a Kindle competitor? Well, although the iPad is a great eBook platform, with all the benefits that color adds, it far surpasses that function. While it is not the long-sought Apple Mac Tablet of legend, it is much more of a personal computer than is the Kindle. Having used an iPhone for several months, now, I have come to appreciate the talents of this computer platform more and more. The iPhone (and therefore the iPad) is useful in ways that are different than the usefulness of a full-blown computer – even a laptop. The simplicity and speed of many actions is attractive, so that I find myself using my iPhone for things that I once did on my MacBook, even while using my MacBook for other things. I do find myself frequently wishing that the screen were bigger. Therefore, I reason that I will be even more impressed with the iPad. I also suspect that the iPad is going to be a very dynamic development platform, and would like to get involved in that.

The iPad is not suited to long-term reading in the way the Kindle is, neither from the standpoint of mass, nor from eyestrain, nor from battery life, but it is suited to a whole range of things that the Kindle doesn’t dream of doing, and as a result is very attractive.

Could the Kindle and iPad compete one day? Perhaps. If the Kindle had a multi-touch screen and more powerful processor, if the iPad weighed much less and had a longer battery life, if, if. Many of these ifs ignore the basic orientation differences between these devices. The multi-touch screen and more powerful processor would increase the cost of the Kindle, moving it into a different category than it currently holds. The color screen of the iPad consumes enough battery that the additional battery capacity makes it weigh more. I’m not saying that Apple or Amazon won’t release devices designed to directly compete with each other, but I am saying that each of these devices is well designed for its own niche right now, and the tradeoffs and compromises involved in direct competition would not necessarily be in the interests of either device. 

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

December 22, 2009

A Law of the Medes and Persians

Filed under: Uncategorized

It continues to amaze me how bold-faced the congressional despots are becoming. We have a congressman from Florida agitating for jail time for those who oppose him, and now this. It is incredible that men and women who owe their very jobs to the laws of this nation are so intent on undermining the rule of law.

Confederate Yankee

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

December 19, 2009

The Dangers of the Current Policies

Filed under: Uncategorized

One of the biggest dangers brought by the Obama/Reid/Pelosi policies in Washington is that the disregard for the will of the people and for the law breeds lawlessness. When people lose hope that they can affect policy by expressing their opinions to their elected representatives – when it becomes clear that there is one law for them, and a different law for those who make the laws – then there are few options besides rebellion. The more the Democrats push for the consolidation of power and the outlawing of opposing viewpoints, the more desperate those who oppose them will become.

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

December 16, 2009

Why America Hates Universal Health Care: The Real Reason · zomblog

Filed under: Uncategorized

Okay, this probably doesn’t qualify as writing, since I’m just linking Zombie’s article, here. That said, I find it interesting that people as different as Zombie and I can agree so closely on reasons why Universal Health Care is bad. She expresses herself differently than I do, because she has a different worldview and values structure, but the reasoning is sound nonetheless. 

Why America Hates Universal Health Care: The Real Reason · zomblog

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

December 14, 2009

Mary had a little lamb

Filed under: Uncategorized

Why is it that it becomes progressively difficult to write when one has made up one’s mind to write? During the NaNoWriMo, which I failed, they encouraged the use of mindlessly writing Mary Had a Little Lamb until inspiration returned. Here goes:

Mary had a little lamb

Its fleece was sooty black

And everywhere that Mary went

It led her from in back. 

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

December 13, 2009

Third Sunday in Advent

Filed under: Uncategorized

Well, here we are on the third Sunday in Advent. Time is just zipping by. The gifts have been bought, the presentation thereof is to come.

digg it! Post to Del.icio.us furl it! stumble it! reddit save to technorati Save to Yahoo MyWeb Share on Facebook

Get free blog up and running in minutes with Blogsome
Theme designed by Gary Rogers