Configure and use the MySQL command line client in XAMPP of MAC system

Source: Internet
Author: User

In the PHP learning process, MySQL is estimated to be in contact.

I believe you will also use phpmyadmin for MySQL management:

Well, phpmyadmin is indeed an artifact of MySQL management. You may want many of them. During the development process, it helps a lot in the design architecture of the background database.

However, the main character in this article is indeed not it.

MySQL client

In the MySQL installation package, many toolkit are placed in a folder named bin, but the command line is used (ps: Recently addicted ).

In MAC systems, the command line tool can use the Terminal provided by the system:

By the way, the php + mysql environment used by the author is XAMPP for MAC, and the MySQL client tool is placed in the bin folder in XAMPP.

But how can I use this client?

Enter the XAMPP bin folder in Terminal and enter the following command:

Mysql-u root-p

I didn't want any results. I was prompted to enter the password ??????

In Terminal, the message is indeed: command not found.

What? Clearly in front, how not found, this is hard! Well, it seems that it takes some time to find the problem.

After a long and long period of time ....

Originally, when you enter the command time, the system will search for the command you entered in the/usr/bin location. If you did not introduce the command to this location, whether you call cd directly to the specific location of the tool, it is in vain.

Kung Fu. As long as the absolute position of this tool is introduced to/usr/bin, all the problems will be solved. As long as we execute this command:

Ln-s/applications/xampp/bin/mysql/usr/bin

At this time, enter the database connection command, and then:

Okay, you have succeeded. Enter the password to view and manage your MySQL !!!!!!!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.