Thank you for your friends to support this blog, welcome to discuss the exchange, because of limited capacity and time, mistakes are unavoidable, welcome correction.
If reproduced, please retain the author's information.
Blog Address: http://blog.csdn.net/qq_21398167
Original post address: http://blog.csdn.net/qq_21398167/article/details/46729717
Because the OpenStack environment was configured, very many tables were created. is configured with the native IP
So when the machine needs to change the IP, you need to synchronize all the environment-related IP in the database
Method:
1. Enter the database
[[email protected] desktop]# mysql-uroot-p
Enter Password:
Welcome to the MariaDB monitor. Command s end with; or \g.
Your MariaDB Connection ID is 2
Server version:5.5.40-mariadb-wsrep MariaDB server, wsrep_25.11.r4026
copyright (c), Oracle, MariaDB Corporation Ab and others.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
MariaDB [(none)]>
2. Show all data Show database.
MariaDB [(none)]> show databases;
+--------------------+
| database |
+--------------------+
| information_schema |
| glance |
| keystone |
| mysql |
| nova |
| performance_schema |
| test |
+--------------------+
7 rows in Set (0.12 sec)
MariaDB [(none)]>
3. Go to Keystone Database
MariaDB [(None)]> use Keystone;
Reading table information for completion of table and column names
Can turn off this feature to get a quicker startup with-a
Database changed
MariaDB [keystone]>
4. View all data Sheets
MariaDB [keystone]> Show tables;
+-----------------------+
| Tables_in_keystone |
+-----------------------+
| Assignment |
| Credential |
| Domain |
| Endpoint |
| Group |
| migrate_version |
| Policy |
| Project |
| Region |
| Role |
| Service |
| Token |
| Trust |
| Trust_role |
| user |
| User_group_membership |
+-----------------------+
Rows in Set (0.00 sec)
MariaDB [keystone]>
5. View the full contents of the endpoint data sheet
MariaDB [keystone]> SELECT * from endpoint;
+----------------------------------+----------------------------------+-----------+-----------+---------------- ------------------+-------------------------------------------+-------+---------+
| ID | legacy_endpoint_id | interface | Region | service_id | URL | Extra | Enabled |
+----------------------------------+----------------------------------+-----------+-----------+---------------- ------------------+-------------------------------------------+-------+---------+
| 2c1bfecbc0354ce8998675ae511139b6 | F73717cab6d4464cb65171d31535efe3 | Public | Regionone | da28568989314cbcb6562a069a8c4c4e | http://192.168.0.22:5000/v2.0 | {} | 1 |
| 458b7c2cf4614f2fade90836671795ea | E1d8e224bc434587941d00f42b1b3d88 | admin | Regionone | 507666ec257f4090850853ce5fa06881 | http://192.168.0.22:9292 | {} | 1 |
| 565afe887f1244afb1bc2c75cb05b3f7 | 3f6df8dffd5745228130066c9521888a | Public | Regionone | 30162d7fd4c448f481a617a47138a087 | http://192.168.0.22:8774/v2/% (tenant_id) s | {} | 1 |
| 849d71c20521483480a02ca7e248d2b3 | E1d8e224bc434587941d00f42b1b3d88 | Internal | Regionone | 507666ec257f4090850853ce5fa06881 | http://192.168.0.22:9292 | {} | 1 |
| 886f672ed16a4b4c9a1959846cdb6790 | F73717cab6d4464cb65171d31535efe3 | admin | Regionone | da28568989314cbcb6562a069a8c4c4e | http://192.168.0.22:35357/v2.0 | {} | 1 |
| 99b9f854f7ab409bad2902376cfa26e0 | F73717cab6d4464cb65171d31535efe3 | Internal | Regionone | da28568989314cbcb6562a069a8c4c4e | http://192.168.0.22:5000/v2.0 | {} | 1 |
| b0ffbaf2b9854f07a9741fe7f7ee51f9 | 3f6df8dffd5745228130066c9521888a | Internal | Regionone | 30162d7fd4c448f481a617a47138a087 | http://192.168.0.22:8774/v2/% (tenant_id) s | {} | 1 |
| cf450711e11547b3b03885e08bbdab5d | E1d8e224bc434587941d00f42b1b3d88 | Public | Regionone | 507666ec257f4090850853ce5fa06881 | http://192.168.0.22:9292 | {} | 1 |
| ee495ededf0b46bb9f8db1efef85da71 | 3f6df8dffd5745228130066c9521888a | admin | Regionone | 30162d7fd4c448f481a617a47138a087 | http://192.168.0.22:8774/v2/% (tenant_id) s | {} | 1 |
+----------------------------------+----------------------------------+-----------+-----------+---------------- ------------------+-------------------------------------------+-------+---------+
9 Rows in Set (0.00 sec)
MariaDB [keystone]>
6. Use the command to change all the IP inside.
Like what:
Update set URL=' http://192.168.0.22:5000/v2.0'where id=' 2c1bfecbc0354ce8998675ae511139b6';
Install a virtual machine with an OpenStack environment, and synchronize IP changes in the database when you need to change IP