Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (2.5k 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)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.7k users

Browse Categories

...