zoukankan      html  css  js  c++  java
  • Mac上安装mariadb

    1、查看mariadb包信息

    # brew info mariadb
    
    mariadb: stable 10.2.6 (bottled)
    Drop-in replacement for MySQL
    https://mariadb.org/
    Conflicts with: mariadb-connector-c, mysql, mysql-cluster, mysql-connector-c, mytop, percona-server
    /usr/local/Cellar/mariadb/10.1.23 (594 files, 155.5MB) *
      Poured from bottle on 2017-05-14 at 17:49:24
    From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mariadb.rb
    ==> Dependencies
    Build: cmake ✔
    Required: openssl ✔
    ==> Options
    --with-archive-storage-engine
    	Compile with the ARCHIVE storage engine enabled
    --with-bench
    	Keep benchmark app when installing
    --with-blackhole-storage-engine
    	Compile with the BLACKHOLE storage engine enabled
    --with-embedded
    	Build the embedded server
    --with-libedit
    	Compile with editline wrapper instead of readline
    --with-local-infile
    	Build with local infile loading support
    --with-test
    	Keep test when installing
    ==> 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
    

    2、安装mariadb

    # brew install mariadb
    

    3、运行Installer

    # unset TMPDIR
    # cd /usr/local/Cellar/mariadb/10.1.23/
    # mysql_install_db
    

    4、启动服务(包信息中有说明如何启动)

    后台启动,并且开机自启动
    # brew services start mariadb
    ==> Tapping homebrew/services
    Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'...
    remote: Counting objects: 10, done.
    remote: Compressing objects: 100% (7/7), done.
    remote: Total 10 (delta 0), reused 5 (delta 0), pack-reused 0
    Unpacking objects: 100% (10/10), done.
    Tapped 0 formulae (37 files, 51.1KB)
    ==> Successfully started `mariadb` (label: homebrew.mxcl.mariadb)
    
    前台启动
    # mysql.server start
    Starting MySQL
    .170529 21:36:17 mysqld_safe Logging to '/usr/local/var/mysql/bogon.err'.
    170529 21:36:17 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
     SUCCESS!
    

    5、Secure the Installation

    # mysql_secure_installation
    

    6、查看版本

    # mysql -uroot -p
    MariaDB [(none)]> select @@version;
    +-----------------+
    | @@version       |
    +-----------------+
    | 10.1.23-MariaDB |
    +-----------------+
    1 row in set (0.00 sec)
    
  • 相关阅读:
    centos 挂载u盘
    如何将网站部署到tomcat根目录下
    seo工具
    mysql 1045 access denied for user********
    div 自适应宽度
    mysql 日志提示 is marked as crashed and should be repaired
    css overflow:hidden无效解决办法
    java 调用 .net webservice
    Java开发笔记(十五)短路逻辑运算的优势
    Java开发笔记(十四)几种运算符的优先级顺序
  • 原文地址:https://www.cnblogs.com/keithtt/p/6919168.html
Copyright © 2011-2022 走看看