In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you the difference between mysql authorized localhost&% and the solution to the wrong authorization all the time, the content is concise and easy to understand, and it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
First of all, attach the openstack document as an example to explain why you have been empowered% but have been reporting permission errors!
Mysql-u root-pyunjisuan
CREATE DATABASE keystone
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY' KEYSTONE_DBPASS'
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY' KEYSTONE_DBPASS'
Correctly understood, the use of% here means that all host can access the mysql remotely. However, it is stated in the mysql official documentation that% does not include localhost. In this way, so the above, both localhost and% are empowered.
Next, take a look at the hosts file:
Vim / etc/hosts
Configure the keystone.conf file:
View the keystone log:
Tailf / var/log/keystone/keystone.log
Execute the synchronize database command:
Su-s / bin/sh-c "keystone-manage db_sync" >
A heady permission error occurred in the log:
This error probably bothers many people who install openstack. At least I often report this nonsense error from the openstack e version to the current juno version.
Obviously, this is a permission error, generally I will use the keystone directly. The connection = mysql://keystone:KEYSTONE_DBPASS@controller/keystone of conf is configured as
Connection = mysql://keystone:KEYSTONE_DBPASS@192.168.38.100/keystone can be solved. But in fact, we authorized% that all host should be accessible. So what's the problem?
By querying the mysql official website information about the configuration%, then all other host access has permission, you can report the above error is to tell me that there is no authority.
One more sentence here, if you configure% remote other host to have permission to access, then you also need to make some configuration in the mysql configuration file / etc/my.cnf to block this item or block this item directly. For more information, please find out by yourself.
If you want the outside host to access the database: (yunjisuan is the root password)
GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' yunjisuan'
Flush privileges
How will the above error reporting problem be solved if you continue to come back? take a look back at the / etc/hosts file:
When the controller node is clearly configured, try to move the item to another location, and a miracle occurs:
Add controller after the above 127.0.0.1 localhost. As to put in 127.0.0.1 localhost this line data represents what meaning, oneself Baidu asks. All I can say is that controller is the alias alias of localhost.
Continue with the command: su-s / bin/sh-c "keystone-manage db_sync" keystone
View the log:
Found success. In fact, the controller here is an alias for localhost, because localhost was authorized before, so controller is authorized. But the first way to write / etc/hosts is only the DNS function, so the permission error is reported.
Pit: this problem has been plagued for several years. Recently, there was an error when installing the version of juno. I vowed to solve it. It took two days for all kinds of google and baidu to finally solve it.
The above is the difference between mysql authorized localhost&% and the solution to the wrong authorization all the time. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.