Page 1 of 1

remote mysql connection

Posted: Sun Jun 23, 2002 3:39 am
by mrpaulfrank
im looking for help with connecting to a remote mysql server (provided by valuehost.com). im using dreamweaver mx and obviously wanting to end up with a php based site. im completely new to this and frustrated to know what program will actually connect to the mysql server (3.23.47-log) so that i may alter the database. dreamweaver connects to the ftp server for php testing reasons, but wont be able to edit databases correct? i have mysql installed (but if its the program im looking to use, im totally clueless on how to do the initial setup of defining the remote server connection and editing a database). also, the database already exists on the server...which was created through the admin pannel of my webserver (if this makes any sort of a difference). thanks for the help, i really appreciate it.

Posted: Mon Jun 24, 2002 7:49 am
by mikeq
If you have the rights to the server (mysql) then you can type the following at the command line

mysql> grant all privileges on dbname.* to username@remoteIP identified by 'password';
mysql> flush privileges;

You must be able to connect as a user that has rights to do this

Posted: Mon Jun 24, 2002 8:42 am
by will
i guess i'm kind of confused as to what you are trying to do. generally, you work with data in a MySQL database in one of three ways...

1. the mysql command line. to access this on an external server, you would need a shell account to connect to the server (via ssh or the like), and run the command 'mysql'

2. a web-based interface. one of the most exhaustive systems is phpMyAdmin... i assume this is the type of thing you were referring to when you mentioned the "admin panel of [your] webserver"

3. within your own scripts. once the database is built and functioning properly, this is the main method you will use. this would be all of those mysql_*() functions in PHP


if you're working with designing your database, the first 2 are your best options.... but i don't see any way (or need) for Dreamweaver to connect directly to the database.

Posted: Mon Jun 24, 2002 9:01 am
by twigletmac
The first thing you need to do is ask your hosting company whether they support remote connections to the MySQL database.

You may want to consider using PHP and MySQL on your local PC in order to do your development work instead of trying to access the hosting server directly. It's all well and good Dreamweaver being able to connect to remote servers but when most hosts disallow anything other than localhost (basically requests from the actual website) access it's fairly useless in managing a remote site.

When you've done the development work then you can upload your files to the hosting server and take a dump of the database information to update that too.

Mac

thanks guys!

Posted: Tue Jun 25, 2002 3:26 am
by mrpaulfrank
yah, thanks for everyone's support...it all turned out to be their not telling me how to get started. then again i had no idea to begin with, but oh well! thanks again!