flask - OperationalError Lost connection to MySQL server at 'reading initial communication packet' DigitalOcean -


I have trouble connecting to my SQL server on digital SF through my flop webpage. The ISSF flask is using the flask-kekeleki to bind the mysql database.

I am able to use mysql server via phpmyadmin interface on MyPaddle: 5000 / phpmyadmin

Since IGN (I built it in port 80). 5000 / phpmyadmin

In my flask app, I specify

  myipaddress: 5000 / phpmyadmin  

>

  SQLALCHEMY_DATABASE_URI = 'mysql: // root: password @ myipaddress: 5000 / databasename'  

When I use Shell with DB on my database I try to make tables .create_all () - This is not the only answer The cursor blinks forever and then I get the operational error that I quote on the title a few minutes ago

To walk Able to obtain similar installation. So I do not know its a flask configuration problem, but there is only one mysql access problem. My webpage is on DigitalAsian (Not sure if MySQL server is behind a firewall or something that makes it inaccessible

 

for the Tie-Address under the Mysql_d section on / etc / mysql / my I tried all possible combinations and restarted mysql server with success

I am local T., 127.0.0.1, 127.0 .0.1: 5000, myipaddress for binding-address (also tried to comment) without any result.

In addition, I have user, current_user Tried to get on the table properties from mysql command line, it is listed as root @ localhost for both

From this post: I get the idea that it is related to the firewall, but It is not certain how to improve it.

Anyidea Cai I would appreciate my flask app for mysql server? Any help would be greatly appreciated

I have mysql address To

 mysql: // root: password @ myipaddress: 5000 / databasename  

Since B ut my flask app and mysql server are on the same server Running, the flask app was able to access mysql server when I changed myipaddress: 5000 localhost: 5000

  mysql: // root: password @ localhost: 5000 / database name  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -