关闭数据库权限不足怎么办

关闭数据库权限不足怎么办,第1张

正常的root是向上面的这些一样,所有的root权限都是开启的,但是我之前出现1045问题的原因发现了最底下的Event以及Trigger权限并没有加上

如果想要加上在navicat上有没有权限,这个时候就应该到本地cmd终端中进行权限的添加、

具体的 *** 作:

1. 可以进入数据库,但无update权限:

*** 作过程:在WINDOWS的DOS窗口下,进入MYSQL安装目录的BIN目录,

运行mysqld-nt --skip-grant-tables,当前窗口将会停止。

另外打开一个命令行窗口,执行mysql 如果提示没有这个命令,先进入MYSQL的安装位置下BIN目录再运行mysql

>use mysql

>update user set Update_priv ='Y' where user = 'root'

如果root 没有所有数据的权限

更新的MYSQL.USER表的所有字段中为N的为Y就可以了。

update user set Select_priv ='Y' where user = 'root'

update user set Insert_priv ='Y' where user = 'root'

update user set Update_priv ='Y' where user = 'root'

update user set Delete_priv ='Y' where user = 'root'

update user set Create_priv ='Y' where user = 'root'

update user set Drop_priv ='Y' where user = 'root'

update user set Reload_priv ='Y' where user = 'root'

update user set Shutdown_priv ='Y' where user = 'root'

update user set Process_priv ='Y' where user = 'root'

update user set File_priv ='Y' where user = 'root'

update user set Grant_priv ='Y' where user = 'root'

update user set References_priv ='Y' where user = 'root'

update user set Index_priv ='Y' where user = 'root'

update user set Alter_priv ='Y' where user = 'root'

update user set Show_db_priv ='Y' where user = 'root'

update user set Super_priv ='Y' where user = 'root'

update user set Create_tmp_table_priv ='Y' where user = 'root'

update user set Lock_tables_priv ='Y' where user = 'root'

update user set Execute_priv ='Y' where user = 'root'

update user set Repl_slave_priv ='Y' where user = 'root'

update user set Repl_client_priv ='Y' where user = 'root'

update user set Create_view_priv ='Y' where user = 'root'

update user set Show_view_priv ='Y' where user = 'root'

update user set Create_routine_priv ='Y' where user = 'root'

update user set Alter_routine_priv ='Y' where user = 'root'

update user set Create_user_priv ='Y' where user = 'root'

update user set Event_priv ='Y' where user = 'root'

update user set Trigger_priv ='Y' where user = 'root'

Linu下启动MySQL结果显示:env: /etc/init.d/mysql: 是脚本执行的问题

解决办法:依次执行下面的命令(执行失败的话,检查路径是否正确):

cp /etc/init.d/mysql /etc/init.d/mysql.bak    #拷贝/etc/init.d/mysql到/etc/init.d/mysql.bak文件

/etc/init.d/mysql.bak start   #执行/etc/init.d/mysql.bak文件启动mysql  成功!!!

rm /etc/init.d/mysql           #删除/etc/init.d/mysql文件

mv /etc/init.d/mysql.bak /etc/init.d/mysql  #将/etc/init.d/mysql.bak重命名为/etc/init.d/mysql

5./etc/init.d/mysql start         #执行/etc/init.d/mysql 启动mysql   成功!

如上述方法不能解决可尝试:

你在光盘里找一下 ls mysql*

应该是有一个叫mysql-server*的文件,重装这个文件试试

[root@centos5 ~]# service mysqld start

mysqld: 未被识别的服务

这里应该表示你的系统未有这个服务,得检查你的软件安装是否正确。

用YUM吧 yum -y install mysql mysql-server mysql-connector-odbc mysql-devel libdbi-

dbd-mysql


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/8316573.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-15
下一篇 2023-04-15

发表评论

登录后才能评论

评论列表(0条)

保存