How to Host a MySQL Server on Linux

preview_player
Показать описание
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".

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
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

◾◾◾◾◾◾

⚡ 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
Рекомендации по теме
Комментарии
Автор

Really really!!! Thanks a are helping us a lot by providing so much nicely explained I Finally learned how to connect to database with Python 😀😀

Star-zfsu
Автор

I was going to begin with sql and python and this entire series just helped me a lot. Thanks!

ethiclesshacker
Автор

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

pedrvskcray
Автор

Thanks, been looking for theses for three days

nunogomes
Автор

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

ElliyahuRosha
Автор

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!

mryarut
Автор

Unable to locate package mysql-server

this will help
sudo apt-get update

quiupu
Автор

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'

hareeshch
Автор

Good day!

can use windows operating system or only under linux?

sergdonskikh
Автор

hey tim can you make a video on how to link Mysql and Kivy. it will be great ... pleaseeee

suyashvashishtha
Автор

Tim would you please do some videos about Business intelligence project, like with Microsoft sql server, big up Bro

jackaxel
Автор

Is it possible to host the database on our PC having Ubuntu OS ?

alphaO
Автор

that firewall will create an issu for u again if u try to connected it from ssh i dont know why

hackwithprogramming
Автор

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.

akutGame
Автор

can you do with other platforms except for linode :D

soisauce
Автор

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 ?

Автор

If you already have a database set up, can you use that database on the linux server?

blisard
Автор

when you already prepared your pi for the video and start panicing a little when he mentions the website

gabenfanboy
Автор

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?

LeleGaming
Автор

Is it possible to use a own server like a raspberry pi for this and using then the similar setup?

TheAmazingpower
join shbcf.ru