problem is that you shutdown the primary node including mysql when you upgrade the secondary node and apparently your mysql setup was likely done wrong at initial setup. So to fix this you can do the following.
On the secondary node you can perform the following actions;
mysql> create user 'gateway'@'%';
mysql> grant all on ssg.* to 'gateway'@'%';
mysql> ALTER USER gateway IDENTIFIED BY '7layer';
mysql> flush privileges;
** Note: IDENTIFIED BY should contain your password defined for mysql. If its not 7layer please change this to the correct password.
Then test the connection;
# mysql -u gateway -p
Enter password. defined. If login is success this problem should not reoccur in the future.
2) To prevent this problem in the future by correctly setting up the gateway. You need to establish replication PRIOR to the first create database. OR create database from ssg menu on each node and then setup replication. Do not skip the create database on the secondary node or this issue will happen.