Jump to content
Tejpal

How i connect mysql Remotely

Recommended Posts

Hello Every One

I Need Help about How i connect mysql Remotely

i want use my database from my server ip to other hosting account

How I done using php

 

Thanks in Advance

Share this post


Link to post
Share on other sites

You need to configure MySQL to allow remote connections, make sure that firewalls aren't going to block anything, and then you can connect with the IP or host name.

  • Like 1

Share this post


Link to post
Share on other sites

You need to configure MySQL to allow remote connections, make sure that firewalls aren't going to block anything, and then you can connect with the IP or host name.

Thanks Dear justsomeguy Sir plz fully describe its becuase its not on any other compny used server its my local server made by me so plz tell me how i done all its

Share this post


Link to post
Share on other sites

The following items are assumed:

You have access to login as the ‘root’ MySQL user

Getting your IP address..

You will need to know what the IP address you are connecting from.

Granting access to a user from a remote host is fairly simple and can be accomplished from just a few steps. First you will need to login to your MySQL server as the root user. You can do this by typing the following command:

# mysql -u root -p

Once you are logged into MySQL you need to issue the GRANT command that will enable access for your remote user. In this example we will be creating a brand new user (fooUser) that will have full access to thefooDatabase database.

Keep in mind that this statement is not complete and will need some items changed. Please change 1.2.3.4to the IP address that we obtained above. You will also need to change my_password with the password that you would like to use for fooUser.

mysql> GRANT ALL ON fooDatabase.* TO fooUser@'1.2.3.4' IDENTIFIED BY 'my_password';

This statement will grant ALL permissions to the newly created user fooUser with a password of ‘my_password’ when they connect from the IP address 1.2.3.4.

Edited by trilok

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...