title: Rails server not starting on Port 3000 "TCPServer Error: Permission denied - bind (2)"
body: <p>I installed Ruby on Rails, MySQL Server 5.6, and the mysql2 gem on my Windows 7 computer.  MySQL Server 5.6 runs on port 3000.  My database.yml file is:</p>
  
  <pre><code># MySQL2
  #   gem install mysql2
  #   Ensure the mysql2 gem is defined in your Gemfile
  #   gem 'mysql2'
  development:
    adapter: mysql2
    encoding: utf8
    reconnect: false
    database: demo1_development
    pool: 5
    username: root
    password: root
    host: 127.0.0.1
    port: 3000
  
  # Warning: The database defined as "test" will be erased and
  # re-generated from your development database when you run "rake".
  # Do not set this db to the same as development or production.
  test:
    adapter: mysql2
    encoding: utf8
    reconnect: false
    database: demo1_test
    pool: 5
    username: root
    password: root
    host: 127.0.0.1
    port: 3000
  
  production:
    adapter: mysql2
    encoding: utf8
    reconnect: false
    database: demo1
    pool: 5
    username: root
    password: root
    host: 127.0.0.1
    port: 3000
  </code></pre>
  
  <p>I ran "bundle install" with the following Gemfile:</p>
  
  <pre><code>source 'http://rubygems.org'
  
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
  gem 'rails', '4.0.2'
  
  # Use mysql2 as the database for Active Record
  gem 'mysql2'
  
  # Use SCSS for stylesheets
  gem 'sass-rails', '~&gt; 4.0.0'
  
  # Use Uglifier as compressor for JavaScript assets
  gem 'uglifier', '&gt;= 1.3.0'
  
  # Use CoffeeScript for .js.coffee assets and views
  gem 'coffee-rails', '~&gt; 4.0.0'
  
  gem 'devise'
  
  gem 'protected_attributes'
  
  gem 'terminator'
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', platforms: :ruby
  
  # Use jquery as the JavaScript library
  gem 'jquery-rails'
  
  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
  gem 'jbuilder', '~&gt; 1.2'
  
  group :doc do
    # bundle exec rake doc:rails generates the API under doc/api.
    gem 'sdoc', require: false
  end
  
  # Use ActiveModel has_secure_password
  # gem 'bcrypt-ruby', '~&gt; 3.1.2'
  
  # Use unicorn as the app server
  # gem 'unicorn'
  
  # Use Capistrano for deployment
  # gem 'capistrano', group: :development
  
  # Use debugger
  # gem 'debugger', group: [:development, :test]
  </code></pre>
  
  <p>I could run the "bundle install", "rake db:create" and "rake db:migrate" commands without any problems.  I started the MySQL server and typed "rails s" in the command line.  The result was the following:
  WARN  TCPServer Error:  Permission denied - bind (2)
  Exiting</p>
  
  <p>I made sure to open port 3000 in Windows Firewall, and allow rails to communicate through the firewall.</p>
  
  <p>Typing "rails s -p 80" works, and the web application works on localhost:80, but the fields won't work because MySQL Server will not run on port 80.</p>
  
  <p>Am I missing something?  How can I get the Rails server and web app to work?</p>