How can I fix it: Mysql remote access not working

I did this in mysql

USE mysql;

CREATE user 'test'@'%' IDENTIFIED BY 'test';

GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' WITH GRANT OPTION;

FLUSH PRIVILEGES;

and in terminal

sudo apt-get install ufw

sudo ufw allow mysql

sudo ufw allow 3306

service mysql restart

and edited mysqld.cnf in /etc/mysql/mysql.conf.d

#bind-address       = 127.0.0.1

but when I try to access mysql server in terminal with this code

mysql -utest -ptest --port 3306 --host [myip]

And this is 3306 port status

How To Allow Remote Access to MySQL, What is disabled by default is remote root access. ip bindings,enabling networking) problem was still not getting solved. To fix that you need to edit /usr /local/etc/my.cnf and change the bind-address from 127.0.0.1 to * . this might not be a mysql issue then. i don't know how windows handles remote connections but this looks like a networking issue. check this one out, if this doesn't work then its definitely networking issue.

give apache remote access

Check this answer https://stackoverflow.com/a/55037055/7510232

How to allow remote connection to mysql, I have problem to connect to remote server thought telnet I made and configure a user in Linux and in mysql also. I want that the user get in� Alternatively, you can allow connections to your MySQL database from any IP address with the following command: Warning: This command will enable anyone to access your MySQL database. Do not run it if your database holds any sensitive data. sudo ufw allow 3306 Lastly, restart the MySQL service to put the changes you made to mysqld.cnf into effect:

Seeing this line indicates MySQL is listening on ipv6:

:::3306

I think MySQL is currently only listening on the ipv6 address (and localhost), so try to set the bind-address to the ipv4 address that you are using.

How Do I Enable Remote Access To MySQL Database Server , If you encounter problems when you try to connect to the MySQL server, the following only locally on the loopback interface and will not accept remote connections. You can fix this by setting up an account for the combination of client host� However, in some situations, it is necessary to access the MySQL server from remote location. For example, when you want to connect to the remote MySQL server from your local system, or when using a multi-server deployment where the application is running on a different machine from the database server.

have you tried ping the MySQL server and telnet the port?

:::3306 indicates your MySQL server is listening on both ipv4 and ipv6, if you want to access it through ipv6, then you need to add

bind-address = ::

to support your ipv6 access

MySQL 8.0 Reference Manual :: 6.2.21 Troubleshooting , If you are seeing a different error “Access denied for user To test a remote MySQL connection in Linux Connecting To 192.16.8.1.22Could not open connection to the host, on port� In Server Manager, click Tools, and then click Remote Access Management. Click DASHBOARD to navigate to Remote Access Dashboard in the Remote Access Management Console . Make sure your Remote Access server is selected in the left pane, and then in the middle pane, click Operations Status .

How to Allow Remote Connections to MySQL Database Server , # nmap -sT -O localhost -p 3306 PORT STATE SERVICE 3306/tcp closed mysql In the above command you are getting port close because your mysql is � Log in to your MySQL server locally, as the root user, by using the following command: mysql -u root -p. Use a GRANT command in the following format to enable access for the remote user. Ensure that you change 1.2.3.4 to the IP address that you had obtained earlier.

Can't Connect to MySQL Server Remotely on Ubuntu, MySQL connection troubleshooting information for common MySQL The reasons are listed below with links on the steps to take to fix the connection error. configuration file, the MySQL server will not accept connections from remote hosts. Type remote settings in the Start Menu. That will display an Allow remote access to your computer card on your PC. Click on it to open the System Properties. Here, check the ‘Allow Remote

MySQL remote access not working - Port Close?, cnf). Here are the quick steps to fix this : Open my.cnf file in terminal using following command : sudo nano /etc� In short, enabling remote MySQL access in Linode servers involves modifying MySQL configuration, enabling IP address in firewall, etc. Today, we’ve seen how our Support Engineers set up remote MySQL access and fix common MySQL access problems in Linode server. PREVENT YOUR SERVER FROM CRASHING! Never again lose customers to poor server speed!

Comments
  • mysql -uroot -pPassword -h ipAddress
  • @John Joe same result :(
  • Versions of Ubuntu, ufw, mysql? Can you connect without the firewall in place?
  • @RickJames ubuntu: 18.10 / ufw 0.35 / mysql: 5.7.25 and it's same result when I disabled ufw
  • What is the setting of skip_name_resolve?
  • Thank you for your answer. But my host_cache table is empty. And I tried telnet command but it's not repond for long time.
  • @Busted in the error you got, there is "(110)" at the end, which points to the underlying socket error. 110 is ETIMEDOUT (connection timeout). To confirm, please try shutting down the server to verify, and you should get (111) ECONNREFUSED (connection refused) instead.
  • is this your complete my.cnf in the question above - could you post the rest? Is there maybe a "skip-networking" directive set?
  • Thank you but I'm not using apache. I'm using just mysql.
  • are you running db on a VM?