欢迎投稿

今日深度:

mariaDB grant privileges,mariadbprivileges

mariaDB grant privileges,mariadbprivileges


#copy form my sina blog http://blog.sina.com.cn/s/blog_67c902bd0102w79z.html

>create user MyTest identified by '123456'

#grant privileges
>grant all privileges on *.*  to 'MyTest'@'%'identified by '123456' with grant option
##grant all privileges on *.*  to 'MyTest'@'%'identified by '123456' with grant option
##grant all privileges on *.*  to'MyTest'@'192.168.1.1'identified by '123456'  withgrant option
##grant all privileges on *.*  to'MyTest'@'192.168.1.%' identified by '123456' with grantoption
##grant all privileges on *.*  to'MyTest'@'localhost' identified by '123456' with grant option
##grant all privileges on dbName.tableName  to'userName'@'host' identified by '123456' with grant ###option
##GRANT SELECT, INSERT, UPDATE, DELETE ON websites TO'techonthenet'@'localhost' identified by ##'123456' with grantoption;
####NOTE: with grant option means that  allows youto grant the privileges that you possess to other ####users. if youdon't add this option ,you can't grant the privileges to otherusers,if you have not ####add "identified by '123456'" ,it maybetake error "error 1133[42000] can't find match row...."
# select current user
>select user();
#select users
>use mysql;
>select user[,host] from user;
#show current user databases;
>show databases;
#show current user database tables
>show tables;

###########################################################
FAQ:ERROR 1044 (42000):Access denied for user ''@'localhost'(using password: YES)
reslove:skip grant tables and use mysql to update the record wherehost value is localhost

#>service mysqld stop
#>mysqld_safe --skip-grant-tables
#mysql>mysql
#mysql>use mysql
#mysql>update user set user=root,password=password("123456")where host="localhost";
#mysql>flush privileges;
#mysql>exit ;
#mysql -h 127.0.0.1 -u root -p
#mysql>use mysql
#mysql>grant all privileges on *.* to 'root'@'localhost'identified by '123456' with grant option
#mysql>exit;

www.htsjk.Com true http://www.htsjk.com/mariadb/32944.html NewsArticle mariaDB grant privileges,mariadbprivileges #copy form my sina blog http://blog.sina.com.cn/s/blog_67c902bd0102w79z.html create user MyTest identified by '123456' #grant privileges grant all privileges on *.* to 'MyTest'@'%'identified by...
相关文章
    暂无相关文章
评论暂时关闭