尝试使用MySQL与Mac创建新数据库时出错

时间:2017-06-23 05:45:23

标签: mysql database

我的机器是10.11 El Capitan。从终端,我成功启动了MySQL程序:

MURAK223:~ Main$ sudo /usr/local/mysql/support-files/mysql.server start
Password:
Starting MySQL
SUCCESS!

然后:

MURAK223:~ Main$ create database project1
-bash: /usr/local/bin/create: Permission denied

选中:

MURAK223:~ Main$ show databases
-bash: /usr/local/bin/show: Permission denied

MURAK223:~ Main$ sudo ./mysql -u root -p
sudo: ./mysql: command not found

搞砸了我的PATH?

MURAK223:~ Main$ $PATH
-bash: /usr/local/bin:/usr/local/sbin:/Users/Main/anaconda/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/metasploit-framework/bin:/opt/metasploit-framework/bin: No such file or directory

或者它与使用我公司的Wi-Fi(它在我家里没有工作)有关。

1 个答案:

答案 0 :(得分:1)

错误是:

Permission denied

表示您登录并尝试创建datatabse的用户没有正确的权限。分配正确的权限,然后重试。