Mac Terminal error: ‘export: command not found

Hi guys, I’ve recently done the SQL beginner tutorial that’s been recommended on FreeCodeCamp (https://www.freecodecamp.org/news/sql-and-databases-full-course/) and it’s been super helpful but left me with a couple of error messages in my Terminal due to the command the presenter suggested to use to configure the command line to recognise the ‘mysql’ command: echo ‘export PATH=/usr/local/mysql/bin:$PATH’ >> ~/.bash_profile followed by . ~/.bash_profile to confirm.

When moving on to mysql -u root -p, it kept giving me the following error message -bash: ‘export: command not found which now appears 7 times every time I open my Terminal — I tried the command various times removing spaces and such hoping it might solve it but no luck. I did find another way to make it work later on from another tutorial but am still stuck with those error messages and was hoping some of you might be able to help reversing/removing them as I‘m not sure what they are doing?

I’m fairly new to coding and have actually never opened Terminal on my Mac before doing this tutorial, so apologies if my description is not the best and do let me know if you need further info to be able to help — any advice is more than welcome!

Are you sure you have bash and not zsh?

Yes, that’s what the Terminal shell is labeled as I haven’t changed it – it does display the message that the default interactive shell is now zsh and what to run to update your account to use zsh but as I never opened Terminal before, I just left it as is…