mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -e 'select * from user'
Note that you should run it when logged as root in your server. Also note
that all these commands should be typed as one line.
It outputs table with lines like this:
| localhost | DBUser | 3d89770b0d299d60 | N | N | N | N | N | N | N | N
| N | N | N | N | N | N |
Following commnd outputs only lines for DBUser user:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -e 'select * from user
where User="Vik"'
Where "localhost" is host allowed to connect, "DBUser" is mysql user name
and "3d89770b0d299d60" is encrypted password.
You should add in to mysql.user table lines which are completely the same as
this but hostname is the remote IP allowed to connect. You can do it with
command like this:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -e 'insert into user values
("RemoteIP","DBUser","3d89770b0d299d60","N","N","N","N","N","N","N","N","N",
"N","N","N","N","N"
)'
Where "Remote IP" you should replace to IP which you need to allow and
"3d89770b0d299d60" to password returned by "select" (which I write
first) command.
Adding of this line you can check with command I wrote to see lines for
DBUser user (mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql -e 'select
* from user where User="Vik"')
Now accordingly to firewall. Please provide us with output of "iptables -L"
command. If it outputs nothing then there is no firewall restrictions and
you don't need to tune firewall for mysql connactions.