1.7 KiB
1.7 KiB
Installer mysql
Installation:
$ brew update
$ brew install mariadb
$ brew services start mariadb
/usr/local/Cellar/mariadb/10.2.11
Arrêter MySQL:
$ brew services stop mariadb
Démarrer MySQL:
$ brew services start mariadb
ou
$ mysql.server start
Fix the 2002 MySQL Socket error:
$ sudo mkdir /var/mysql
$ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
Version:
$ mysql -v -u root -p
Après une m-à-j:
arrêter puis démarrer
Erreurs:
$ mysql -v -u root -p
mysql: Can't read dir of '/usr/local/etc/my.cnf.d' (Errcode: 2 "No such file or directory")
Fatal error in defaults handling. Program aborted
Le répertoire /usr/local/etc/my.cnf.d n'existe plus, il faut le recréer et y créer un fichier:
$ mkdir /usr/local/etc/my.cnf.d
$ touch wont_prune.txt
Bases:
Les bases sont stockées ici: /usr/local/var/mysql
Liens:
:fa-link: https://coolestguidesontheplanet.com/how-to-change-the-mysql-root-password/