I just created a droplet on Centos 8 and a data cluster to store MySQL database

How do I access the database from centos?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hi there @cpeters5,

I would recommend using the mysql client command-line tool. You could follow the steps on how to do that here:

https://digitalocean.com/docs/databases/mysql/how-to/connect/

Hope that this helps!
Regards,
Bobby

  • I followed the instruction in the tutorial you gave. After installing mysql on local machine (centos 8), I started mysql and ran the command

    mysql -u doadmin -p <doadmin password> -h db-mysql-nyc3-77401-do-user-7579068-0.a.db.ondigitalocean.com -P 25060 -D defaultdb

    I got connection error
    ERROR 2003 (HY000): Can’t connect to MySQL server on ‘db-mysql-nyc3-77401-do-user-7579068-0.a.db.ondigitalocean.com’ (110)

    I tried various things: allow port 25060, turned off firewalld but still cannot connect.

    Any idea how to resolve this?

    • It is strange that I am able to access the database from my desktop, using the same information (doadmin, password, port, host)
      BUT I cannot connect to mysql on Centos from desktop. Got the same error 2003

      On the contrary, @Centos I have no problem accessing the local mysql, but cannot connect to Mysql on the cluster

I solved connection problem. I forgot to update trusted sources after deleting and recreating the current droplet.

But now I get a different error code. I will post this error in a new question.
Thanks!

Submit an Answer