Jump to content

[Answered] Accessing Mysql Server Via Computer's Terminal


Recommended Posts

Posted

Hello!

 

I'm trying to access MySQL server through my Mac's terminal. Any ideas how I can do this? I can use myphpAdmin no problem but I'ld like to be able to type my queries via my computer. What are the steps if any from the very beginning?

 

1. I have an account already.

2. I have a database set up already

3. I have a username/password associated to that database

 

Any help would be appreciated. Thank you.

Posted

From the command line on a mac the command should be something like

mysql --host=johnny.heliohost.org --user=jvicenci --database=jvicenci_test -p

The -p option will prompt you on the following line to enter your password which is safer than saying something like --password=123abc since that saves it in your command history.

 

On a lot of modern operating systems if you don't have access to a particular comand that you typed it will even prompt you on what the syntax is to install it and what package it's located in. For instance CentOS uses yum, and Ubuntu uses apt-get, etc etc. I'm not very familiar Macs, but I am with linux and Macs have a modified version of FreeBSD under the hood.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...