登陆mysql
打cmd命令终端,如bai果已经添加了mysql的环境du变量,可以直接使用命令zhi
mysql -uroot
显示所有数据库
mysql>SHOW DATABASES;
Error:ALTER command denied to user ‘xxxx’@’localhost’ for table ‘uc_notelist’ Errno:1142 SQL::ALTER TABLE uc_notelist ADD COLUMN app1 tinyint NOT NULL 说明xxxx用户没有ALTER权限。
到mysql中,
mysql> SELECT alter_priv FROM user WHERE User = ‘xxxx’;
发现alter_priv = ‘N’,果然没有权限。
修改权限: mysql> UPDATE user SET alter_priv=’Y’ WHERE User = ‘xxxx’; mysql> flush privileges;
本文地址:https://blog.csdn.net/Ha_Pipi/article/details/107157957