Home > Backend Development > PHP Tutorial > How to use the terminal to operate mysql in the xampp integrated environment under osx?

How to use the terminal to operate mysql in the xampp integrated environment under osx?

WBOY
Release: 2016-09-26 08:40:15
Original
1760 people have browsed it

  • Directly enter mysql -u root -p to return the following results:

-bash: mysql: command not found

  • I tried a method and it seemed that the environment variables were successfully configured. The code is as follows:

<code>PATH="$PATH":/Applications/XAMPP/xamppfiles/bin</code>
Copy after login
Copy after login

But if you do this, you will have to start over again after exiting the terminal and then entering again. After that, I searched for various methods on the Internet. I am not very smart and failed to succeed in the end. It seems that I have modified something at the root level. Now I get an error when I open it in the terminal. As follows:

<code>Last login: Sun Sep 25 23:35:04 on ttys000
-bash: PATH=${$PATH}:/Applications/XAMPP/xamppfiles/bin: bad substitution</code>
Copy after login
Copy after login

Looking for a solution, I’ve been struggling all night, but it’s really not working out.

Reply content:

  • Directly enter mysql -u root -p to return the following results:

-bash: mysql: command not found

  • I tried a method and it seems that the environment variables were successfully configured. The code is as follows:

<code>PATH="$PATH":/Applications/XAMPP/xamppfiles/bin</code>
Copy after login
Copy after login

But if you do this, you will have to start over again after exiting the terminal and then entering again. After that, I searched for various methods on the Internet. I am not very smart and failed to succeed in the end. It seems that I have modified something at the root level. Now I get an error when I open it in the terminal. As follows:

<code>Last login: Sun Sep 25 23:35:04 on ttys000
-bash: PATH=${$PATH}:/Applications/XAMPP/xamppfiles/bin: bad substitution</code>
Copy after login
Copy after login

Looking for a solution, I’ve been struggling all night, but it’s really not working out.

I am a centos fan, mac os should be similar, I have never used it.
Add the mysql environment variable to /etc/profileTry
then source/etc/profile

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template