美文网首页
brew安装mysql

brew安装mysql

作者: OK2018 | 来源:发表于2018-12-15 16:27 被阅读0次

    brew install mysql

    mysql.server start

    mysql_secure_installation

    
    mysql_secure_installation: [ERROR] unknown variable 'default-character-set=utf8'
    
    Securing the MySQL server deployment.
    
    Connecting to MySQL using a blank password.
    
    VALIDATE PASSWORD COMPONENT can be used to test passwords
    and improve security. It checks the strength of password
    and allows the users to set only those passwords which are
    secure enough. Would you like to setup VALIDATE PASSWORD component?
    
    Press y|Y for Yes, any other key for No: N
    Please set the password for root here.
    
    New password: 
    
    Re-enter new password: 
    By default, a MySQL installation has an anonymous user,
    allowing anyone to log into MySQL without having to have
    a user account created for them. This is intended only for
    testing, and to make the installation go a bit smoother.
    You should remove them before moving into a production
    environment.
    
    Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
    Success.
    
    
    Normally, root should only be allowed to connect from
    'localhost'. This ensures that someone cannot guess at
    the root password from the network.
    
    Disallow root login remotely? (Press y|Y for Yes, any other key for No) : N
    
     ... skipping.
    By default, MySQL comes with a database named 'test' that
    anyone can access. This is also intended only for testing,
    and should be removed before moving into a production
    environment.
    
    
    Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
     - Dropping test database...
    Success.
    
     - Removing privileges on test database...
    Success.
    
    Reloading the privilege tables will ensure that all changes
    made so far will take effect immediately.
    
    Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
    Success.
    
    All done! 
    
    sudo rm /usr/local/mysql
    sudo rm -rf /usr/local/mysql*
    sudo rm -rf /Library/StartupItems/MySQLCOM
    sudo rm -rf /Library/PreferencePanes/My*
    rm -rf ~/Library/PreferencePanes/My*
    sudo rm -rf /Library/Receipts/mysql*
    sudo rm -rf /Library/Receipts/MySQL*
    sudo rm -rf /var/db/receipts/com.mysql.
    调用vim /etc/hostconfig,删除 MYSQLCOM=-YES-这一行。
    Tips: 我貌似没有删干净,所以在finder-Go-gotofolder之下输入/usr/local,看有没有重复的mysql文件,有的话就彻底删除。
    

    启动mysql命令:mysql.server start

    停止mysql命令: mysql.server stop

    相关文章

      网友评论

          本文标题:brew安装mysql

          本文链接:https://www.haomeiwen.com/subject/rotahqtx.html