LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-07-2010, 10:23 PM   #1
famms
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Rep: Reputation: 0
connecting to remote server using mysql command


hi I am fresh out the box to linux I am using mysql for the 1st time also, my question is what is the correct command to run on a mysql command line to connect to remote server.
 
Old 06-07-2010, 10:24 PM   #2
famms
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
does anyone know the correct command to run on mysql command line to connect to a remote server???
 
Old 06-08-2010, 01:07 AM   #3
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by famms View Post
does anyone know the correct command to run on mysql command line to connect to a remote server???
use the -h or --host argument.
 
Old 06-08-2010, 01:56 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Your first lesson is about man. It is short for manual (in Unix, everything is shortened). You use it to find out about commands:
Code:
man mysql
It will tell you, at minimum, what commandline arguments it knows/uses. Often lots more interesting stuff.
Use the man pages whenever you know a command, and don't know all about how to use it.
--- rod.
 
Old 06-08-2010, 02:49 AM   #5
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 12.04 / CentOS 6.5
Posts: 394

Rep: Reputation: 61
Code:
mysql -h <host ip address> -u<user> -p<password>
 
Old 06-08-2010, 02:53 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
... and you'll find this useful http://dev.mysql.com/doc/refman/5.0/en/ in the long run.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting php to remote mysql server habibno05 Programming 13 10-08-2008 08:49 AM
Connecting to a Remote MySQL Server msound Linux - Networking 2 10-18-2006 01:07 PM
connecting to remote MySQL server acos7 Linux - Software 2 01-31-2004 12:37 AM
Connecting Mysql Database on remote server akamol Programming 4 10-16-2003 12:46 PM


All times are GMT -5. The time now is 11:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration