无法在MacOS上的mysql工作台中连接到localhost。消息为“无法连接到'localhost'上的MySQL服务器(61)”

时间:2019-12-20 09:12:46

标签: mysql mysql-workbench

我更改了my.cnf文件,此后,当我运行命令ALTER USER'root'@'localhost'并用'password'BY'password'标识时;我收到一条错误消息,提示错误1290(HY000):MySQL服务器正在使用--skip-grant-tables选项运行,因此它无法执行此语句。我想问题出在my.cnf文件,但无法在线找到my.cnf文件的样本内容。my.cnf文件的内容如下:-

    # Default Homebrew MySQL server config
    !includedir /etc/mysql/conf.d/
    !includedir /etc/mysql/mysql.conf.d/
    # Only allow connections from localhost
    port    = 3306
    socket  = /var/run/mysqld/mysqld.sock

    # This was formally known as [safe_mysqld]. Both versions are currently parsed.
    [mysqld_safe]
    socket  = /var/run/mysqld/mysqld.sock
    nice    = 0
    syslog

    [mysqld]
    # Basic Settings
    user      = mysql
    pid-file  = /var/run/mysqld/mysqld.pid
    socket    = /var/run/mysqld/mysqld.sock
    port      = 3306
    basedir   = /usr
    datadir   = /var/lib/mysql
    tmpdir    = /tmp

    lc-messages-dir         = /usr/share/mysql
    skip-external-locking

    # Engine
    default-storage-engine  = InnoDB

    # Listening IP
    bind-address            = localhost

Image of problem

0 个答案:

没有答案