How to Host a MySQL Server on Linux

  Рет қаралды 68,193

Tech With Tim

Tech With Tim

4 жыл бұрын

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".
linode.com/techwithtim
Download Putty: www.putty.org
Playlist: • Python MySQL Tutorial ...
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
tech-with-tim.teachable.com/p...
📸 Instagram: / tech_with_tim
🌎 Website techwithtim.net
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-rusci. .
📂 GitHub: github.com/techwithtim
🔊 Podcast: anchor.fm/tech-with-tim
💵 One-Time Donations: www.paypal.com/donate/?token=...
💰 Patreon: / 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

Пікірлер: 73
@Star-zf8su
@Star-zf8su 4 жыл бұрын
Really really!!! Thanks a lot........You are helping us a lot by providing so much nicely explained lessons.......... I Finally learned how to connect to database with Python 😀😀
@ethiclesshacker
@ethiclesshacker 4 жыл бұрын
I was going to begin with sql and python and this entire series just helped me a lot. Thanks!
@pedr9vskcray2102
@pedr9vskcray2102 2 ай бұрын
the sheer quality of this videos is just amazing, i've watched you entire series and its 100% the best material on youtube on python/sql subject, good job
@nunogomes1663
@nunogomes1663 3 жыл бұрын
Thanks, been looking for theses for three days
@ElliyahuRosha
@ElliyahuRosha 4 жыл бұрын
Yesterday I too the day to learn SQL, and today I went all over this playlist. This was just perfect for me, I'm good to go :) Elliyahu from Jerusalem
@lucasayala1125
@lucasayala1125 4 жыл бұрын
Thank you Tim! Awsome playlist
@brandonthomas7698
@brandonthomas7698 3 жыл бұрын
Thanks so much. Helps a ton!
@aryanbhatia6992
@aryanbhatia6992 4 жыл бұрын
Great video as always :)
@mryarut
@mryarut 2 жыл бұрын
sick video man! learned a ton, however how could I use this for an app for example as everytime I download the app on a new device the IP that tries to acces the database obviously changes? Thanks!
@AungWinHtutGH
@AungWinHtutGH 6 ай бұрын
Clear explanation. Thank you so much
@Max-oj9tp
@Max-oj9tp 4 жыл бұрын
Great series!
@TechWithTim
@TechWithTim 4 жыл бұрын
Thanks :)
@quiupu07
@quiupu07 2 жыл бұрын
Unable to locate package mysql-server this will help sudo apt-get update
@suyashvashishtha4904
@suyashvashishtha4904 4 жыл бұрын
hey tim can you make a video on how to link Mysql and Kivy. it will be great ... pleaseeee
@jackaxel1430
@jackaxel1430 4 жыл бұрын
Tim would you please do some videos about Business intelligence project , like with Microsoft sql server , big up Bro
@lowgn9251
@lowgn9251 Жыл бұрын
Great !! Thanks a lot
@gabenfanboy7471
@gabenfanboy7471 Жыл бұрын
when you already prepared your pi for the video and start panicing a little when he mentions the website
@hareeshch
@hareeshch 4 жыл бұрын
while running the command 'mysql -u root -p' if you get the error 'ERROR 1698 (28000): Access denied for user 'root'@'localhost'' trying running using a sudo like 'sudo mysql -u root -p'
@akutGame
@akutGame Жыл бұрын
But why does he have a root user with pwsd? Im so stupid... I get the error: ... Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.
@sergdonskikh2140
@sergdonskikh2140 4 жыл бұрын
Good day! can use windows operating system or only under linux?
@dennisasamoah2213
@dennisasamoah2213 4 жыл бұрын
great stuff
@thefsquad7787
@thefsquad7787 3 жыл бұрын
For peaple that get error's do this CREATE user 'YOURUSERNAME'@'YOURHOST' IDENTIFIED BY 'YOURPASSWORD'; GRANT ALL ON YOURDATABASE.* TO 'YOURUSERNAME'@'YOURHOST; ----------------- Example-> CREATE user 'test'@'localhost' IDENTIFIED BY 'password12345'; GRANT ALL ON animaldatabase.* TO 'test'@'localhost;
@dabbopabblo
@dabbopabblo 2 жыл бұрын
dont go out of your way to download putty just for a simple ssh connection if your using linode, the web console is terrible but you can just copy and past the ssh command they give you into the windows cmd and instantly have access (after putting your password in ofc)
@pureperoni
@pureperoni Жыл бұрын
agreed i did not download putty!
@AKHILKumar-kh8rz
@AKHILKumar-kh8rz 4 жыл бұрын
Tim bro. Do kali linux tutorials
@justicegugu9775
@justicegugu9775 4 жыл бұрын
Do you have a video for python ?
@sainco3036
@sainco3036 4 жыл бұрын
thanks.
@alphaO27
@alphaO27 3 жыл бұрын
Is it possible to host the database on our PC having Ubuntu OS ?
@epicfuturehouse
@epicfuturehouse 2 жыл бұрын
If you have the error of not being able to access your VServer with SSH again, then execute this command: sudo ufw allow ssh you have to allow ssh connections to the firewall that is set up in this tutorial
@pureperoni
@pureperoni Жыл бұрын
i have literally just stopped at that point in the video and thought 'this is a bad idea im gonna get locked out of my sever' :/
2 жыл бұрын
Bro a question, (13:33) , u said to input the ip of the machine from where we want to connect to the server, what if i dont want to lock the login to a unique ip ?
@TheSkux69
@TheSkux69 2 ай бұрын
Use 'user_name'@'%' which uses the wildcard, but becareful because this increases your attack surface.
@michealhall7776
@michealhall7776 4 жыл бұрын
Thanks Tim you are the man. I'm thinking about making KZbin videos do you have a email I'd like to ask you a few questions about marketing a channel
@shamaelangel7212
@shamaelangel7212 2 жыл бұрын
muchas gracias ¡¡
@hackwithprogramming7849
@hackwithprogramming7849 Жыл бұрын
that firewall will create an issu for u again if u try to connected it from ssh i dont know why
@soisauce364
@soisauce364 3 жыл бұрын
can you do with other platforms except for linode :D
@blisard2648
@blisard2648 4 жыл бұрын
If you already have a database set up, can you use that database on the linux server?
@blisard2648
@blisard2648 4 жыл бұрын
is it just a matter of instead of creating a new database, just putting - database = "already_created_database" in the python code when setting up a connection?
@TheAmazingpower
@TheAmazingpower 4 жыл бұрын
Is it possible to use a own server like a raspberry pi for this and using then the similar setup?
@taruneshsathish6546
@taruneshsathish6546 4 жыл бұрын
not possible it uses mariadb
@blakehudson4551
@blakehudson4551 2 жыл бұрын
You can install a Ubuntu server on a raspberrypi no problem and ssh in through your local network to mimic this tutorial.
@alexalbon8274
@alexalbon8274 3 жыл бұрын
you are a god
@nathanforrest7310
@nathanforrest7310 4 жыл бұрын
write ur own cnc and make a mirai botnet
@LeleGaming123
@LeleGaming123 3 жыл бұрын
hey man...after i do ufw enable, the firewall is enabled and i cant ssh to the remote system anymore, i have logged off... now its giving me a headache...from what i gathered, i need a direct connection to straighten this out, any thoughts?
@thelemonman2271
@thelemonman2271 3 жыл бұрын
You may have already solved this, but in case any else has the same issue running ' sudo ufw allow ssh ' after enabling the firewall resolve this.
@iniyan7966
@iniyan7966 2 жыл бұрын
Dude, have you found any solutions for this? I'm also stuck at this! please reply
@krsingh.shubham
@krsingh.shubham 4 жыл бұрын
next video very fast please
@dpthew
@dpthew 2 жыл бұрын
Everything worked great until GRANT ALL ON test.* etc... I get error 1064 although I did everything exactly like in the video, any ideas why?
@jamieabw4517
@jamieabw4517 Жыл бұрын
did you ever find a solution
@lock5299
@lock5299 11 ай бұрын
Try running this instead - it worked for me. CREATE USER 'username'@'ip address' IDENTIFIED BY 'your password'; GRANT ALL ON test.* TO 'username'@'ip address';
@davidbaker5932
@davidbaker5932 2 жыл бұрын
Enabling the firewall without first allowing the SSH port locked me out of my own droplet when I tried to log in again after this tutorial.
@iniyan7966
@iniyan7966 2 жыл бұрын
Dude, have you found any solutions for this? I'm also stuck at this!
@pureperoni
@pureperoni Жыл бұрын
@@iniyan7966 this video is bad i cant believe he has done this! i was about to do this with a sever that contains a load of my website information and data :/
@princeonagwa2750
@princeonagwa2750 10 ай бұрын
can i do this on a pc🤨
@hanhvo2495
@hanhvo2495 3 жыл бұрын
what is the purpose of hosting a sql server on linux?
@ShivamSharma-kv1yd
@ShivamSharma-kv1yd 10 ай бұрын
Make API which may provide JSON output. JSON is supported by many languages unlike sql database. Hosting SQL online keep SQL active and API ready to use. The basic necessities for automation. Hope this answers
@ShivamSharma-kv1yd
@ShivamSharma-kv1yd 10 ай бұрын
Also you get static public IP. same IP you configure once across multiple applications. Home n/w offers DHCP and making that static and publically available is not always possible because it relies on your ISP.
@sebase1161
@sebase1161 2 жыл бұрын
... Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters. can somone help me
@captainfaceroll5868
@captainfaceroll5868 2 жыл бұрын
Did you find an answer to this?
@sebase1161
@sebase1161 2 жыл бұрын
No I sadly did not…
@SystemsAdventure
@SystemsAdventure 2 жыл бұрын
@@sebase1161 i am in the same situation :(
@SystemsAdventure
@SystemsAdventure 2 жыл бұрын
i made this and it works sudo mysql ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'pasword';
@ytehagiang
@ytehagiang 3 жыл бұрын
i can't access
@prestonwallitsch8636
@prestonwallitsch8636 3 жыл бұрын
I converted an old computer into a Linux server.
@Alphabet_-_
@Alphabet_-_ 4 жыл бұрын
@etakoma7400
@etakoma7400 4 жыл бұрын
first
Python MySQL Tutorial - Foreign Keys & Relating Tables
16:57
Tech With Tim
Рет қаралды 80 М.
The NGINX Crash Course
50:53
Laith Academy
Рет қаралды 480 М.
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 10 МЛН
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 8 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 114 МЛН
Ubuntu Server: Getting started with a Linux Server
1:09:33
Byte My Pi
Рет қаралды 527 М.
Top 10 Linux Job Interview Questions
16:04
tutoriaLinux
Рет қаралды 2,3 МЛН
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 109 М.
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,5 МЛН
Your Old PC is Your New Server
11:07
Linus Tech Tips
Рет қаралды 6 МЛН
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 346 М.
NGINX Linux Server | Common Configurations
17:28
Akamai Developer
Рет қаралды 174 М.
The Truth About Learning Python in 2024
13:05
Tech With Tim
Рет қаралды 43 М.
How To Practice Programming So You Actually Get Good
15:46
Tech With Tim
Рет қаралды 108 М.
Home Server Setup - Turn your old PC into a useful home server
23:55
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 10 МЛН