[Tech With Tim] How to Host a MySQL Server on Linux






*** Python에서 MySql과 Sql 사용하기 5

- Hosting a MySQL Server on a Linux


*** Download Putty: https://www.putty.org

*** Process and Linux Commands
Once you have logged into the linux server run the following:


sudo apt-get install mysql-server sudo mysql_secure_installation utility sudo ufw enable # allows remote access sudo ufw allow mysql sudo systemctl start mysql sudo systemctl enable mysql cd to /etc/mysql/mysql.conf.d/mysqld.cnf change bind to 0.0.0.0 sudo systemctl restart mysql # restart mysql Now obtain your PUBLIC IPV4 Address from the machine you want to connect with. mysql -u root -p create database Test Get ip address GRANT ALL ON fooDatabase.* TO fooUser@'PUBLIC IPV4 ADDRESS' IDENTIFIED BY 'some password' Then you can connect to the linux servers ip address as the host attribute for the MySQL connection. Use the username you set in the last command and the password.

댓글

이 블로그의 인기 게시물

[이수안컴퓨터연구소] 파이썬 레이싱 자동차 게임 만들기 Creating a Python Racing Car Game with pygame (한글자막)

[빵형의 개발도상국] 얼굴 인식 알고리즘 성능 비교 - Python, Deep Learning