Skip to content →

Tag: database

Hard Work That Goes Unnoticed

First off, I want to apologize for not blogging more recently. A combination of a major work-related presentations and a desire to carve out time to work on other, soon-to-be-announced projects made blogging time pretty difficult to find.

Secondly, I want to wish all my friends and readers a very wonderful holiday season and the best wishes for a very happy new year!

Lastly, I wanted to make a note that I just changed hosts, moving everything over from my previous host Bluehost to my new host WebFaction (which gives me much greater flexibility and control over my servers). Sadly, despite working many hours on the transfer, moving servers is one of those things where, provided you did everything right, nobody should notice anything different – the ultimate thankless task. So I’m writing this in part so you now know :-).

In the spirit of the post I made some three years ago when I first moved my blog from Blogger to its own domain, I thought I’d share my experiences with the transfer in the event that this is helpful to someone else who is thinking about moving their existing WordPress setup to a Webfaction server (much of this is adapted from the WebFaction doc: http://docs.webfaction.com/user-guide/inbound.html#inbound-moving-a-wordpress-site).

    1. Point your domain registrar to WebFaction’s name servers. If your domains were registered with Bluehost, this is something I believe you can access from BlueHost’s Domain Manager tab. I had previously transferred all my domains to a registrar called NameCheap where the access point for this is under “Manage Domains” (which you can see when you mouseover the “Domains” button in the toolbar). After selecting the domain, you wish to modify, click on “Domain Name Server Setup” and after selecting the “Specify Custom DNS Servers” radio button, you can enter WebFaction’s name servers in the text boxes.
    2. Use WebFaction’s control panel to register the domain. Click on “Domains/Websites” on the left-hand side and then click the “Add Domains” button on the top of the resulting page.
    3. Use WebFaction’s control panel to build a new “Static/CGI/PHP Application”. Go to “Applications” under the “Domains/Websites” header on the left-hand-side and click on the “Add new application” button. Enter a name and make sure to select “Static” in the first dropdown menu.
    4. Use WebFactions’ control panel to build a new “website” which maps the application you just created with the domain you just registered. Go to “Websites” under the “Domains/Websites” header on the left-hand-side and click on the “Add new website” button. Enter a name, type out the domain you wish to use in the text field labeled “Domains”, and when you hit “Add a web app”, click on “Reuse an existing web app” and select the application you just created.
    5. Export the database from BlueHost. The easiest way to do this is to go into BlueHost and use the PHPMyAdmin tool to log into the administrative interface for the database which corresponds to your WordPress installation and use the export functionality to get a SQL “dump file”. Download that file and then upload it to your WebFaction server/use FTP to pull it off of your BlueHost server.
    6. Create a New MySQL Database in WebFaction. Click on “Databases” on the left-hand-side of the WebFaction control panel and click on “Create New Database.” Enter a name, hit the “Create” button, and take note of the password that was autogenerated and the user name (the name of the database before the mandatory “_” character).
    7. Import the database dump file into the database you created in Step 6. Use an SSH tool to get shell command access to your WebFaction server. From the resulting command line, run the command “mysql -u db_name -p -D db_name < dump_file” where the italicized db_name should be replaced by the name of the database you just created and the italicized dump_file should be the name of the dump file that you’ve uploaded/transferred to your WebFaction server. The command will ask you for the password to your database (which you of course wrote down from the previous step, but, if not, can easily rectify by clicking on the “Change database password” link under the “Databases” heading on the left-hand side of the WebFaction control panel) and will complete the import.
    8. Copy the BlueHost directory containing your WordPress install into the WebFaction directory corresponding to the application you created in Step 3. You can do this by manually downloading the files from BlueHost to your computer and then re-uploading (long, slow, annoying) or you can use wget or FTP to mediate the transfer directly between WebFaction and BlueHost (my recommended choice). Make sure you copy the .htaccess file or your URLs will break and you will need to recreate one from the WordPress admin panel after you’ve completed the transfer
    9. Edit the wp-config.php file in the root directory to properly tell WordPress:
        • What the database name is: edit the line that looks like “define(‘DB_NAME’, ‘<database_name>’);” and replace “<database_name>” with the name of the database you created in step 6 (keeping the single quotes)
        • What the right user name is: edit the line that looks like “define(‘DB_USER’, ‘<user>’);” and replace “<user>” with the name of the user in step 6(keeping the single quotes)
        • What the database password is: edit the line that looks like “define(‘DB_PASSWORD’, ‘<password>’);” and replace “<password>” with the password from step 6 (keeping the single quotes)
        • Where the database is: edit the line that looks like “define(‘DB_HOST’, ‘<host>’);” and replace “<host>” with “localhost” (keeping the single quotes)
    10. Test the sucker! Note: you may need to wait up to 48 hours for the domain name shenanigans to be properly reflected by DNS servers
2 Comments

Something for Nothing

Where I work, I have instant electronic access to numerous databases. While I no longer have access to Scifinder Scholar (for Chemistry papers and structures and patents) or PubMed (which indexes every biological/medical paper published), my research workhorses are now Factiva (for news and magazine articles), Euromonitor (for economic and market data), and OneSource (for general company information).

Access to these databases cost money. Lots of it. I remember balking the first time I saw the purchase price for a Thomson research report ($10,000 for some analyst’s research on an energy company) that wasn’t covered by the firm’s subscriptions.

And these databases are, if used properly, well worth the cost to the institution in question. But sometimes, you don’t need fancy-shmancy million dollar databases. I’m currently doing research which involves finding historical operating margins and I’ve found the following resources to be very useful and also very cheap (as in free) and just thought I’d introduce three of my best friends from this past week:

  • Google Finance – This is a pretty awesome tool. It’s flashy and aggregates an enormous amount of useful information. You get corporate information, stock price data (back to 1980), a quick summary of the stock performance of related companies, links to recent news articles, and a quick aggregation of top-level income statement, balance sheet, and cash flow statement numbers.
  • Reuters – I used to think this site was purely for news (I’m a huge fan of Reuter’s Oddly Enough which I guess isn’t exactly news), but it’s a treasure trove of financial information. Most useful of all are its industry profiles whereby it describes multiple industries, what makes them tick, and industry statistics that enable you to compare how a company is doing relative to its industry. It also lists some information for companies that are not publicly traded
  • SEC EDGAR – Any company report that has ever been filed with the SEC within the last 13 years can be found here using EDGAR, the SEC’s report search engine. This was particularly helpful when I was looking up financials for telecom companies that no longer exist because they either went out of business, changed their name, went private, or were bought out by someone else.

So useful are these sites that I’ve actually created Firefox keyword searches for them (except for Reuters where I still can’t get the keyword search to work). Now I can look up Dell’s financials with a simple “fin Dell” (to search on Google Finance) or “sec Dell” (to use EDGAR).

Leave a Comment