MySQL Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 10: Line 10:
SELECT VERSION();
SELECT VERSION();
</syntaxhighlight>
</syntaxhighlight>
=Layout=
==Linux==
==Mac==
<font size=-2>
  /opt
  └── brew
      ├── Cellar
      │    └── mariadb
      │          └── 11.2.2
      │              └── ...
      ├── etc
      │    ├── my.cnf
      │    └── my.cnf.d
      │        └──  ...
      ├── opt
      │    └── mariadb
      │        └──  bin
      │              └──  mysqld_safe
      └── var
            └── mysql
                └──  ...
</font>


=Logs=
=Logs=

Revision as of 03:46, 25 December 2023

Internal

Version

Connect to the database then execute:

SELECT VERSION();

Layout

Linux

Mac

 /opt
 └── brew
      ├── Cellar
      │     └── mariadb
      │          └── 11.2.2
      │               └── ...
      ├── etc
      │    ├── my.cnf
      │    └── my.cnf.d
      │         └──  ...
      ├── opt
      │    └── mariadb
      │        └──  bin
      │              └──  mysqld_safe
      └── var
           └── mysql
                └──  ...

Logs

/var/log/mariadb/

/var/log/mysql/

Data Directory

/var/lib/mysql

Runtime Directory

/var/run/mariadb

Configuration File

https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#default-option-file-locations-on-linux-unix-mac

Default location:

/etc/my.cnf

Change Root Password

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h now510.local password 'new-password'

Command Line Client

mysql Command Line Client

Subjects