Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (2.6k points)
recategorized by
Could someone tell me how to connect MySQL from the command line in a Mac?

1 Answer

0 votes
by (7.2k points)

To connect to MySQL from the command line in a Mac

You need to run this code,

 

mysql -u USERNAME -pPASSWORD -h HOSTNAMEORIP DATABASENAME 

 

The meaning of above code is this:

-u: username

-p: password 

-h: host

The last one is the name of the database that you wanted to connect. 

Related questions

0 votes
1 answer
0 votes
1 answer
asked Dec 6, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer
asked Dec 17, 2020 in SQL by Appu (6.1k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...