Connect to MySQL With HeidiSQL

Learn How to Connect to MySQL With HeidiSQL

Not only can you access your databases with phpMyAdmin in your cPanel, but you can connect from your local computer using a database client such as HeidiSQL. This is also a great way to allow your developer to manage a database directly without giving them full access to your cPanel.

There are several steps to connecting to MySQL with HeidiSQL. First, you must download and install the free HeidiSQL app also known as a database client. Next, set up the remote database connection, which adds the IP address of the person connecting to the firewall and allows them to access the database. Finally, you will learn how to use HeidiSQL to connect to your MySQL database.

Download & Install HeidiSQL

Before we set up a connection you must download and then install the HeidiSQL client.

Add IP to Your Remote MySQL

In order for you to be able to connect to your databases remotely, you will need to add your local computer IP address to Remote MySQL in cPanel. This allows your specific computer to get through the firewall and access the database.

You can get your IP address by going to the following link:

Connecting Remotely With HeidiSQL

  1. Open HeidiSQL.
  2. Click New.
    Click New - Heidi SQL
  3. Name the connection. Hit the enter key.
    Name the Connection - Heidi SQL
  4. Enter your connection settings. The settings should be like the following.

    Network type: MySQL (TCP/IP).
    Hostname / IP: You use your domain name or your server IP address.
    User: Your cPanel username or the database user you created.
    Password: Your cPanel password or the password for the database user.
    Port: 3306.
    Databases: Leave as Separated by Semicolon.
    Startup Script: Leave it blank.


    Connection Settings Heidi SQL
  5. Click Open.
    Open The Connection Heidi SQL

    Now you will see the databases and tables on your server.
    View the databases Heidi SQL

Congratulations, now you know how to remotely connect to MySQL using the HeidiSQL database client. See our section on working with databases for more helpful tutorials.

48 Comments

  • Greetings,

    I would like to connect via SSH, am I able to do this via HeidiSQL?  I was using SQL Workbench but could not get it to work there as I had with my previous host.

    Someone mentioned it might work with HeidiSQL? Any Guidance is appreciated.

  • hello, if i want connect to microsoft excel is it possible? if possible what is ecxect thing i should do? change the network type is it or not? 

    • HeidiSQL is not designed to connect to Excel. What are you trying to do maybe we can help you find a solution.

    • You may certainly want to check your connection settings first. It is possible the username or password is being rejected.

    • Hello giovana,

      Thank you for contacting us. We are happy to assist you, but it is not clear what you are trying to accomplish. Could you please provide some additional information so we can better assist you?

      Thank you,
      John-Paul

  • hi,

    i tried the connecting steps but its not connected…its throw error msg(cannot connect to mysql server on ‘127.0.0.1’(10061) )

    • 127.0.0.1 would be your local machine. Check your hsotname to ensure you are using a proper domain name or IP for the target server.

  • i am using my domain name as a hostname. and how to check that either server set up to connect using remote connections or not

  • hi i tried with the above step but its not working giving error cannot connect tp mysql server on “hostname” (10060)

  • dear philip,

    it really helps me….thank you for this sharing moment but i just want to know where to put that code onto? Thank you for this sharing moment

    regards shahida

     

    • HeidiSQL is a desktop client. PHPMyAdmin is a web based client for MySQL & MariaDB. You can do it, but you’ll need to refer to their documentation. As for connecting MariaDB to HeidiSQL it’s totall possible as well. Here’s their guide on it: https://mariadb.com/kb/en/mariadb/heidisql/

    • Hello Sagar,

      Everytime you create a new session in HeidiSQL you have the option to save it, and it includes a password. If you’re repeatedly entering a password, then it may be related to another security issue. Check out HeidiSQL’s documentation for further information.

      If you have any further questions or comments, please let us know.

      Regards,
      Arnel C.

  • Salutations 

    With regards to the above question on connecting to netbeans think what my friend was saying is it necessary to have a code to connect the Heidi sql database to Netbeans IDE like in the case of connecting Netbeans with Xampp Database.

    For a better understanding to what i mean, i have a code below that i used for connecting the two before:

    import java.sql.Connection;

    import java.sql.DriverManager;

    import javax.swing.*;

    public class javaconnect  {

        

        Connection conn=null;    

      

        public static Connection ConnecrDb()/*method*/

                

                

        {

       

            try{

                Class.forName(“com.mysql.jdbc.Driver”);

                Connection conn=(Connection) DriverManager.getConnection(“jdbc:mysql://localhost/mkulimahodari”, “root”,”root”);

                JOptionPane.showMessageDialog(null,”Connection Established”);//Will be displayed if a good connection occurs with the database

                 return conn;

               

            }

            catch(Exception e) {

                JOptionPane.showMessageDialog(null,e);//if any error should occur it will show the error in the form of a dialogue box

           javaconnect s = new javaconnect();

    s.conn();

                

                return null;

               

            }

            

     

        

        }

     

        private void conn() {

            throw new UnsupportedOperationException(“Not supported yet.”); //To change body of generated methods, choose Tools | Templates.

        }

    Thank you in advance

     

     

    • Hello Philip,

      I am not aware of any way to connect Netbeans and Heidi SQL. I have also done a bit of searching and do not see any instructions on connecting these two software.

      Kindest Regards,
      Scott M

    • Hello Anilak,

      Thanks for the question. We are not sure what you mean by SID – I’m assuming Server ID? Server is designated only by Hostname or IP in HeidiSQL. Login credentials are based on the user and password that has access to the website. SSL details are found under the advanced tab. There are no options to SID that we know of. If you require further information or assistance, please provide more details on the SID and we can investigate the matter further.

      Kindest regards,
      Arnel C.

    • Hello Vijayan,

      Are you asking how to connect netbeans to heidisql? HeidiSQL is an application to connect to a database, so connecting to netbeans may not be possible.

      Kindest Regards,
      Scott M

    • Hello Abir,

      Thank you for your question. Yes, by following the above guide you are able to connect to a MySQL server using heidiSQL.

      If you have any further questions, feel free to post them below.

      Thank you,
      John-Paul

Was this article helpful? Let us know!