ok, how can you access mysql terminal if my server isremote?

Page 1 of 1 [ 9 posts ] 

ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

10 Jan 2013, 2:46 pm

i've a book called head first php and mysql
i could do things with phpmyadmin but i don't know how exactly to access with the terminal over windows
this is what i get
https://docs.google.com/open?id=0B3CeEc ... 2dkOWVNR0k



ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

10 Jan 2013, 3:01 pm

can i search the whole web for certain pages using a specific code (source) ?



Cornflake
Administrator
Administrator

User avatar

Joined: 30 Oct 2010
Gender: Male
Posts: 68,376
Location: Over there

10 Jan 2013, 4:35 pm

If you can use mysql via phpmyadmin, the error you're getting is likely because location at which it's installed isn't included in the the system path - or, something other than the name mysql is required to start it.
Find out where mysql (or whatever is required to start it) is installed and instead, type: \Full\Path\To\Directory\mysql
Substitute whatever might be required to start it instead of using mysql, if required.
You could add that path to the system path but I wouldn't recommend it without a sound reason for doing so.


_________________
Giraffe: a ruminant with a view.


sliqua-jcooter
Veteran
Veteran

User avatar

Joined: 25 Jan 2010
Age: 37
Gender: Male
Posts: 1,488
Location: Burke, Virginia, USA

10 Jan 2013, 4:56 pm

EDIT: you don't have the mysql client installed on your windows system, so you can't run the command. Additionally, once you get it installed you'll run into a couple other issues:

MySQL controls access based on both user AND host. If you don't allow connections for that user from that host (and with that password - different hosts have entirely different user records, so the password could theoretically be different), then it won't let you login.

Additionally, by default on some systems mysql only listens on the loopback address (127.0.0.1), so outside hosts can't open a socket. Check the bind address in the my.cnf file.


_________________
Nothing posted here should be construed as the opinion or position of my company, or an official position of WrongPlanet in any way, unless specifically mentioned.


Cornflake
Administrator
Administrator

User avatar

Joined: 30 Oct 2010
Gender: Male
Posts: 68,376
Location: Over there

10 Jan 2013, 5:02 pm

^ Yes. I should have checked first to see how phpMyAdmin accessed it. :oops:


_________________
Giraffe: a ruminant with a view.


Trencher93
Velociraptor
Velociraptor

User avatar

Joined: 23 Jun 2008
Age: 124
Gender: Male
Posts: 464

10 Jan 2013, 5:16 pm

In summary, user asks incoherent question without supplying enough information to tell what the problem is. Random speculation follows, but nothing is really settled.

Sorry, couldn't resist. :)

Seriously, though... Is the MySQL instance local or remote? Do you need to SSH to the remote host to use the MySQL command prompt? I've done that, and I've also used an SSH tunnel to use the local MySQL client to connect to a remote host.

I don't know if it's possible to use the client by itself to connect to a remote instance, but it's not a good idea since (1) traffic would not be secure, and (2) the MySQL port would have to be exposed on the server. This might be okay on a LAN, but I'd still get in the habit of tunneling over SSH.

If it is a true local MySQL instance, have you installed and configured the client? I have never used MySQL on Windows, so I don't know how that's done. (And my free advice probably isn't worth much.)



sliqua-jcooter
Veteran
Veteran

User avatar

Joined: 25 Jan 2010
Age: 37
Gender: Male
Posts: 1,488
Location: Burke, Virginia, USA

10 Jan 2013, 5:17 pm

OP did specify server is remote, it's in the subject.

Quote:
I don't know if it's possible to use the client by itself to connect to a remote instance, but it's not a good idea since (1) traffic would not be secure, and (2) the MySQL port would have to be exposed on the server. This might be okay on a LAN, but I'd still get in the habit of tunneling over SSH.


Of course it's possible to connect to a mysql server from a remote client. Not only possible, but pretty common in deployments.


_________________
Nothing posted here should be construed as the opinion or position of my company, or an official position of WrongPlanet in any way, unless specifically mentioned.


ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

11 Jan 2013, 5:37 am

thank you

i will try to fix it later :)



Trencher93
Velociraptor
Velociraptor

User avatar

Joined: 23 Jun 2008
Age: 124
Gender: Male
Posts: 464

11 Jan 2013, 8:15 am

Sounds like this is under control then. Just need to hook the client up to the right server. I don't ever do it that way, though. I always SSH to the remote server and start the MySQL client there.