# Nub question: \<db/create.sql?

**URL:** <https://www.ruby-forum.com/t/nub-question-db-create-sql/115640>\
**Category:** Rails\
**Created:** [September 27, 2007, 5:00am UTC](https://www.ruby-forum.com/t/nub-question-db-create-sql/115640 "2007-09-27T05:00:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![isea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dfb087/32.png) [@isea](https://www.ruby-forum.com/u/isea)\
**Post date:** [September 27, 2007, 5:00am UTC](https://www.ruby-forum.com/t/nub-question-db-create-sql/115640/1 "2007-09-27T05:00:20Z")

</div>

Hello all:

I am trying to get started with ROR coming from a classic ASP  
background.

I am going step by step through “Agile Web D. with Rails” isbn  
0-9766940-0-x. On page 55 I am trying backup my DDL with the fallowing  
code:

depot\> mysql depot\_development \<db/create.sql

ERROR 1045 \<28000\>: Access denied for user ‘ODBC’@‘localhost’ (using  
password: NO)

What am I doing wrong. Let me know if you need more info.

Thanks for your help

---

<div class="post-metadata">

**Author:** ![isea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dfb087/32.png) [@isea](https://www.ruby-forum.com/u/isea)\
**Post date:** [September 27, 2007, 5:28am UTC](https://www.ruby-forum.com/t/nub-question-db-create-sql/115640/2 "2007-09-27T05:28:53Z")

</div>

Ian Seabock wrote:

> depot\> mysql depot\_development \<db/create.sql
> 
> ERROR 1045 \<28000\>: Access denied for user ‘ODBC’@‘localhost’ (using  
> password: NO)
> 
> What am I doing wrong. Let me know if you need more info  
> You proably need to pass the correct username and password for your  
> install of MySQL and chosen database. Check the doco on the mysql  
> command to findout how to pass them in.

Cheers,

Anthony R.

---

<div class="post-metadata">

**Author:** ![isea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dfb087/32.png) [@isea](https://www.ruby-forum.com/u/isea)\
**Post date:** [September 27, 2007, 5:41am UTC](https://www.ruby-forum.com/t/nub-question-db-create-sql/115640/3 "2007-09-27T05:41:44Z")

</div>

On Sep 26, 2007, at 8:00 PM, Ian Seabock wrote:

> ERROR 1045 \<28000\>: Access denied for user ‘ODBC’@‘localhost’ (using  
> password: NO)

This is a MySQL problem. See MySQL’s documentation on what’s going  
wrong…

[http://dev.mysql.com/doc/refman/5.0/en/access-denied.html](http://dev.mysql.com/doc/refman/5.0/en/access-denied.html)

Just from what you’ve provided, I would guess that your installation  
of MySQL hasn’t been completed. There are steps for securing the  
initial MySQL account…

[http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html](http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html)

…and steps for creating users to access the databases…

[http://dev.mysql.com/doc/refman/5.0/en/adding-users.html](http://dev.mysql.com/doc/refman/5.0/en/adding-users.html)

Once I secure the initial account from the command line, I prefer to  
use PhpMyAdmin to do the rest, like creating databases and assigning  
privileges…

> **[phpMyAdmin](https://www.phpmyadmin.net/)**

You need to create the database and set its privileges before you can  
run the migrations on it.

Jose

…  
Jose Hales-Garcia  
UCLA Department of Statistics  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![isea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dfb087/32.png) [@isea](https://www.ruby-forum.com/u/isea)\
**Post date:** [September 27, 2007, 6:05am UTC](https://www.ruby-forum.com/t/nub-question-db-create-sql/115640/4 "2007-09-27T06:05:07Z")

</div>

You can download the free mysql-administrator gui tool from mysql’s site  
and it greatly simplifies adding users and delegating permissions.

---

<div class="post-metadata">

**Author:** ![isea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dfb087/32.png) [@isea](https://www.ruby-forum.com/u/isea)\
**Post date:** [April 8, 2008, 2:15am UTC](https://www.ruby-forum.com/t/nub-question-db-create-sql/115640/5 "2008-04-08T02:15:13Z")

</div>

I just used phpmyadmin to manually add a new called ODBC at host  
localhost, with all privileges, and no password. Then the “mysql grant  
all…” command worked.

On Sep 26 2007, 11:00 pm, Ian Seabock \<rails-mailing-l…@andreas-
