Note that I was addicted to accessing the DB with Python's mysql.connector using a web application.

usage environment

--Build a web server and a DB server for Mysql 5.6 on CentOS 6.5. --Use the above web application from a client PC (Mac) in the same LAN --Use Python's mysql.connector to access Mysql

I was addicted to

test.py


mysql.connector.connect(user='root', password='pass', host='127.0.0.1', database='hoge', charset='utf8')

When accessing the DB from a browser like [2003] Can’t connect to MySQL server on ‘127.0.0.1’ (13) I get angry

approach

On CentOS sudo setsebool -P httpd_can_network_connect=1 Then it went well. This seems to allow httpd access.

I'm not sure, but it's working now, so it's okay w

Recommended Posts

Note that I was addicted to accessing the DB with Python's mysql.connector using a web application.
A note I was addicted to when creating a table with SQLAlchemy
I was addicted to trying Cython with PyCharm, so make a note
[Fabric] I was addicted to using boolean as an argument, so make a note of the countermeasures.
A note I was addicted to when running Python with Visual Studio Code
A story that I was addicted to when I made SFTP communication with python
A story that I was addicted to at np.where
Note that I was addicted to npm script not passing in the verification environment
A story that I was addicted to calling Lambda from AWS Lambda.
A note I was addicted to when making a beep on Linux
Note that I was addicted to sklearn's missing value interpolation (Imputer)
I tried to make a todo application using bottle with python
I made a WEB application with Django
A story that I had a hard time trying to create an "app that converts images like paintings" with the first web application
The LXC Web Panel that can operate LXC with a browser was wonderful
I made a web application in Python that converts Markdown to HTML
I was addicted to creating a Python venv environment with VS Code
A story I was addicted to trying to get a video url with tweepy
(Note) A web application that uses TensorFlow to infer recommended song names.
I want to make a web application using React and Python flask
[ES Lab] I tried to develop a WEB application with Python and Flask ②
Three things I was addicted to when using Python and MySQL with Docker
The story of making a web application that records extensive reading with Django
I want to create a web application that uses League of Legends data ①
I set up TensowFlow and was addicted to it, so make a note
(Note) A web application that uses TensorFlow to infer recommended song names [Create an execution environment with docker-compose]
A story that was convenient when I tried using the python ip address module
(Python) Try to develop a web application using Django
I tried to score the syntax that was too humorous and humorous using the COTOHA API.
I was addicted to scraping with Selenium (+ Python) in 2020
(Note) A web application that uses TensorFlow to infer recommended song names [Machine learning]
I made a web application that maps IT event information with Vue and Flask
A memo that I touched the Datastore with python
It's been a year since I was self-taught and moved to the web application development department, so I look back
Note that there was a version problem with networkx
What I was addicted to when using Python tornado
A story that I wanted to display the division result (%) on HTML with an application using django [Beginner learns python with a reference book in one hand]
A story that I wanted to realize the identification of parking lot fullness information using images obtained with a Web camera and Raspberry Pi and deep learning.
I tried using a library (common thread) that makes Python's threading package easier to use
What I was addicted to when dealing with huge files in a Linux 32bit environment
I tried to make a motion detection surveillance camera with OpenCV using a WEB camera with Raspberry Pi
The story I was addicted to when I specified nil as a function argument in Go
[IOS] GIF animation with Pythonista3. I was addicted to it.
I was able to implement web app authentication with flask-login
The first step to creating a serverless application with Zappa
What I was addicted to when I built my own neural network using the weights and biases I got with scikit-learn's MLP Classifier.
[Python] I tried to make a simple program that works on the command line using argparse.
A story that didn't work when I tried to log in with the Python requests module
I tried to learn the sin function with chainer
The first algorithm to learn with Python: FizzBuzz problem
I was able to implement web app authentication with flask-login
I want to change the Japanese flag to the Palau flag with Numpy
Note that I was addicted to accessing the DB with Python's mysql.connector using a web application.
I tried to predict by letting RNN learn the sine wave
(Machine learning) I tried to understand the EM algorithm in a mixed Gaussian distribution carefully with implementation.
What I was addicted to with json.dumps in Python base64 encoding
[Python] A memo that I tried to get started with asyncio
[Introduction to StyleGAN] I played with "The Life of a Man" ♬
I tried to make a 2channel post notification application with Python
I wanted to solve the ABC164 A ~ D problem with Python
The road to web application development is a long way off
I made a program that automatically calculates the zodiac with tkinter
[python] A note that started to understand the behavior of matplotlib.pyplot
I made a web application that graphs the life log recorded on Google Home like a Gantt chart.
Creating a web application using Flask ②
[Python] When I tried to make a decompression tool with a zip file I just knew, I was addicted to sys.exit ()
Build a web application with Django