How to use the terminal to open Xampp Mysql_mysql on Mac

Source: Internet
Author: User

Start directly, and the errors that may occur in each step are described in the process.

1. Install the XAMPP, then open the terminal, enter:

Mysql-u root-p

Successfully entered, rub, you have good luck, do not look at the back.

2. If you are prompted to command not found, continue to enter execution at the terminal:

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

Note: USR does not write to user!

If successful, go back to step 1th and you can enter!

3, if not successful, return operation not permitted, the description does not have permissions, this time to the bin under the MySQL permissions modified into read and write (self-search how to modify)

4, after the change, again to perform the 2nd step, found still not, with the root user to perform the 2nd step, namely:

sudo ln-s/applications/xampp/bin/mysql/usr/bin

5, if still not, why? It took a long time to find out why, and finally found it, because Mac OS uses rootlees, which can be understood as the kernel protection of a higher level system,

The/usr/bin operation is locked and can only be manipulated with an Apple certificate.

So what do we do?

6, Method: Reboot the computer, hold down

Command+r

Go to the recovery partition, and then find the terminal boot run on the utility bar.

7, input

Csrutil Disable

Turn off protection

And then enter

Reboot

Reboot the computer or manually click Reboot.

8, restart the computer, open the terminal, the implementation of the 4th Step command, you can put the absolute position of this tool into the/usr/bin

9, this time in the implementation of the 1th step can normally open.

10. Finally, for security reasons, let's start the rootless, with step 6th, step 7th, execute the command

Csrutil Enable

Restart the computer and OK.

11, every time restart the computer, remember to first XAMPP MySQL service startup, or it will be an error

Can ' t connect to the local MySQL server ...

12. The end!

The above mentioned is small set to everyone introduced on the Mac any use terminal to open xampp with the MySQL, I hope to help.

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.