Skip to main content

Posts

Showing posts from November 17, 2024

Connect MYSQL server using local system Remotely

1. Allow Remote Access in MySQL Configuration on ubuntu or your server sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf bind-address = 127.0.0.1 bind-address = 0.0.0.0 sudo systemctl restart mysql 2. Grant Remote Access Privileges to Your IP Log into MySQL on the server: and run  sudo mysql -u root -p sudo ufw allow 3306 sudo ufw status Double-check User Access Log in to MySQL on your Ubuntu server: mysql -u root -p Run the following queries to ensure the user and permissions are correct: Check Existing Users SELECT user , host FROM mysql.user WHERE user = 'root' ; here 106.219.87.127 is your public ip ( or you Local network's public IP ) GRANT ALL PRIVILEGES ON *.* TO 'root'@'106.219.87.127' IDENTIFIED BY 'Kil@123456' WITH GRANT OPTION; FLUSH PRIVILEGES; exit from mysql sudo systemctl restart mysql now on your local system run command on the location of cmd where mysql folder is present here (82.112.230.00 is server IP ) mysql -u r