MySQL/README.md

31 lines
952 B
Markdown
Raw Permalink Normal View History

2021-07-08 04:45:21 +00:00
# MySQL
2021-07-08 04:45:10 +00:00
2021-07-08 04:45:21 +00:00
Heyo is a Hello World for MySQL
***
2022-02-18 21:08:15 +00:00
MySQL Filetypes | .sql | .cvs
2021-07-08 04:45:21 +00:00
2022-02-18 21:08:15 +00:00
## Install
```bash
sudo apt install mysql-server -y
2021-07-08 04:45:21 +00:00
```
2022-02-18 21:08:15 +00:00
## IMPORTANT
The default install of MySQL on Ubuntu/Debain are NOT super secure... Yes the ip.port is blocked to local connections by default but if your SSH get pops any user with sudo can have root to your mysql as well... so to fix that run this command. You may want to lock mysql down AFTER you've configed mysql for your projects needs.
```bash
2021-07-08 04:45:21 +00:00
sudo mysql_sercure_installation
```
### Enable remote connections
Perfect for managing databases remotely, enable mysql on the firewall `ufw allow mysql` and then alter `sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf` and alter
```
. . .
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0
. . .
```