Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

26.1.9.6. Establishing a Remote Connection to System A from System B

If you want to connect to system A from system B with a username and password of myuser and mypassword, here is a simple procedure.

On system A, follow these steps:

  1. Start the MySQL server.

  2. Use GRANT to set up an account with a username of myuser that can connect from system B using a password of myuser:

    GRANT ALL ON *.* to 'myuser'@'B' IDENTIFIED BY 'mypassword';
    
  3. The GRANT statement grants all privileges to user myuser for connecting from system B using the password mypassword. To execute this statement, you should be either root on system A (or another user who has appropriate privileges). For more information about MySQL privileges, refer to Section 5.8, “MySQL User Account Management”.

On system B, follow these steps:

  1. Configure a MyODBC DSN using the following connection parameters:

    DSN            = remote_test
    SERVER or HOST = A (or IP address of system A)
    DATABASE       = test (The default database or an appropriate one)
    USER           = myuser
    PASSWORD       = mypassword
    

    To set up a DSN-less connection, refer to Section 26.1.9.5, “Connecting Without a Predefined DSN”.

  2. Check whether you are able to access system A from system B by using ping or other means. If you are not able to reach system A, check your network or Internet connections or contact your system administrator.

  3. Try to connect using DSN=remote_test. If it fails, trace the MyODBC log, and take the further steps based on the error message from the log. If you need further assistance, send a detailed mail message to .

You can also find a simple HOWTO at https://www.phphelp.com/tutorial/using-myodbc-to-connect-to-a-remote-database.html.


 
 
  Published under the terms of the GNU General Public License Design by Interspire