安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Max-MacBook-Pro:~ Max$ brew install mariadb ==> Downloading https://homebrew.bintray.com/bottles/mariadb-10.2.7_1.sierra.bot ######################################################################## 100.0% ==> Pouring mariadb-10.2.7_1.sierra.bottle.tar.gz ==> Using the sandbox ==> /usr/local/Cellar/mariadb/10.2.7_1/bin/mysql_install_db --verbose --user=Max ==> Caveats A "/etc/my.cnf" from another install may interfere with a Homebrew-built server starting up correctly. MySQL is configured to only allow connections from localhost by default To connect: mysql -uroot To have launchd start mariadb now and restart at login: brew services start mariadb Or, if you don't want/need a background service you can just run: mysql.server start ==> Summary 🍺 /usr/local/Cellar/mariadb/10.2.7_1: 623 files, 162.2MB |
手动启动
|
Max-MacBook-Pro:~ Max$ mysql.server start Starting MySQL .170729 10:12:17 mysqld_safe Logging to '/usr/local/var/mysql/Max-MacBook-Pro.local.err'. 170729 10:12:17 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql SUCCESS! |
连接数据库
|
Max-MacBook-Pro:~ Max$ mysql -uroot Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 9 Server version: 10.2.7-MariaDB Homebrew Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. |
执行命令:
[crayon-5c71cb16b7133067[……]
Read more