LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 09: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, 09: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, 12: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, 12:56 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
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, 01:49 AM   #5
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 18.04 / CentOS 7.6
Posts: 397

Rep: Reputation: 62
Code:
mysql -h <host ip address> -u<user> -p<password>
 
Old 06-08-2010, 01:53 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

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


Reply



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 16 07-31-2018 06:12 AM
Connecting to a Remote MySQL Server msound Linux - Networking 2 10-18-2006 12:07 PM
connecting to remote MySQL server acos7 Linux - Software 2 01-30-2004 11:37 PM
Connecting Mysql Database on remote server akamol Programming 4 10-16-2003 11:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:53 PM.

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
Open Source Consulting | Domain Registration