如何修复此MySQL连接错误?

时间:2015-05-05 03:26:02

标签: mysql

我尝试在我的Mac上安装并运行MySQL,安装进行得很顺利,只需点击几下对话框。虽然我的最终目标是通过终端调用SQL数据库,但我必须在GUI中配置环境--MySQL Workbench,无论如何这是MySQL推荐的GUI。

我尽一切努力但仍然无法启动构建数据库,因为我甚至无法连接到SQL服务器,更不用说创建用户帐户了。在这里,我尝试重置root密码,并确定错误是否来自用户权限。下面是我使用的终端脚本和结果(从互联网上找到的代码):

localhost:~ sattva$ cd /usr/local/mysql
localhost:mysql sattva$ scripts/mysql_install_db
WARNING: Could not write to config file ./my-new.cnf: Permission denied

Installing MySQL system tables...2015-05-05 10:00:41 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-05-05 10:00:41 0 [Note] ./bin/mysqld (mysqld 5.6.24) starting as process 1738 ...
2015-05-05 10:00:41 1738 [Warning] Can't create test file /usr/local/mysql-5.6.24-osx10.8-x86_64/data/localhost.lower-test
2015-05-05 10:00:41 1738 [Warning] Can't create test file /usr/local/mysql-5.6.24-osx10.8-x86_64/data/localhost.lower-test
2015-05-05 10:00:41 1738 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-05-05 10:00:41 1738 [Note] InnoDB: The InnoDB memory heap is disabled
2015-05-05 10:00:41 1738 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-05-05 10:00:41 1738 [Note] InnoDB: Memory barrier is not used
2015-05-05 10:00:41 1738 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-05-05 10:00:41 1738 [Note] InnoDB: Using CPU crc32 instructions
2015-05-05 10:00:41 1738 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-05-05 10:00:41 1738 [Note] InnoDB: Completed initialization of buffer pool
2015-05-05 10:00:41 1738 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
2015-05-05 10:00:41 1738 [ERROR] InnoDB: The system tablespace must be writable!
2015-05-05 10:00:41 1738 [ERROR] Plugin 'InnoDB' init function returned error.
2015-05-05 10:00:41 1738 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-05-05 10:00:41 1738 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-05-05 10:00:41 1738 [ERROR] Aborting

2015-05-05 10:00:41 1738 [Note] Binlog end
2015-05-05 10:00:41 1738 [Note] ./bin/mysqld: Shutdown complete

localhost:mysql sattva$ ./bin/mysql_secure_installation
ERROR: can't create .my.cnf.1739: Permission denied at ./bin/mysql_secure_installation line 105.
Cleaning up...
Warning: Could not unlink .my.cnf.1739: No such file or directory
Warning: Could not unlink .mysql.1739: No such file or directory

有很多警告和错误,有什么不对?是关于我的系统的吗?或者我错误地安装了MySQL?无论如何,我从MySQL的网站上下载了dmg文件;并且我已经检查了文件的MD5,它与MySQL的网页完全一样。

0 个答案:

没有答案