Files
DevOps/Linux/MySQL.md
2025-10-03 12:02:54 +02:00

2.0 KiB

Linux connab

MySQL

How To Install MySQL on Ubuntu 24.04

Install MySQL

MySQL Commands Cheat Sheet

MySQL Cheat Sheet

Install with apt

  • sudo apt update
  • sudo apt install mysql-server
  • sudo systemctl start mysql.service
  • secure your installation by running sudo mysql_secure_installation

Start, stop, restart server

  • sudo systemctl start mysql
  • sudo systemctl stop mysql
  • sudo systemctl restart mysql

Start, Stop, Restart MySQL

How to Change MySQL Password Policy Level

MySQL Password Policy

Show password settings

SHOW VARIABLES LIKE 'validate_password%';

Set password policy

SET GLOBAL validate_password.policy=LOW;

How to Find the MYSQL Configuration File "my.cnf".

my.cnf

How to Allow MySQL Remote Access Securely (2025 Guide)

How to Allow MySQL Remote Access Securely (2025 Guide)

Grant permissions

Not Allowed to Create User with GRANT

Not allowed to GRANT

How to create MySQL admin user (superuser) account

Create MySQL admin user

List users

Use the following command to list users with their plugins:

SELECT USER,plugin FROM mysql.user; SELECT USER,plugin,host,ssl_type FROM mysql.user; SELECT USER,plugin,host FROM mysql.user;

How do I turn off the mysql password validation?

Disable MySQL password validation

MySQL Show User Privileges

MySQL Show User Privileges