Indiana University

IU Webmaster

MySQL use change on Champion - Modifying user table

  • Champion web servers will undergo IP address changes on June 22nd. Due to this change, MySQL users on Champion need to modify their MySQL user tables that referece current IP addresses, 134.68.122.%, to target the new IP addresses, 129.79.13.%.

  • Prior to the June 22nd, you should duplicate any entries that reference 134.68.122.%, so that it also references 129.79.13.%.

  • This needs to be done for both mysql.iu.edu (Triton) and mysql-test.iu.edu (Callisto).

  • You can do so either by logging in to your mysql.iu.edu and mysql-test.iu.edu account or using SSH or using Phpmyadmin.
Table of Contents

I. Using SSH

1) Log in to your mysql.iu.edu or mysql-test.iu.edu account. For information on how to use SSH, please see How to use SSH.

2) Once logged in, call up the mysql command interpreter.

mysql -u root -p
Password: {enter the root mysql user's password here}
3) Change to the master mysql database.
mysql> use mysql
4) Take a look at what your current user table looks like with the following command.
mysql> select user, host from user;
It should look like the following:
+------------------+-------------------------+
| user             | host                    |
+------------------+-------------------------+
| root             | 134.68.122.%            |
| root             | localhost               |
| root             | triton                  |
| userone          | 134.68.122.%            |
| userone          | localhost               |
+------------------+-------------------------+
5 rows in set (0.03 sec)
5) Add the host 129.79.13.% to each user who has access to 134.68.122.% with the following command.

mysql> grant ALL on *.* to root@"129.79.13.%" identified by "mysql_
root_user_password" with grant option;

Note:

  1. Substitute your current root user/userone password where indicated.
  2. There should be quotation marks around the subnet ranges, 129.79.13.%, and passwords.
  3. Make sure that non-privileged (non-root) usernames are not defined using the 'grant option' as shown in the examples for the 'root' username above. Otherwise, those usernames will be able to define other mysql users in the database, even ones that have the same privileges as the 'root' mysql user.

6) Your table for the user 'root' should now look very similar to the one below.
mysql> select user, host from user where user = "root";

+------------------+-------------------------+
| user             | host                    |
+------------------+-------------------------+
| root             | 134.68.122.%            |
| root             | 129.79.13.%             |
| root             | localhost               |
| root             | triton                  |
+------------------+-------------------------+
4 rows in set (0.00 sec)
7) Now, use the flush privileges directive so that the new information becomes known to the running mysql server.
mysql> flush privileges;
Query OK, 0 rows affected (0.05 sec) 

Return to Top of Page


2. Using Phpmyadmin

1) Access Phpmyadmin installed on your Champion account.

2) Select Users.

 

3) Provide Host, User Name, Password, and Privileges information.
  1. Click on the radio button next to Host and put the IP address in the text input: 129.79.13.%. You need to do this for all the users who currently access 134.68.122.%.

  2. Enter the user name (root and other user names, if you have any).

  3. Enter password for the user and re-type for confirmation.

  4. Define privileges. Make sure that non-root users are not granted all. Otherwise, those users will be able to define other mysql users in the database, even ones that have the same privileges as the 'root' mysql user.

 

Return to Top of Page