# Unable to connect to mySql localhost

**URL:** <https://www.ruby-forum.com/t/unable-to-connect-to-mysql-localhost/60795>\
**Category:** Rails\
**Created:** [May 17, 2006, 3:48pm UTC](https://www.ruby-forum.com/t/unable-to-connect-to-mysql-localhost/60795 "2006-05-17T15:48:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ling](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c2a13f/32.png) [@Ling](https://www.ruby-forum.com/u/Ling)\
**Post date:** [May 17, 2006, 3:48pm UTC](https://www.ruby-forum.com/t/unable-to-connect-to-mysql-localhost/60795/1 "2006-05-17T15:48:48Z")

</div>

Unable to connect to mySql localhost

I installed MySQL 5.0 community version, without opening an account and  
leaving the password empty with the Path included in the environment  
variable.

In the post-installation testing, I typed C:\mysqlshow, the error  
message is  
Mysqlshow: Access denied for user â??ODBCâ??@â??localhostâ??

Next, in RadRails 0.6.3, when I double-clicked on the Development  
database trying to browse the database, the error message is â??Unable to  
connect to database, see log for more infoâ?

What did I do wrong?

The other info are as follows:

OS: Windows XP Pro  
Database Server: MySQL 5.0  
Ruby: 184\_17  
Rails: 1.1.2 (Generated from Gem)  
RadRails: 0.6.3  
SQL-Front

Would appreciate it if someone could help out.

---

<div class="post-metadata">

**Author:** ![Ling](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c2a13f/32.png) [@Ling](https://www.ruby-forum.com/u/Ling)\
**Post date:** [May 17, 2006, 5:18pm UTC](https://www.ruby-forum.com/t/unable-to-connect-to-mysql-localhost/60795/2 "2006-05-17T17:18:38Z")

</div>

Your database.yml is not configured properly. If you have a user  
called root with no password, use that information in the  
database.yml.

~ Ben

On 5/17/06, Ling [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Ruby: 184\_17
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Ben R.  
303-947-0446  
[http://www.benr75.com](http://www.benr75.com)

---

<div class="post-metadata">

**Author:** ![Ling](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c2a13f/32.png) [@Ling](https://www.ruby-forum.com/u/Ling)\
**Post date:** [May 17, 2006, 6:09pm UTC](https://www.ruby-forum.com/t/unable-to-connect-to-mysql-localhost/60795/3 "2006-05-17T18:09:04Z")

</div>

That is what is inside the database.yml.

development:  
adapter: mysql  
database: cookbook2  
username: root  
password:  
host: localhost

What else could have been wrong?

Ling.

Ben R. wrote:

> Your database.yml is not configured properly. If you have a user  
> called root with no password, use that information in the  
> database.yml.
> 
> ~ Ben
> 
> On 5/17/06, Ling [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Ruby: 184\_17
> > 
> > * * *
> > 
> > Rails mailing list  
> > removed\_email\_address@domain.invalid  
> > [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
> 
> –  
> Ben R.  
> 303-947-0446  
> [http://www.benr75.com](http://www.benr75.com)

---

<div class="post-metadata">

**Author:** ![Ling](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c2a13f/32.png) [@Ling](https://www.ruby-forum.com/u/Ling)\
**Post date:** [May 18, 2006, 2:12am UTC](https://www.ruby-forum.com/t/unable-to-connect-to-mysql-localhost/60795/4 "2006-05-18T02:12:42Z")

</div>

What error message are you getting?  
Cheers

---

<div class="post-metadata">

**Author:** ![Ling](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c2a13f/32.png) [@Ling](https://www.ruby-forum.com/u/Ling)\
**Post date:** [May 18, 2006, 9:46am UTC](https://www.ruby-forum.com/t/unable-to-connect-to-mysql-localhost/60795/5 "2006-05-18T09:46:28Z")

</div>

Pat L. wrote:

> What error message are you getting?  
> Cheers

In the post-installation testing, I typed C:\>mysqlshow  
The error message is

Mysqlshow: Access denied for user â??ODBCâ??@â??localhostâ??

Next, in RadRails 0.6.3, when I double-clicked on the Development  
database trying to browse the database, the error message is

â??Unable to connect to database, see log for more infoâ?

Besides, the “tree” in the Data Navigator of the RadRails didn’t appear  
at all.

Regards

Ling
