How to Host a MySQL Server on Linux
In this video I will be showing how to host a MySQL server on a linux server. This involves downloading and installing MySQL on the linux server and configuring it so that it can be connected to remotely. In the last parts of the video I will demonstrate how to connect to the server from python code.
Thanks to linode for sponsoring this video! Take advantage of a free $20 credit towards a linode with the code "TWT19".
https://linode.com/techwithtim
Download Putty: https://www.putty.org
Playlist: https://www.youtube.com/watch?v=3vsC05rxZ8c&list=PLzMcBGfZo4-l5kVSNVKGO60V6RkXAVtp-
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.
◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
https://tech-with-tim.teachable.com/p...
📸 Instagram: https://www.instagram.com/tech_with_tim
🌎 Website https://techwithtim.net
📱 Twitter: https://twitter.com/TechWithTimm
⭐ Discord: https://discord.gg/pr2k55t
📝 LinkedIn: https://www.linkedin.com/in/tim-rusci...
📂 GitHub: https://github.com/techwithtim
🔊 Podcast: https://anchor.fm/tech-with-tim
💵 One-Time Donations: https://www.paypal.com/donate/?token=...
💰 Patreon: https://www.patreon.com/techwithtim
◾◾◾◾◾◾
⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
Tags:
- Tech With Tim
- Python Tutorials
- MySQL Tutorial
- How to host a MySQL server on linux
- Host mysql server on linux
- Linux install mysql
- Remote connection to mysql
#Python #MySQL #MySQLLinuxServer
-
7:54
Tech With Tim
8 months ago $0.01 earnedThese 7 Coding Skills Give You an UNFAIR Advantage
189 -
53:04
Athlete & Artist Show
8 days ago $0.02 earnedS4E7: STANLEY CUP FINALS, DRAFT & FREE AGENCY
17.4K3 -
1:16:19
Russell Brand
6 hours agoTHEY’RE CENSORING VACCINE HARM DATA | Dr Dave Martin EXPOSES Big Pharma Manipulation - SF 403
142K222 -
20:00
Lou Dobbs
4 hours agoThe Great America Show 7-9-24 - GOP - The Party of Compromise
24.1K7 -
2:20:51
Barstool Yak
5 hours agoThe Yak with Big Cat & Co. Presented by Rhoback | The Yak 7-9-24
29.1K2 -
1:19:33
China Uncensored
4 hours agoPODCAST 260 We Only Have 2 Years to Stop China’s Invasion with Matt Pottinger
16.3K2 -
2:57:30
The Charlie Kirk Show
4 hours agoEurope Election Lessons + Nebraska's Time + Biden Or Bust? | Baris, Miller, Sinclair, Allen
84.3K34 -
1:31:47
vivafrei
5 hours agoBiden Reassures Democrats He's Not Demented! False Flag in Ukraine? Baldwin Trial to Begin & MORE?
68.5K130 -
2:25:40
The Shannon Joy Show
5 hours ago🔥🔥Trump & GOP Secure The ‘Pimps & Hos’ Demo With SlutWalk Founder Amber Rose Endorsement & Speaker Gig At 2024 Convention!🔥🔥
29.7K27 -
1:26:33
TheAlecLaceShow
5 hours agoPress Room Pressure | Jill Campaigns | Chicago Massacre | Guest: Ryan Matta | The Alec Lace Show
19.3K6