View Full Version : Connecting to mySQL via TCP/IP

<-- R O B -->
12-01-2003, 06:27 AM
Hi All

Is there a way I can connect to Westhost's mysql databases via mascon (a desktop GUI that I was using previously with my old hosting company) over TCP/IP?

I've set up a mysql database with westhost no problem, except for the fact that the enable TCP/IP Connection box refuses to let me tick it (there's some javascript on the page forcing the checkbox to be deselected when clicked!)

If not what would people suggest as the best way to dump databases from my old host to west host - would it be getting an sql dump - uploading it to Westhost and then running the script through phpMyAdmin?


12-01-2003, 08:45 AM
Not sure about the TCP/IP issue but I have moved databases from one account to another using phpMyAdmin and it has worked well. I used phpMyAdmin on the old account to Export the database info and then the the SQL from location to upload it and run the query. Most likely there is an easier method but that is how I got a database moved. I did have to break down the database into diffrent sections even with it gzipped to get it to work.

12-01-2003, 09:00 AM
Is there a way I can connect to Westhost's mysql databases via mascon (a desktop GUI that I was using previously with my old hosting company) over TCP/IP?

The last I heard, westhost had that locked down. I didn't realize they gave you an option in Westhost 2.0.

<-- R O B -->
12-02-2003, 03:29 AM
Not really an option to access via tcp-ip - just the checkbox that does nothing :D

Oh well the sql dump to file and then upload of file to phpmyadmin worked fine.


12-02-2003, 01:53 PM
The remote connection to mySQL is supposed to work. I just tried it out, and it worked for me. My checkbox was not "blocked" (browser: Mozilla). I did that, and then tried to use phpmyadmin (installed on localhost/my computer) and it didn't work. Then I remembered that you have to use PhpMyAdmin to modify Priviliges (to allow your host to connect to mySQL). Once I did that, it worked perfectly. Don't know if WestHost added that to their manual, but they really should. Previously I spent hours and hours trying to figure this out...

<-- R O B -->
12-02-2003, 03:20 PM
wierd - I just tried again (in Firebird and Mozilla) and i still can not select that darn checkbox. Here'e the relavent bit of html on the form

<input type="hidden" name="pollen8\plugins\database\MySQLs\MySQLs||_PLUGIN_MY SQL_NOCONNECT" value="false">
&lt;input type="checkbox" onclick="this.checked=false;" disabled>

Maybe the hidden input value is effecting the checkbox does any one know where I can find the mysql ini file?

By the way this is for a reseller account

12-02-2003, 04:02 PM
Hmm, maybe it is disabled on purpose for resellers. I can't see why this would need to be done though. Obviously, do NOT uninstall it and then install it again - I read in the manual that resellers should never do that. I guess that's linked to some of these mySQL options as well. Anyway, if you are up for it, you could try manually by editing the "mySQL ini file" (as you say). But you should keep in mind that WestHost must have disabled it for a reason. If you have a non-mission-critical account/site you can test this on, do the following:

1. The "ini file" is /etc/my.cnf - you need to edit this. Make a backup of the original before proceeding.

2. There should be a line like the following about halfway down:


Remove the # from in front of the line to un-comment it. Save the file (and re-upload if you did this via FTP, I think you should upload it in ASCII mode).

3. You have to restart mySQL. Not sure if the "restart" option in the Site Manager will cut it, but you can try. If that does not work, then you need to SSH in to your account, and then type restart and press enter. That should do it.

4. Install PhpMyAdmin if you have not already done so. In PhpMyAdmin, click on Priviliges - edit the particular username you need to (you should probably edit the entry for root). What you need to add/change here is the host of the username. In fact, it would be better if you added another username and password combo (doesn't have to be "root"), grant it "all priviliges" and for host use "any host".

5. Test the remote connection and see if it works. If it doesn't then just replace the edited my.cnf with the original (then restart mySQL), and remove the username/priviliges you added above via PhpMyAdmin.

Again, WestHost must have disabled it for a reason. I wouldn't recommend doing this unless you know your way around mySQL/PhpMyAdmin and SSH, and certainly not for a site that is live at the moment and uses mySQL! Good luck - let me know how it goes.

<-- R O B -->
12-06-2003, 04:36 AM
Found the reson why my tcp/ip box was unclickable - it was because I'd set up the account (from the reseller system) using name based rather than ip based. You also need this if you want chilisoft asp to access mysql databases

Right onto the next problem - in that I can't shut down mysql for it to read in my.conf (with the changed line to allow tcp-ip access). I've tried from the control panel and from ssh (./mysqld restart), but it fails to shutdown.

I've logged a support call with westhost, but i was wondering if anyone had any ideas.