Jump to content

How i connect mysql Remotely


Tejpal

Recommended Posts

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 3 weeks later...

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
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...