[thelist] connecting to a mySQL database

Jonathan j at firebright.com
Wed Apr 28 23:20:14 CDT 2004


<snip>
> > sort of client on my PC that can connect directly to the database. Any
> ideas
> > on how I would do this?
>
> Have you thought about running phpmyadmin?
>
> If you want a fat client of some kind, go here:
> http://solutions.mysql.com/
>
> Type in "client" and select Software as the category.  There are quite a
> number of clients out there, for just about every platform.  That's where
> I'd start.  You can also google "mysql client".

You know, here I'm replying to myself again, which is impolite (my apologies
in advanced), but I realized I could save you hours of frustration.

You should know that most isps do not have open access to their mysql
databases from non-web hosting machines.  So if you're going to try to
access mysql directly with a client, you'll have to either get your hosting
company to punch a hole in the firewall or access it through a forwarded
port type arrangement (look up ssh tunnelling or port forward and "putty" to
get started with this).  The mysql server usually is looking for you to be
"localhost", so if you're not on localhost, your connection attempt will
likely be denied.

Your isp is going to have to type something like:

grant insert, update, delete, select on yourdb.* to youruser at 23.211.232.12
identified by 'yourpassword'

However, without a fixed ip, you're up a creek about this, and your only
option will be to connect to your account with an ssh client (generally, as
mentioned, putty).  Here's a brief rundown:

http://www.cs.uu.nl/technical/services/ssh/putty/puttyfw.html

If you don't know what port, you're running on to connect, check this little
tip out:

On your machine (you probably don't have this access on a virtual hosting
account, but if you're lucky enough to have a Virtual Dedicated Server or
something), type:

#> mysqladmin variables

The #> is the prompt. Don't type that.  That will output all of the
variables associated with your mysql server, including a line that says:

| port                            | 3306

This is the port number that mysql runs on by default.  I know that the port
you want to forward to your local machine on Ensim Webppliance 3.1 and 2.5
and Plesk 6 and 7, but I don't know about Cpanel.  I assume though that it's
the same.

Hope that's helpful.

Jonathan
FireBright.com



More information about the thelist mailing list