Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

newbie question

0 views
Skip to first unread message

Dave

unread,
Feb 15, 2003, 9:14:14 AM2/15/03
to
I am renting my first dedicated server from serverbeach.com. I need to make
it so my ip address block can make remote connection to db's. I asked PLESK
and they were great and sent me the following directions I need to run as
root on the server. The only problem is how do I actually log onto the
server as root and get a command prompt so I can type it in? Any ideas?

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.


0 new messages