MySQL Operations: Difference between revisions
Jump to navigation
Jump to search
(→Mac) |
No edit summary |
||
Line 12: | Line 12: | ||
=Layout= | =Layout= | ||
==Linux== | ==Linux== | ||
===Logs=== | |||
<tt>/var/log/mariadb/</tt> | |||
<tt>/var/log/mysql/</tt> | |||
===Data Directory=== | |||
<tt>/var/lib/mysql</tt> | |||
===Runtime Directory=== | |||
<tt>/var/run/mariadb</tt> | |||
=Configuration File= | |||
{{External|https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#default-option-file-locations-on-linux-unix-mac}} | |||
Default location: | |||
/etc/my.cnf | |||
==Mac== | ==Mac== | ||
<font size=-2> | <font size=-2> | ||
Line 32: | Line 50: | ||
└── ... | └── ... | ||
</font> | </font> | ||
=Change Root Password= | =Change Root Password= |
Revision as of 03:47, 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 └── ...
Change Root Password
/usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h now510.local password 'new-password'