Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I connect to a MySql server using a web address?

Status
Not open for further replies.

usalabs3

Technical User
Sep 7, 2004
152
US
after setting up MySql server to use TCP/IP on a select port, for some reason I can only use localhost as the host at home, I would like to be able to access my server using something like MySql Manager across TCP/IP remotely, using a web address or an IP address, but I can't, how do I name the server's host to a web address? and not localhost.
 
not really sure... using the host name or ip works for me using mysql administrator:

perhaps your host has configured mysql to only accept connections from localhost?


-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
The host is run from home, how do I configure mysql to accept connections from the internet?. I have enabled TCP/IP on a chosen port, but, no dice, when I enter either my ip address or a web address (which has a DNS record pointing to my IP address) into MySql Administrator with the same port as the server, I get an error 'Unknown MySql server host [mydomain name/ip address] (11004)', but if I entered 'localhost' I get access.
 
you or your ISP might have a firewall blocking requests?

-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
are you sure the port is correct?
do
Code:
mysql> show variables;
and check the list for the port varaible

and

are you sure that your router is forwarding that port to your pc's ip ?

Try also to access your server from the command line like this
Code:
# mysql -hxxx.xxx.xxx.xxx -umyuser -pmypassword
First be sure that when you do
Code:
mysql> use mysql;
mysql>select user,password,host from user;
gives you something like this
Code:
+-------------+------------------+-----------+
| user        | password         | host      |
+-------------+------------------+-----------+
| root        | jhgf788734y34bf7 | localhost |
| internet    | 36355hc8838323gd | %         |
+-------------+------------------+-----------+
and you access the server with user name 'internet'


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
the mysql command always shows the variables, regardless of any commands, following it, EG. from the command prompt mysql [enter] shows the variables, from the command prompt mysql use mysql; shows the variables, and from the command prompt mysql use mysql; shows the variables, it doesn't matter what I place after the mysql command it will always display the variables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top