DEV Community

Manish Chaudhary
Manish Chaudhary

Posted on

How to connect to remote database using ip address

  1. SSH into the server.
  2. mysql -u root -p
  3. enter password
  4. SHOW GRANTS FOR 'username'@'localhost';
  5. GRANT ALL PRIVILEGES ON . TO 'username'@'ip_address' IDENTIFIED BY 'password';
  6. FLUSH PRIVILEGES;
  7. Try to connect database using mysql client

Top comments (0)