Hello,
I think I did’t choose wrong forum of this site to ask this:
I use OpenSUSE Leap 42.1 KDE. This morning I installed LAMP using YaST Pattern, but I have got problem (for the first time in my life) to setup mysql admin password. I used
mysqladmin -u root password zzzzzz;
Result was
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘mysqladmin -u root password zzzzzz’ at line 1
What is wrong? How could I set up my MySQL server root (admin) password?
Nowadays, what you’re asking for is a bit easier because MySQL/Mariadb comes with a configuration tool, and setting the mysqladmin password is only one of many required settings to get set up correctly.
On a new MySQL/Mariadb install, you should run the following script/command which will interactively walk you through the entire process including setting the MySQL Admin password (if you enable remote access)
mysql_secure_installation
If you want to configure your MySQL/Mariadb security non-interactively (ie as an automated install), IMO scripting the answers as I described in the following Wiki page is easiest because it doesn’t require installing new tools