# Connect to a remote mysql database server

**URL:** <https://forum.kirupa.com/t/connect-to-a-remote-mysql-database-server/298573>\
**Category:** programming\
**Created:** [October 21, 2009, 9:41am UTC](https://forum.kirupa.com/t/connect-to-a-remote-mysql-database-server/298573 "2009-10-21T09:41:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![edryan](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@edryan](https://forum.kirupa.com/u/edryan)\
**Post date:** [October 21, 2009, 9:41am UTC](https://forum.kirupa.com/t/connect-to-a-remote-mysql-database-server/298573/1 "2009-10-21T09:41:34Z")

</div>

Hi guyz,

I’ve been googling on this for 2 days already, but still can’t figure it out. I want to connect to my remote database server hosted for my website using my local mysql command line client. I want to query records on my tables. Now, i did this:

```auto

mysql> GRANT ALL ON mydb.* TO 'user'@'123.123.123.123' IDENTIFIED BY 'password';

```

Query was ok.

Now, i don’t really know if that’s the first step. The next thing i did was to connect mysql to my host, i did this:

```auto

c:\mysql\bin\mysql -u user -p -h 123.123.123.123

```

I got this error:  
ERROR 1045 (2800): Access denied for user ‘user’@‘123.123.123.123’ (using password: Yes)

Do i have to contact my hosting company with regards to this issue?

Please help me on this. THank you. Sorry for my english.

P.S. : The real thing about this is i’ll be going to create a standalone application on my local computer doing queries from my remote database.
