ERROR 1044 (42000)
MariaDB [(none)]> create database youku;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'youku'
网上有些方法
如下
1.关闭mysql
# systemctl stop mariadb.service
2.屏蔽权限
# mysqld_safe --skip-grant-table
屏幕出现: Starting demo from .....
3.新开起一个终端输入
# mysql -u root mysql
mysql> delete from user where USER='';
mysql> FLUSH PRIVILEGES;//记得要这句话,否则如果关闭先前的终端,又会出现原来的错误
mysql> \q
在执行第一个操作,就出现了如下错误
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'systemctl stop mariadb.service' at line 1
没有语法错误啊,求原因???
谢谢
elegy
10 years, 4 months ago