问:刚刚新安装的MySQL,提示下面信息,无法登入,怎么回事?
[root@imysql mysql]# mysql mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
答:数据库已经执行过 mysql_install_db 初始化了,按理说应该没问题。经过排查,发现 $datadir 的 mysql 数据库目录的权限模式为:
drwx------ 2 mysql root 4096 Jan 9 20:22 mysql
看起来没有问题。检查错误日志,发现一行:
130109 21:04:23 [Warning] Bootstrap mode disables GTIDs. Bootstrap mode should only be used by mysql_install_db which initializes the MySQL data directory and creates system tables.
ERROR: 1785 Updates to non-transactional tables are forbidden when DISABLE_GTID_UNSAFE_STATEMENTS = 1.
130109 21:04:23 [ERROR] Aborting