# Mysql port info

**URL:** <https://www.ruby-forum.com/t/mysql-port-info/195358>\
**Category:** Rails\
**Created:** [September 22, 2010, 7:05am UTC](https://www.ruby-forum.com/t/mysql-port-info/195358 "2010-09-22T07:05:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![awijeet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@awijeet](https://www.ruby-forum.com/u/awijeet)\
**Post date:** [September 22, 2010, 7:05am UTC](https://www.ruby-forum.com/t/mysql-port-info/195358/1 "2010-09-22T07:05:42Z")

</div>

I want to create an API for my web application so i need access on  
mysql.  
for that I need following info…

database host-name and that I am unable to get…

Thanks

---

<div class="post-metadata">

**Author:** ![awijeet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@awijeet](https://www.ruby-forum.com/u/awijeet)\
**Post date:** [September 22, 2010, 7:18am UTC](https://www.ruby-forum.com/t/mysql-port-info/195358/2 "2010-09-22T07:18:15Z")

</div>

Awijeet Mr. wrote:

> I want to create an API for my web application so i need access on  
> mysql.  
> for that I need following info…
> 
> database host-name and that I am unable to get…
> 
> Thanks

you can simply use localhost as your host-name. And if you have  
login-details to ur mysql server means, create a DB and use it.

–  
Regards,

T.Veerasundaravel.  
[http://tinyurl.com/25vma7h](http://tinyurl.com/25vma7h)  
@veerasundaravel

---

<div class="post-metadata">

**Author:** ![awijeet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@awijeet](https://www.ruby-forum.com/u/awijeet)\
**Post date:** [September 22, 2010, 11:15am UTC](https://www.ruby-forum.com/t/mysql-port-info/195358/3 "2010-09-22T11:15:10Z")

</div>

Veera S. wrote:

> Awijeet Mr. wrote:
> 
> > I want to create an API for my web application so i need access on  
> > mysql.  
> > for that I need following info…
> > 
> > database host-name and that I am unable to get…
> > 
> > Thanks
> 
> you can simply use localhost as your host-name. And if you have  
> login-details to ur mysql server means, create a DB and use it.
> 
> –  
> Regards,
> 
> T.Veerasundaravel.  
> [http://tinyurl.com/25vma7h](http://tinyurl.com/25vma7h)  
> @veerasundaravel

Thanks Veerasundaravel, but the thing is that the application has been  
deployed already, and I have to create an API of it for i-pad. For that  
I will be using Php as I am php developer so I need host name, to get  
connected with db, can you tell me the name of file where i can get this  
info, even at server (EY) I am unable to get the mysql host name.

Thanks

---

<div class="post-metadata">

**Author:** ![awijeet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@awijeet](https://www.ruby-forum.com/u/awijeet)\
**Post date:** [September 22, 2010, 6:45pm UTC](https://www.ruby-forum.com/t/mysql-port-info/195358/4 "2010-09-22T18:45:12Z")

</div>

Awijeet Mr. wrote:

> Veera S. wrote:
> 
> > Awijeet Mr. wrote:
> > 
> > > I want to create an API for my web application so i need access on  
> > > mysql.  
> > > for that I need following info…
> > > 
> > > database host-name and that I am unable to get…
> > > 
> > > Thanks
> > 
> > you can simply use localhost as your host-name. And if you have  
> > login-details to ur mysql server means, create a DB and use it.
> > 
> > –  
> > Regards,
> > 
> > T.Veerasundaravel.  
> > [http://tinyurl.com/25vma7h](http://tinyurl.com/25vma7h)  
> > @veerasundaravel
> 
> Thanks Veerasundaravel, but the thing is that the application has been  
> deployed already, and I have to create an API of it for i-pad. For that  
> I will be using Php as I am php developer so I need host name, to get  
> connected with db, can you tell me the name of file where i can get this  
> info, even at server (EY) I am unable to get the mysql host name.

Ack! No! If the app is in Rails, extend it in Rails to create the API.  
Don’t write a separate PHP app – that’s asking for trouble.

If the app isn’t in Rails, then why the heck are you posting here?

> Thanks

Best,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![awijeet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@awijeet](https://www.ruby-forum.com/u/awijeet)\
**Post date:** [September 23, 2010, 9:29am UTC](https://www.ruby-forum.com/t/mysql-port-info/195358/5 "2010-09-23T09:29:51Z")

</div>

On 22 September 2010 06:05, Awijeet Mr. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I want to create an API for my web application so i need access on  
> mysql.  
> for that I need following info…
> 
> database host-name and that I am unable to get…

The database host name is in config/database.yml. Usually it is  
localhost.

Colin

---

<div class="post-metadata">

**Author:** ![awijeet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/65b543/32.png) [@awijeet](https://www.ruby-forum.com/u/awijeet)\
**Post date:** [September 23, 2010, 3:19am UTC](https://www.ruby-forum.com/t/mysql-port-info/195358/6 "2010-09-23T03:19:35Z")

</div>

Marnen Laibow-Koser wrote:

> Awijeet Mr. wrote:
> 
> > Veera S. wrote:
> > 
> > > Awijeet Mr. wrote:
> > > 
> > > > I want to create an API for my web application so i need access on  
> > > > mysql.  
> > > > for that I need following info…
> > > > 
> > > > database host-name and that I am unable to get…
> > > > 
> > > > Thanks
> > > 
> > > you can simply use localhost as your host-name. And if you have  
> > > login-details to ur mysql server means, create a DB and use it.
> > > 
> > > –  
> > > Regards,
> > > 
> > > T.Veerasundaravel.  
> > > [http://tinyurl.com/25vma7h](http://tinyurl.com/25vma7h)  
> > > @veerasundaravel
> > 
> > Thanks Veerasundaravel, but the thing is that the application has been  
> > deployed already, and I have to create an API of it for i-pad. For that  
> > I will be using Php as I am php developer so I need host name, to get  
> > connected with db, can you tell me the name of file where i can get this  
> > info, even at server (EY) I am unable to get the mysql host name.
> 
> Ack! No! If the app is in Rails, extend it in Rails to create the API.  
> Don’t write a separate PHP app – that’s asking for trouble.
> 
> If the app isn’t in Rails, then why the heck are you posting here?
> 
> > Thanks
> 
> Best,  
> –Â  
> Marnen Laibow-Koser  
> [http://www.marnen.org](http://www.marnen.org)  
> removed\_email\_address@domain.invalid

I am not asking questions out from the scope of rails, it’s just i want  
to know where host info are written into rails setting file,so that I  
can use it for any specific reason.

```
            and it's not heck.. it can be answered as you know or 

```

don’t know? Any where in this post i haven’t asked any thing related to  
php or i-dev.it’s core rails problem.

Thanks  
Avijit.
