How to connect mysql base

How to connect mysql base

MySQL operates with the SQL language which is the structured language of requests and is the popular database management system open source. Remote connection allows to connect to the necessary base on the server from the desktop computer.

It is required to you

  • - putty

Instruction

1. To execute normal connection to the selected MySQL database, open the control panel and select the MySQL Databases group. Specify necessary base and print the IP address used for connection to the Internet in the Access Hosts group. Use the Add Host command and print data:
- a name of the domain - in the field "The Server for Connection";
- 3306 - in the line "Port for Connection";
- a name of the account and the password - in the field "User Name and Password".

Thus, the syntax of a command looks as:
mysql - P 3306 - h имя_домена.ru - u mylogin_user - p mylogin_db.

2. Load from the official site and install the customized application of putty intended for safe connection to databases of MySQL by means of a SSH tunnel on the computer. Start installed application and open the Session menu of the left panel of a window of a configuration of the putty program. Print a name of the domain of the website in the line Host Name and expand the Connection node in the directory. Pass into the SSH point and select the section Tunnels. Print 3306 in the line Source Port and localhost: 3306 - in the line Destination. Confirm performing the selected action, having clicked Add.

3. Use the Open command for connection establishment with the host and enter the control panel with the account. Connect the necessary database, using the name and the password set during its creation. Specify 127.0.0.1 as the IP address of the server and 3306 - as port of connection. Thus the syntax of a command looks as:

mysql - p 3306 - h 127.0.01 - u mylogin_user - p mylogin_db.

Pay attention that existence on the computer of the working database server of MySQL makes impossible use of port 3306. In this case, specify other port, for example, 3307.

Author: «MirrorInfo» Dream Team


Print