1.sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
修改绑定ip地址
- python manage.py runserver 以后会报
django.db.utils.InternalError: (1130, “Host ‘ubuntu.hub’ is not allowed to connect to this MySQL server”)
在数据库中输入
mysql> grant all privileges on test4.* to ‘root’@192.168.1.33 identified by ‘123’ with grant option;
然后
flush privileges;
授权