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>
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>
Looking for a solution, I’ve been struggling all night, but it’s really not working out.
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>
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>
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/profile
Try
then source/etc/profile