Troubleshooting Common Issues
MySQL is not recognised after successfull installation.
It appears that the MySQL command is not being recognized in your terminal. Let’s troubleshoot this issue:
- Check MySQL Installation Path:
- First, verify the installation path of MySQL. By default, it should be in
/usr/local/mysql/bin
. - Open a terminal and run the following command to navigate to the MySQL bin directory:
cd /usr/local/mysql/bin
- If you see the MySQL binaries (including
mysql
), you’re in the right place.
- First, verify the installation path of MySQL. By default, it should be in
- Add MySQL to PATH:
- To make the
mysql
command accessible globally, add the MySQL bin directory to your system’s PATH. - Open your shell profile file (usually
.bashrc
or.zshrc
) using a text editor:nano ~/.bashrc
- Add the following line at the end of the file:
export PATH=$PATH:/usr/local/mysql/bin
- Save the file and exit the text editor.
- Restart your terminal or run
source ~/.bashrc
to apply the changes.
- To make the
- Test MySQL Access:
- Now try running the
mysql
command again:mysql -u root -p
- It will prompt you for the MySQL root password. Enter the password you set during installation.
- Now try running the
If you encounter any issues or need further assistance, feel free to ask! 🚀🔧.
[…] Important: When you paste the script, replace ‘NewPassword!’ with an actual secure password you want to set for MySQL root user. If you are unable to open mysql you will need to add its path first here is a troubleshooting guide https://felixrante.com/troubleshooting-common-issues/ […]