new*_*ser 15 mysql xampp macos terminal phpmyadmin
我试图从我的mac的终端访问mysql.
我试过打字
mysql -u root -p
(并输入,但不存在..)
这是我到目前为止所做的事情:
Williams-iMac:mysql noName $ cd/Applications/xampp/xamppfiles/var/mysql/mysql
Williams-iMac:mysql noName $ ls
这就是那里的东西.
columns_priv.MYD help_relation.frm slow_log.CSV
columns_priv.MYI help_topic.MYD slow_log.frm
columns_priv.frm help_topic.MYI tables_priv.MYD
db.MYD help_topic.frm tables_priv.MYI
db.MYI host.MYD tables_priv.frm
db.frm host.MYI time_zone.MYD
event.MYD host.frm time_zone.MYI
event.MYI ndb_binlog_index.MYD time_zone.frm
event.frm ndb_binlog_index.MYI time_zone_leap_second.MYD
func.MYD ndb_binlog_index.frm time_zone_leap_second.MYI
func.MYI plugin.MYD time_zone_leap_second.frm
func.frm plugin.MYI time_zone_name.MYD
general_log.CSM plugin.frm time_zone_name.MYI
general_log.CSV proc.MYD time_zone_name.frm
general_log.frm proc.MYI time_zone_transition.MYD
help_category.MYD proc.frm time_zone_transition.MYI
help_category.MYI procs_priv.MYD time_zone_transition.frm
help_category.frm procs_priv.MYI time_zone_transition_type.MYD
help_keyword.MYD procs_priv.frm time_zone_transition_type.MYI
help_keyword.MYI servers.MYD time_zone_transition_type.frm
help_keyword.frm servers.MYI user.MYD
help_relation.MYD servers.frm user.MYI
help_relation.MYI slow_log.CSM user.frm
Run Code Online (Sandbox Code Playgroud)
但我仍然不知道如何访问mysql,以便我可以创建一个新的数据库(没有这样做我phpmyadmin).我在phpmyadmin中创建了一个新的数据库,只是尝试输入:
mysql -u root -p(my_phpmyadmin_created_database)
..但没有任何成功.
我希望通过我向你们所有人提供的关于我的问题的所有信息,有人会帮助我在这个时间里完成 - 一个无聊的问题!:)
提前致谢!
/ W
我通常这样做是为了在终端上使用XAMPP 1.7.3(可能还有以上)在Mac上激活php和mysql
1. Go to Terminal
2. Enter which php: If it says /usr/bin/php, then proceed to 3.
3. Enter sudo nano ~/.bash_profile (or sudo vim ~/.bash_profile if you know how to use it)
4. Then paste this export PATH="/Applications/XAMPP/xamppfiles/bin:$PATH"
5. Ctrl - O then enter to save, then ctrl - X to exit.
6. Type cd ~
7. type . .bash_profile
8. Restart terminal.
9. Enter which php: If you did it right, it should be the same as the path in #4.
Run Code Online (Sandbox Code Playgroud)
小智 6
我只是一个新的xampp用户。我也被这个问题困住了。是的,正确的目录是
/Applications/XAMPP/xamppfiles/bin/(the newest xampp is uppercase)
Run Code Online (Sandbox Code Playgroud)
但是,当您连接到数据库时,您应该输入
./mysql -u root -p (if there's password),
Run Code Online (Sandbox Code Playgroud)
不输入
mysql -u root -p...
Run Code Online (Sandbox Code Playgroud)
直接,它在我的Macbook Pro上成功地发出了字样。
| 归档时间: |
|
| 查看次数: |
75052 次 |
| 最近记录: |