Тёмный

How to Host a MySQL Server on Linux 

Tech With Tim
Подписаться 1,5 млн
Просмотров 68 тыс.
50% 1

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

Опубликовано:

 

10 окт 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 73   
@ethiclesshacker
@ethiclesshacker 4 года назад
I was going to begin with sql and python and this entire series just helped me a lot. Thanks!
@pedr9vskcray2102
@pedr9vskcray2102 Месяц назад
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
@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 😀😀
@nunogomes1663
@nunogomes1663 3 года назад
Thanks, been looking for theses for three days
@lucasayala1125
@lucasayala1125 4 года назад
Thank you Tim! Awsome playlist
@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
@aryanbhatia6992
@aryanbhatia6992 4 года назад
Great video as always :)
@brandonthomas7698
@brandonthomas7698 3 года назад
Thanks so much. Helps a ton!
@AungWinHtutGH
@AungWinHtutGH 6 месяцев назад
Clear explanation. Thank you so much
@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!
@Max-oj9tp
@Max-oj9tp 4 года назад
Great series!
@TechWithTim
@TechWithTim 4 года назад
Thanks :)
@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'
@quiupu07
@quiupu07 2 года назад
Unable to locate package mysql-server this will help sudo apt-get update
@sergdonskikh2140
@sergdonskikh2140 4 года назад
Good day! can use windows operating system or only under linux?
@alphaO27
@alphaO27 3 года назад
Is it possible to host the database on our PC having Ubuntu OS ?
@justicegugu9775
@justicegugu9775 4 года назад
Do you have a video for python ?
@suyashvashishtha4904
@suyashvashishtha4904 4 года назад
hey tim can you make a video on how to link Mysql and Kivy. it will be great ... pleaseeee
@lowgn9251
@lowgn9251 Год назад
Great !! Thanks a lot
@dennisasamoah2213
@dennisasamoah2213 4 года назад
great stuff
@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.
@jackaxel1430
@jackaxel1430 4 года назад
Tim would you please do some videos about Business intelligence project , like with Microsoft sql server , big up Bro
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 Месяц назад
Use 'user_name'@'%' which uses the wildcard, but becareful because this increases your attack surface.
@soisauce364
@soisauce364 3 года назад
can you do with other platforms except for linode :D
@hackwithprogramming7849
@hackwithprogramming7849 Год назад
that firewall will create an issu for u again if u try to connected it from ssh i dont know why
@alexalbon8274
@alexalbon8274 3 года назад
you are a god
@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?
@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
@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.
@gabenfanboy7471
@gabenfanboy7471 Год назад
when you already prepared your pi for the video and start panicing a little when he mentions the website
@michealhall7776
@michealhall7776 4 года назад
Thanks Tim you are the man. I'm thinking about making RU-vid videos do you have a email I'd like to ask you a few questions about marketing a channel
@dpthew
@dpthew Год назад
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';
@AKHILKumar-kh8rz
@AKHILKumar-kh8rz 4 года назад
Tim bro. Do kali linux tutorials
@shamaelangel7212
@shamaelangel7212 2 года назад
muchas gracias ¡¡
@sainco3036
@sainco3036 4 года назад
thanks.
@princeonagwa2750
@princeonagwa2750 9 месяцев назад
can i do this on a pc🤨
@ytehagiang
@ytehagiang 3 года назад
i can't access
@nathanforrest7310
@nathanforrest7310 4 года назад
write ur own cnc and make a mirai botnet
@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';
@krsingh.shubham
@krsingh.shubham 4 года назад
next video very fast please
@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 :/
@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.
@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!
@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;
@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' :/
@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
Your Old PC is Your New Server
11:07
Просмотров 6 млн
Install a webserver on Linux in 15 minutes
19:44
Просмотров 84 тыс.
FastAPI, Flask or Django - Which Should You Use?
9:49
OpenSSH for Absolute Beginners
23:00
Просмотров 102 тыс.
Ubuntu Server: Getting started with a Linux Server
1:09:33
Top 10 Linux Job Interview Questions
16:04
Просмотров 2,3 млн