Change mysql root account password
Enter the command in the terminal: /usr/local/mysql/bin/mysqladmin -u root password new password
You can use this command to change your password at any time.
terminal login mysql
Method 1: Absolute path
Enter the command in the terminal: /usr/local/mysql/bin/mysql -u root -p
Tip: Enter your new password
Method 2: (recommended) relative paths
Enter the command in the terminal:
Check if there is a path you need in the path:
Enter the command in the terminal: echo $PATH
no, continue
Add the required path: PATH="$PATH":/usr/local/mysql/bin
after
You need to enter the command in the terminal: mysql -u root -p