Before, I have researched many questions related to my problem at Stackoverflow, but none of these questions answers solved my problems. The following questions:
I followed the tutorial: Installing Apache, PHP, and MySQL on Mac OS X El Capitan
Follow the terminal:
Gustavo-Maci:mysql gus$ export PATH=/usr/local/mysql/bin:$PATH
Gustavo-Mac:mysql gus$ mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Access denied for user 'root'@'localhost' (using password: NO)
Gustavo-Mac:mysql gus$ mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Gustavo-Mac:mysql gus$ set password for 'root'@'localhost' = PASSWORD('kartuli')
-bash: syntax error near unexpected token `('
Gustavo-Mac:mysql gus$
I use OS X El Capitan 10.11 on a Mac mini with HDs of OSes Phoenix and Windows 10.
Update
I followed the video tutorial, but I got an error:
Gustavo-Mac:~ gus$ export PATH=/usr/local/mysql/bin:$PATH
Gustavo-Mac:~ gus$ mysql -u root ;
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)