Monday, July 4, 2011

Backing up a MySQL Database

As I detailed in a previous post, I installed LAMP on my Ubuntu machine (which included MySQL Database version 5.1.49-1ubuntu8.1) for the purpose of hosting a Drupal site.  I installed Drupal 6 for the purpose of playing around with Drupal and writing a blog about my experience.  It occurred to me that I should probably write about my experience with the latest version of Drupal, so I decided to upgrade to Drupal 7.  Before upgrading, I need to back up my site, and that requires backing up the MySQL database.

I had previous installed PHPMyAdmin, so I began investigating a way to back up my database using that tool.  I found an article on Drupal's website that detailed how to backup a MySQL database with PHPMyAdmin.  I followed this article and wrote about my experience below.

To start, I logged on to PHPMyAdmin as root.  I then clicked on the Export tab.
I clicked the Select All link to select all schemas and selected the SQL radio button. 

Under the Options group and under the Structure sub-group, I checked the following:
  • Structure check box
  • check box
  • check box
  • check box
The check box was checked by default, so I left it checked.

Under the Options group and under the Data sub-group, I checked the following:
  • Data check box
  • Complete Inserts check box
  • Use hexadecimal for BLOB check box
  • selected the INSERT option in the Export type select box.
I left everything else at their default settings.

Finally, I clicked the Go button on the bottom-right corner of the screen.  This brought up a screen where I could choose the location of the file.  I selected a location and the file began to download.  

The resulting file contained all necessary statements for creating re-creating my database. 

I have not tried importing this file yet.  That remains for another article.

Thanks for reading.

Saturday, May 28, 2011

Flash Development on Ubuntu

During my college years I participated in a class where I learned about Flash development.  I had an iBook at the time, and I forked over $99 for FlashMX for Mac OSX.  I learned quite a bit, and I enjoyed working with Flash.  Eventually my iBook stopped working and therefore did not have any way to work with Flash without going to a lab.  Eventually I graduated and the computer lab option disappeared.  So I did some research on working with Flash on Ubuntu.

I found this article on using an Eclipse add-on called FDT to work with Flash.  First and foremost I had to install Eclipse.  I did this through the Ubuntu Software Center.  The article recommended installing version 3.4.2 and listed a link to download that version of Eclipse.  Ubuntu 10.10 Software Center installed Eclipse version 3.5.2, and I have not experienced the error message the author of the article wrote about.

After installing Eclipse, I clicked on the Help menu and choose Install New Software to install FDT.  The next screen prompted me to enter a site.  The article suggested using the site, so I clicked the Add button on the right, entered the site, gave the site a name, and clicked Ok.  The box below listed two versions of FDT:  3.5 and 4.4.  I already had FDT 3.5 installed so I choose to install FDT 4.4 anyways.

After the installation finished I restarted Eclipse.  After Eclipse reloaded, FDT asked for my license key.   I did not have a license key because I did not purchase the software.  I clicked on a link that took me to a page where I can register for a 30 day trial.  Dead end.  I wouldn't have a problem paying for the full version, but buying software does not fit the theme of this blog.  I uninstalled FDT, and that is where this story ends.

I am looking forward to working with Eclipse.  At first glance, Java seems to be the only language someone can work with.  I will be adding more details after I work with Eclipse.

Sunday, May 22, 2011

Installing LAMP and Drupal on Ubuntu 10.10

I recently wanted to start a personal Drupal site that I can use for information about video games that I play.  I would be the only person administrating the site, and in all probability, I would be the only person viewing the site.  I am also interested in Drupal because we use it at work and I think it would be a good idea to know more about it.

I installed LAMP first.  LAMP is an open source web development platform and consists of Apache, MySQL Database, and PHP.  The L stands for "Linux", and something similar exists for Windows called WAMP.  I found this site that explains how to install LAMP on Ubuntu 10.10 and 11.04.  Most of the information for this post comes from this site.  See the link below:

First, I installed a software installation package called taskselTasksel groups software by tasks, and it allows you to install packages for a specific task with one command.  So to install tasksel, I used the following command:

sudo apt-get install tasksel

Begin the installation of LAMP by running the tasksel program we just installed:

sudo tasksel

I moved the cursor down to "LAMP server" using the arrow keys, selected "LAMP server" using the space bar, and then hit tab to "Ok" and pressed enter.

The installation asked me to enter a root password for the MySQL database.  Other than that the installation of LAMP did not require any interaction on my part.

After installing LAMP your Ubuntu box will be a functioning web server.  You can verify that the installation configured PHP correctly by creating an info.php file:
  • sudo vi /var/www/info.php 
and adding this brief php program to display the results of phpinfo()
  • <?php
  • phpinfo();
  • ?>
Save and exit vi and restart apache2:

  • sudo /etc/init.d/apache2 restart
At this point you should be able to navigate to the page http://localhost/info.php and see PHP info.  You can see screen shots of this page at the link I mentioned above.


Next, the page mentions installing something called phpmyadminPhpmyadmin allows you to manage your MySQL Database through a web browser.  I love this idea!  So I installed phpmyadmin with the following command:
  • sudo apt-get install phpmyadmin
After installing you should be able to go to http://localhost/phpmyadmin and login using root as the username and the password you specified during the installation of LAMP.  After logging in, you can administrate the local MySQL database.  You will have to create a database here when installing Drupal.

Now we can install Drupal!

I followed this guide for the most part and I did not encounter too many problems.  I wrote a brief synopsis of my experience below.

I mentioned that a database had to be created for Drupal.  If you haven't already, log on as root to http://localhost/phpmyadmin.  The place where you create a database should be on the initial screen you see after logging in.  Type the name of the database and click "Create".  You can leave both of the options at their default settings.  Remember the name of this database because you will have to use it when configuring Drupal.

Next you will need to download the files for Drupal.  These files can be found here.  After downloading the correct version (I choose 6.9 so the file name was drupal-6.9.tar.gz) move the file to the document root of the web server( in my case this was /var/www).  Unpack the file using the following command:
  • tar xvzf drupal-6.9.tar.gz
This will create a directory called /var/www/drupal-6.9.  Consider this the Drupal root.  I changed the name to "site" for simplicity sake. 

Navigate to the site http://localhost/site/ to begin the Drupal installation process.  I didn't have a problem with the installation.  I had to change the permissions on a directory and copy a file.  You will have to enter the name of the database you created in the first step.  After completing installation you should be able to navigate to http://localhost/site/ and log in as administrator for further configuration.

Any site that I mention in this post with localhost in it may be different in your case.  In my case I was loading the page from the server itself.  I can also view these pages on a different computer by using the host name or ip address of the web server instead of localhost.

I completed this process in about two hours.  I have been playing around with it but I have not had much luck yet.  I'll post with more info at a later point.

Until next time...

Saturday, March 26, 2011


I read some good things about UCC (Ubuntu Control Center) earlier today and decided to check it out. The author of this page wrote some instructions for installing UCC.  I followed these instructions perfectly but when I ran the command to install UCC I encountered an issue.  I received errors about packages not being installed (see below).

sudo dpkg -i ucc_051_i386.deb

(Reading database ... 127247 files and directories currently installed.)
Preparing to replace ucc 0.5.1 (using ucc_051_i386.deb) ...
Unpacking replacement ucc ...
dpkg: dependency problems prevent configuration of ucc:
 ucc depends on bum; however:
  Package bum is not installed.
 ucc depends on gufw; however:
  Package gufw is not installed.
 ucc depends on simple-ccsm; however:
  Package simple-ccsm is not installed.
 ucc depends on startupmanager; however:
  Package startupmanager is not installed.
 ucc depends on gparted; however:
  Package gparted is not installed.
 ucc depends on deja-dup; however:
  Package deja-dup is not installed.
 ucc depends on libglew1.5; however:
  Package libglew1.5 is not installed.
 ucc depends on libnotify-bin; however:
  Package libnotify-bin is not installed.
dpkg: error processing ucc (--install):
 dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for python-support ...
Errors were encountered while processing:

Shortly after this happened Update Manager asked me to install some updates.  I said yes and I received a "Update Manager is broken" error.  The error suggested I run the following command:

sudo apt-get install -f

The command fixed the broken packages.  I completed the installation procedure for UCC successfully.  I did not dig into this tool too much but from what I can see it can be useful.  I like how the majority of the settings in Ubuntu can be changed from one place.

More information about apt-get can be found in it's man pages.

man apt-get

So far so good

I have been using Ubuntu 10.10 for about a week now.  I have not had any problems what-so-ever.  I have not tried to import my music or anything from my previous hard drive yet.  I thought I had an extra hard drive connection in my tower, but I did not see one a couple of days ago when I tried to connect it. 

I mainly use my Ubuntu box remotely from a laptop.  Everything looks choppy although I believe that is due to VNC.  I would like to be able to switch users while connected VNC.  I believe that Ubuntu prevents this for security reasons.  I'm thinking that this can be changed.  More details to follow.

I'm thinking I will connect my hard drive through USB and start downloading my music.  I might even get crazy and write a script to move all of my mp3 files to a folder on my new hard drive and format the other.  I can use it as a backup.  I also would like to get another hard drive cable (a SATA cable I believe). 

Until next time...

Monday, March 21, 2011

Twitter Client

This is related to a previous issue I had with Twitter clients.  I un-installed gwibber and installed Hotot to resolve an issue I had with gwibber.  However, my hunger for a better Twitter client remained.  I could only start Hotot from the command line and the command line continued to stay up while the client ran.

I found a much better way of installing Hotot here.

I think I may be due for a new computer at work...definitely in the next year.  I wonder if can pay less on a machine without an OS...

Sunday, March 20, 2011

Twitter Client Issues

In this post, I will write about two twitter clients I used with Ubuntu 10.10.  I noticed Gwibber when I first started using Ubuntu.  I set up my twitter account and tweeted a few times.  I noticed that every three to five minutes a box would appear listing the status of my accounts.  This began to disturb me after a while so I googled it.  I read a page that listed this as a bug and recommended uninstalling Gwibber.

So I un-installed using tips I found on this page. I then did some research and settled on Hotot as my new client of choice.  I followed instructions from this page and I tweeted a few times.  I like everything about Hotot except for the way you call it.  This page uses a command to start Hotot, but I would like to start it from a shortcut on my desktop, or automatically on start up.  I'm sure this can be done, but it will take more research on my part.  It's March Madness for gosh shakes!

Until next time...