安装MySQL Workbench,但文件/etc/my.cnf不存在 [英] Installing MySQL Workbench but File /etc/my.cnf doesn't exist

查看:801
本文介绍了安装MySQL Workbench,但文件/etc/my.cnf不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设法将MySQL DMG存档下载到我的操作系统(mac OS X).如果我使用命令行,它将起作用. 现在,我正在尝试安装MySQL Workbench. 我已经创建了MySQL Connection,但是一旦测试了主机设置,就会得到:

I managed to download the MySQL DMG archive to my OS (mac OS X). It works if I use the command line. Now, I'm trying to install MySQL Workbench. I've created MySQL Connection but once I'm testing the host machine settings, I get:

Checking command 'ps xa | grep "/usr/local/mysql.*/bin/[m]ysqld"'
Server detected as running
Check if /etc/my.cnf can be accessed
Operation failed: File /etc/my.cnf doesn't exist

我试图找到文件my.cnf,我得到:

I'm trying to find the file my.cnf and I get:

Didis-MacBook:~ Didi$ find . -type f -name "*my.cnf*"
find: ./perms/newdir: Permission denied

因此,我尝试通过输入以下内容来创建自己的"my.cnf":

So I tried to create my own "my.cnf" by entering:

cd /usr/local/mysql/support-files/
sudo cp my-huge.cnf /etc/my.cnf

然后它要求输入密码.我不记得设置密码. 所以我输入:

Then it asked for a password. I don't remember setting up a password. So I typed:

/usr/local/psa/bin/admin --show-password

并获得:

-bash: /usr/local/psa/bin/admin: No such file or directory.

我相信我的密码应该在/etc/passwd中,但是我的系统中没有目录"etc"!

I believe my password should be in /etc/passwd but I have no dir "etc" in my system!

我的想法不多了,有人可以帮我吗?

I'm running out of ideas, can somebody help me please?

推荐答案

我知道了:

  1. 去我的终端并输入:

  1. Went to my terminal and typed:

 passwd
 Old password was blank
 I created a new password (it was THAT simple)

  • 我创建了一个"etc"目录

  • I created a "etc" directory

    我检查了/usr/local/mysql/support-files/下的文件,发现我的cnf文件实际上被命名为my-default.cnf,而不是my-huge.cnf,就像MySQL站点上的开发人员一样.

    I checked the files under /usr/local/mysql/support-files/ and saw my cnf file was actually named my-default.cnf and not my-huge.cnf like the developer at the MySQL site.

    所以我输入了:sudo cp my-default.cnf /etc/my.cnf

    回到工作台,最后说:

    测试主机设置已完成.

    Testing host machine settings is done.

  • 这篇关于安装MySQL Workbench,但文件/etc/my.cnf不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆