MySQL Operations: Difference between revisions
Jump to navigation
Jump to search
Line 51: | Line 51: | ||
=Change Root Password= | =Change Root Password= | ||
< | <syntaxhighlight lang='bash'> | ||
/usr/bin/mysqladmin -u root password 'new-password' | /usr/bin/mysqladmin -u root password 'new-password' | ||
/usr/bin/mysqladmin -u root -h now510.local password 'new-password' | /usr/bin/mysqladmin -u root -h now510.local password 'new-password' | ||
</ | </syntaxhighlight> | ||
Useful: https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password | |||
=Command Line Client= | =Command Line Client= |
Latest revision as of 04:31, 25 December 2023
Internal
Version
Connect to the database then execute:
SELECT VERSION();
Layout
Linux
Logs
/var/log/mariadb/
/var/log/mysql/
Data Directory
/var/lib/mysql
Runtime Directory
/var/run/mariadb
Configuration File
Default location: /etc/my.cnf
Mac
/opt └── brew ├── Cellar │ └── mariadb │ └── 11.2.2 │ └── ... ├── etc │ ├── my.cnf │ └── my.cnf.d │ └── ... ├── opt │ └── mariadb │ └── bin │ └── mysqld_safe └── var └── mysql # Data directory └── ...
Change Root Password
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h now510.local password 'new-password'
Useful: https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password