2👍
Firstly, you need to allow remote connections by editing my.cnf
file and commenting the line that starts with bind-address
as follows (You may also just change 127.0.0.1
by your machine ip address):
#bind-address = 127.0.0.1
Then restart mysql service:
sudo service mysql restart
Grant privileges to your user as follows:
mysql> CREATE USER 'root'@'172.30.10.%' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'172.30.10.%'
To grant privileges only on Etat_Civil
, you can try:
mysql> GRANT ALL PRIVILEGES ON Etat_Civil.* TO 'root'@'172.30.10.%'
2👍
Looks like MySQL is configured to listen only on localhost.
You can test this by running telnet 172.30.10.59 3306 from your client machine.
Please try to follow Configuration step described here:
Edit the /etc/mysql/my.cnf file to configure MySQL to listen for connections from network hosts, change the bind-address directive to the server’s IP address. For example Replace 172.30.10.59 with the appropriate address. If there are no such entry – uncomment it or create new line.
bind-address = 172.30.10.59
Then restart mysqld with this command:
sudo service mysql restart
Then test with telnet or by running your application once again. Also netstat would have second entry for mysqld.
- [Django]-Feature differentiation: Rails / Django
- [Django]-How to use RelatedFieldWidgetWrapper in django 3
0👍
The problem may be ‘HOST’: ‘172.30.10.58’
You can change IP address to your hostname.
- If you are using Ubuntu, check the name in
sudo vi /etc/hostname and sudo vi /etc/hosts -
If you are using docker, go to docker
docker exec -it CONTAINER_ID bash
sudo vi /etc/hostname and sudo vi /etc/hosts
Hope this help !
- [Django]-Explicitly clear django memcached flush/cache() OR delete specific per-view-cache key
- [Django]-How to generate unique filename for django model.FileField
- [Django]-How to generate a filmstrip image in python from a folder of images?
- [Django]-How to fix 'TypeError: __init__() got an unexpected keyword argument 'sender''
- [Django]-Email django from using EmailMultiAlternatives