DekGenius.com
SQL
mysql allow remote connections
#open /etc/mysql/mysql.conf.d/mysqld.cnf
#and change
#bind-address = 127.0.0.1
#to
#bind-address = 0.0.0.0
#then grant root all privaleges to root
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
#If you ran above command and accidently
#did not change password for root you can run this:
ALTER USER 'root'@'%' IDENTIFIED BY 'MyNewPass';
Enable remote access for MySQL
[root@server #] nano /etc/csf/csf.allow
tcp:in:d=3306=IP-HERE
How to Allow MySQL remote connections in Ubuntu Server
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%';
How to Allow MySQL remote connections in Ubuntu Server
sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
How to Allow MySQL remote connections in Ubuntu Server
How to Allow MySQL remote connections in Ubuntu Server
How to Allow MySQL remote connections in Ubuntu Server
sudo systemctl restart mariadb
How to Allow MySQL remote connections in Ubuntu Server
sudo systemctl restart mysql
How to Allow MySQL remote connections in Ubuntu Server
sudo netstat -tulnp | grep mysqld
How to Allow MySQL remote connections in Ubuntu Server
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 622/mysqld
How to Allow MySQL remote connections in Ubuntu Server
How to Allow MySQL remote connections in Ubuntu Server
How to Allow MySQL remote connections in Ubuntu Server
CREATE USER 'username'@'%' IDENTIFIED BY 'new-password';
FLUSH PRIVILEGES;
How to Allow MySQL remote connections in Ubuntu Server
GRANT ALL PRIVILEGES ON dbname.* TO 'username'@'%';
How to Allow MySQL remote connections in Ubuntu Server
CREATE USER 'username'@'192.168.1.200' identified by 'new-password';
How to Allow MySQL remote connections in Ubuntu Server
mysql -h 192.168.1.100 -u username -p
© 2022 Copyright:
DekGenius.com