Files
DevOps/Database/MySQL/MySQL.md
2025-10-19 13:20:58 +02:00

66 lines
2.0 KiB
Markdown

Linux connab
# MySQL
## How To Install MySQL on Ubuntu 24.04
[Install MySQL](https://linuxgenie.net/install-mysql-ubuntu-24-04/)
## MySQL Commands Cheat Sheet
[MySQL Cheat Sheet](https://phoenixnap.com/kb/mysql-commands-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](https://www.mysqltutorial.org/mysql-administration/stop-mysql/)
## How to Change MySQL Password Policy Level
[MySQL Password Policy](https://tecadmin.net/change-mysql-password-policy-level/)
### 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](https://www.geeksforgeeks.org/linux-unix/how-to-find-the-mysql-configuration-file-my-cnf/)
## How to Allow MySQL Remote Access Securely (2025 Guide)
[How to Allow MySQL Remote Access Securely (2025 Guide)](https://www.digitalocean.com/community/tutorials/how-to-allow-remote-access-to-mysql)
## Grant permissions
### Not Allowed to Create User with GRANT
[Not allowed to GRANT](https://askubuntu.com/questions/1322175/not-allowed-to-create-user-with-grant)
## How to create MySQL admin user (superuser) account
[Create MySQL admin user](https://www.cyberciti.biz/faq/how-to-create-mysql-admin-user-superuser-account/)
### 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](https://stackoverflow.com/questions/36301100/how-do-i-turn-off-the-mysql-password-validation)
### MySQL Show User Privileges
[MySQL Show User Privileges](https://phoenixnap.com/kb/mysql-show-user-privileges)