MAMP or MySQL on macOS
Yesterday I have installed MAMP on mac OS. Everything's perfect.
How I can get my mysql version? In terminal write something like this: mysql -v ? ( This doesnt work).
And there phpmyadmin, if i create database , t开发者_Go百科ables so I can use them in ruby on rails projects?
If you run mysql
in your terminal, you'll be greeted with a welcome message that includes the version.
From the terminal, you can also do:
mysql --version
And from within mysql:
select version();
Try this mysql> SHOW VARIABLES LIKE "%version%";
Visit http://localhost:8888/MAMP to see details about your MAMP installation and http://localhost:8888/MAMP/phpmyadmin.php for the MAMP phpMyAdmin interface.
There you'll also see the configuration details how to connect to the database (usable in Ruby, too).
On the command line, you'll need to use the right path:
/Applications/MAMP/Library/bin/mysql -V
精彩评论