Linux


22
Feb 10

HOWTO reset a MySQL root password

If your a terrible DBA like me here are the six steps to reset a forgotten MySQL root user password:

1. stop mysql

# /etc/init.d/mysql stop

The output should look like this:

* Stopping MySQL database server mysqld

   …done.

2. restart mysql without a password

# mysqld_safe –skip-grant-tables &

The output should look like this:

[1] 28808

100222 18:32:27 mysqld_safe Logging to syslog.

100222 18:32:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

3. connect to mysql using the mysql client

# mysql -u root

The output should look like this:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.1.37-1ubuntu5.1 (Ubuntu)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

4. set a new mysql root user password

mysql> use mysql;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

mysql> update user set password=PASSWORD(“NEWROOTPASSWORDHERE“) where User=’root’;

Query OK, 0 rows affected (0.02 sec)

Rows matched: 3 Changed: 0 Warnings: 0

mysql> flush privileges;

Query OK, 0 rows affected (0.09 sec)

mysql> quit

Bye

5. stop mysql

# /etc/init.d/mysql stop

The output should look like this:

* Stopping MySQL database server mysqld

100222 18:35:29 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

   …done.

[1]+ Done mysqld_safe –skip-grant-tables

6. restart mysql

# /etc/init.d/mysql start

Who needs to remember passwords? :)


16
Jun 09

Happy Birthday Linode

Congrats to Chris & the Linode team!

I also forgot to say thanks back in April for all the additional disk :)


28
Dec 07

thanks again Linode

I just noticed that Linode bumped up the RAM in my VPS by another 20%.

Thanks Linode! :)


19
Apr 07

Feisty

Ubuntu Linux 7.04 (Feisty Fawn) has been released today. Fellow Oregonians can fetch a copy from the PSU mirror site.


3
Feb 07

thank you again Linode

It seems like just yesterday I was thanking Linode, my VPS host, for the free bump in disk space. I just noticed they also provided a 28% increase in RAM for free as well. My first year of hosting with them has been an absolute pleasure.

Thank you Chris! :)


4
Jan 07

thank you Linode!

I just noticed that Linode (my VPS host) was kind enough to give me 33% more disk space for free. I’ve been with them just shy of a year and extremely happy. I would recommend them to anyone looking for a VPS host.
Thank you Chris!


15
Mar 06

Linode

A few weeks ago I moved spendy.org and the other domains I host over to a Linode virtual dedicated server. Linode uses user-mode Linux so I am free to run my choice of distribution with guaranteed bandwidth, CPU, and memory. Since I can’t really justify the expense of collocating a server for the few odds and ends I have on the Internet, a VDS is the next best thing. The initial account setup was painless and $20/month is a bargain compared to most shared hosting accounts.

Storage space is at a premium; however, I find most of my stuff fits nicely in 4GB. A bit of reverse proxy magic with Apache allows me to serve up my photos from my home server. This provides a more elegant solution to Verizon’s lame port 80 blocking on their FiOS network.

So far I’m a very happy customer :)


28
Dec 05

HOWTO: WPA2 under Ubuntu 5.10 with a WPC54G v3 (Broadcom)

Over the holiday weekend I took my old Sony VAIO notebook and loaded Ubuntu Linux on it. As a desktop / end-user distro I’m very impressed with Ubuntu – it is easy to use and configure. Unfortunately, I had some trouble getting my wireless card to work with WPA2 authentication to my wireless network at home. From looking at the Ubuntu forums it seems like this is a common problem. There are some helpful guides; however, none I found covered how to use WPA2 Pre-Shared Key authentication specifically. Fortunately by reading the man pages and some trial and error I was able to get it working.

Here are the steps:

  • download the appropriate driver for your card -> Linksys WPC54G v3
  • from the download extract the driver file (bcmwl5.sys) and inf file (LSBCMNDS.inf)
  • fire up the Synaptic Package Manager and install wpasupplicant & ndis-wrapper
  • open a shell and change directory to the location the driver and inf file were extracted to
  • install the driver: sudo ndis-wrapper -i ./LSBCMNDS.inf
  • check that the driver was installed correctly: ndiswrapper -l if it was installed correctly it should output “driver present, hardware present”
  • write the module configuration file: sudo ndiswrapper -m
  • load the module: sudo modprobe ndiswrapper
  • add ndiswrapper to /etc/modules so the kernel module is loaded at boot time

Now on to the fun of configuring wpa_supplicant to handle the WPA2 authentication for the interface.

  • open the /etc/wpa_supplicant.conf file in an editor
  • edit the network stanza as shown below substituting myssid and mypsk with the appropriate values for your network

network={
ssid=”myssid
proto=WPA2
key_mgmt=WPA-PSK
psk=”mypsk
}

  • open /etc/default/wpasupplicant in an editor
  • change ENABLED to 1
  • change the OPTIONS argument to have values appropriate for your adapter. For my WPC54G v3 I used the following:

OPTIONS=”-i wlan0 -D ndiswrapper -c /etc/wpa_supplicant.conf”

  • open the /etc/network/interfaces file in an editor
  • add entries for the wlan0 interface – on my notebook I desire the wireless card (wlan0) to be the primary interface. My configuration follows below:

# The primary network interface
auto wlan0
iface wlan0 inet dhcp
pre-up /etc/init.d/wpasupplicant start
pre-up sleep 5

  • and we are done

This leaves you with a wlan0 interface that will start automatically, is configured via DHCP, and prior to bringing the interface up the system will start wpa_supplicant to handle the WPA2 authentication so the card can associate with your WLAN.

I found the following to be helpful resources in getting it working:

Hopefully this is helpful to anyone else who is struggling to get it working.


29
May 03

The SCO lawsuit

Recently the mainstream press has been covering the recent legal action the SCO Group has brought against IBM regarding the alleged transfer of licensed Unix intellectual property into GNU/Linux. Given the complex historical ownership of the genetic Unix code, the prior legal settlement over the AT&T / BSD lawsuit and the subsequent recognition genetic Unix incorporated a good deal of BSD code, and the seemingly bizarre actions of SCO since the start of the case this has the making of both a very lengthy and complex legal battle.

Fortunately for the average Joe someone has taken the time to summarize the recent events in the context of the Dukes of Hazzard in an effort to make them easier to understand. I think this is extremely funny – perhaps Court TV has a new show concept.

dukes_of_hazzard.gif

You can find it here.

Enjoy!


2
Jan 03

Phoenix 0.5 & Gentoo

After wrestling a bit with GTK+, I was able to get Phoenix installed on my Gentoo box. The problem ended up being portage hiding the GTK+ 1.2 ebuild since I already had GTK+ 2.x installed. After some digging on the Gentoo forums I found you can in fact have both GTK+ 1.2 and GTK+ 2.x installed, you just need to implicitly call the GTK+ 1.2 ebuild in order to get it to install.

Now I just need to figure out how to get some AA fonts working so Phoenix doesn’t look like ass when it is running.