Shortcuts: MySQL Commands to Help You in Development

Shortcuts: MySQL Commands to Help You in Development Foto: Imagem Reprodução: Pexels - Christina Morillo

Check out some commands that can help you develop your website or store project using the MySQL database.

1) To install the MySQL database on your Ubuntu/Debian computer, run the following command:

sudo apt install default-mysql-server

2) To pause the MySQL database in the background of your Ubuntu/Debian

sudo systemctl stop mysql.service

3) To connect to your MySQL database

mysql -h 127.0.0.1 -u loginprojeto -p senhaprojeto

This Login and Password are information that was created from your MySQL

4) The same example above but passing port parameters

mysql -h 127.0.0.1 --port=3389 -u loginprojeto -p senhaprojeto

5) The same command above but passing the disabled ssl parameter

mysql -h 127.0.0.1 -u loginprojeto -p senhaprojeto --ssl-mode=DISABLED

6) The same command above but passing the ssl disabled parameter

mysql -h 127.0.0.1 --port=3389 -u loginprojeto -p senhaprojeto --ssl-mode=DISABLED

7) With the your-bank.sql file in the project root, run the following command

source <caminho_arquivo.sql>

I hope these tips helped you, see you next time.