Sqlyog connect to mysql host

SQLyog adalah aplikasi client MySQL yang sangat berguna untuk pengelolaan database dan mudah di gunakan disamping mudah di gunakan kapasitas aplikasi yang hanya memakan 5Mb ini semakin membuat SQLyog mudah dan praktis.

Berikut cara remote database di cPanel mengguakan SQLyog,

1. Silahkan login ke cPanel kemudian cari menu Databases dan pilih bagian Remote Mysql, klik bagian tersebut

Sqlyog connect to mysql host

2. Kemudian silahkan tambahkan IP Public yang digunakan, cara cek IP Public silahkan bisa akses www.indoip.com

3. Selanjutnya silahkan masukan IP Address yang tampil pada www.indoip.com ke kolom Host pada menu Add Access Host di Remote MySQL, Sebagai contoh seperti pada gambar berikut,

4. Kemudian isikan komentar (jika perlu) lalu klik Add Host dan jika sukses maka akan muncul pesan seperti berikut

5. Setelah Ip public jaringan sudah di masukan, Kita buka aplikasi remote database pada komputer yang di gunakan SQLyog.


Penjelasan :

Saved Connection : ( Nama koneksi databasenya )

MySQL Host Address : ( Ip server host Tujuan tempat server database )

User name : (User name Database)

Password : (Password Username Databasenya )

Port : (Port remote database defaultnya 3360)

Databases : (Nama Database)

Setelah terisi dengan benar silahkan bisa klik “Connect”.

Due to security reasons, remote MySQL connection is disabled on our Shared Hosting servers. However, you can easily set up an SSH tunnel between your computer and our server using an SSH client with the MySQL port 3306 forwarding.

After doing this, you will have port 5522 on your local machine that listens to and forwards to your remote server's localhost on port 3306. Now you can effectively connect to the remote server's MySQL database as if it were running on your local box.

NOTE: If you are trying to connect to PostgreSQL databases, use port 5432 instead of 3306.

Below you can find the steps on how to configure a third-party SSH client (PuTTY) and MacOS and Linux built-in one (Terminal).

NOTE: Make sure that the SSH access is enabled for your account. Feel free to follow this guide to check the settings.

Here is a list of details you will need in the process:

SSH connection details:

  • Server hostname: server168.web-hosting.com
  • Port: 21098
  • cPanel username: tunneltest
  • cPanel password: cpanel_password

Your server hostname will be different for your account. You can check it in your Welcome Email for your hosting plan.

Your cPanel username and password are what you use to log in to your cPanel account.

The port will be the same for all Shared Hosting servers.

Server-side MySQL details:

  • Server hostname: 127.0.0.1
  • Port: 3306
  • Database name: tunneltest_db
  • Database user: tunneltest_user
  • Database password: db_user_password

Your server hostname and port will be the same for all Shared Hosting servers.

Your database name, user, and password are what you’ve specified while creating the database in the MySQL Databases menu. If you are not familiar with this menu, feel free to check this article.

Tunnel details:

  • Local IP: 127.0.0.1
  • Local Port: 5522
  • Remote IP: 127.0.0.1
  • Remote Port: 3306

Your local IP address and port may be changed, according to your preference.

Since some of our customers are running local MySQL servers on the 3306 port, let’s use the 5522 port in this example to ensure that the Local Port is not used by any service.

Your remote IP address and port should match the server hostname and port from Server-side MySQL details and cannot be changed.

Client-side MySQL details:

  • Server hostname: 127.0.0.1
  • Port: 5522
  • Database name: tunneltest_db
  • Database user: tunneltest_user
  • Database password: bCsLHA5xs8AQ

These are the access details you will use at the end of the app or website you are trying to connect to the database remotely. Your server hostname and port should match Local IP and Port from the Tunnel details.

Your database name, user, and password should match corresponding values from Server-side MySQL details.

Connect with PuTTY
Connect with Terminal (for Linux and MacOS)

Connect with PuTTY

1. Run the application.
2. Go to the Connection tab of the 'Data' section and make sure that the Auto-login username field is empty (you can also fill in your cPanel username there), and the 'Prompt' option is checked:

Sqlyog connect to mysql host

3. Go to the Connection >> SSH >> Tunnels section and fill in the values mentioned in Tunnel details as follows:
Source Port = Local Port
Destination = RemoteIP:RemotePort

Make sure that the 'Local' mode is checked and then click Add:

Sqlyog connect to mysql host

Once you’ve done this, you should see the tunnel in the field above:

Sqlyog connect to mysql host

4. Go to the Session tab and fill in the Host Name and Port using the server hostname and port from your SSH connection details. Now choose a name for this preset and type it in in the Saved Sessions field. Click Save to save this configuration.

Sqlyog connect to mysql host

5. Now click on Open to establish a connection to the server.

NOTE: Since you’ve already saved your session settings, you can skip steps 1-4 next time you wish to open an SSH tunnel.

Simply select the saved preset from the list, click Load and Open to use it.

6. When you connect to the server for the first time, a security alert will appear. Click Accept to proceed.

Sqlyog connect to mysql host

7. You will now be prompted to enter in your cPanel username and password found in your SSH connection details.

NOTE: Symbols won’t appear in the terminal when you type in the password. It's Terminal's way of keeping your password secure.

Once the password is accepted, a server prompt will appear. The SSH tunnel is now established and all connections to localhost over the port 5522 will be forwarded to your hosting account.

Sqlyog connect to mysql host

NOTE: The SSH tunnel will work as long as this window is active. Do NOT close this window until you are done working with the database.

We can now connect to a database on the Shared Hosting server using the Client-side MySQL details with any MySQL client. For example:

Sqlyog connect to mysql host

Sqlyog connect to mysql host

Connect with Terminal (for Linux and MacOS)

1. Run the application and enter the following command:

ssh -f -p21098 -L 5522:127.0.0.1:3306 -N

" -p21098" is filled using SSH connection details:
[cpanel account]@[server hostname] -p[port]

"-L 5522:127.0.0.1:3306" is filled using Tunnel Details:
[Local Port]:[Remote IP]:[Remote Port]

The local IP address is not specified in this case and defaults to 127.0.0.1

2. Hit Enter and specify your cPanel password (symbols won’t appear in the terminal when you type in the password - it's Terminal's way of keeping your password secure).

If this is your first time connecting to this server, the following prompt will appear:Are you sure you want to continue connecting (yes/no)?Type yes and press enter to proceed.

3. Once you’ve done this, all connections to localhost over the port 5522 will be forwarded to your hosting account. We can now connect to a database on the Shared Hosting server using the Client-side MySQL details with any MySQL client.

Here is an example using a command-line MySQL client:

mysql -h 127.0.0.1 -P 5522 tunneltest_db -p -u tunneltest_user

The end result will look like this:

Sqlyog connect to mysql host

That's it!

How do I connect to a MySQL host?

Use the TCP/IP connection tab and enter the following:.
Name: optional..
Host: your MySQL hostname: mysql.example.com..
Username: your database user name..
Password: your database user password..
Database: optional..
Port: 3306..

Can I use SQLyog for SQL server?

SQLyog will connect to any ODBC database, but only for importing/migrating data structures and data from these ODBC databases into MySQL.

Is SQLyog same as MySQL?

SQLyog is a GUI tool for the RDBMS MySQL. It is developed by Webyog, Inc., based in Bangalore, India, and Santa Clara, California. SQLyog is being used by more than 30,000 customers worldwide and has been downloaded more than 2,000,000 times.

How do I connect to a MySQL IP address?

Select Connections from the SQL navigation menu. In the Authorized networks section, click Add network and enter the IP address of the machine where the client is installed. Note: The IP address of the instance and the mysql client IP address you authorize must be the same IP version: either IPv4 or IPv6. Click Done.