PDA

View Full Version : SLES 12 SP1 Cannot change MySQL root password



mlazzarotto91
18-Apr-2016, 11:35
Hi, I just installed MySQL from SLES repos, but during the installation MySQL didn't asked me for root password to set.
The problem is that I cannot change root password.
I tried to launch the command mysql_secure_installation, but it asks me root password.
On the Internet I found a lot of people that suggest to launch mysqld_safe, but unfortunately I don't find that command on my system.

And yes, I tried to use this command mysqladmin -u root passwrd <new password>, but it fails because I don't provide him the actual root password.

The version of SUSE is SUSE Linux Enterprise Server 12 SP1, and the version of MySQL is 5.7.12.

smflood
18-Apr-2016, 12:13
On 18/04/16 11:44, mlazzarotto91 wrote:

> Hi, I just installed MySQL from SLES repos, but during the installation
> MySQL didn't asked me for root password to set.
> The problem is that I cannot change root password.
> I tried to launch the command mysql_secure_installation, but it asks me
> root password.
> On the Internet I found a lot of people that suggest to launch
> *mysqld_safe*, but unfortunately I don't find that command on my system.
>
> And yes, I tried to use this command *mysqladmin -u root passwrd <new
> password>*, but it fails because I don't provide him the actual root
> password.
>
> The version of SUSE is SUSE Linux Enterprise Server 12 SP1, and the
> version of MySQL is 5.7.12.

With the release of SLES12 (and therefore also applies for SLES12 SP1)
SUSE replaced MySQL with MariaDB[1] so MySQL isn't available to install
from SLES repos. Please can you therefore let us know where exactly you
installed MySQL from?

HTH.
--
Simon
SUSE Knowledge Partner

------------------------------------------------------------------------
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.
------------------------------------------------------------------------

mlazzarotto91
18-Apr-2016, 12:14
Hi, I just installed MySQL from SLES repos, but during the installation MySQL didn't asked me for root password to set.
The problem is that I cannot change root password.
I tried to launch the command mysql_secure_installation, but it asks me root password.
On the Internet I found a lot of people that suggest to launch mysqld_safe, but unfortunately I don't find that command on my system.

And yes, I tried to use this command mysqladmin -u root passwrd <new password>, but it fails because I don't provide him the actual root password.

The version of SUSE is SUSE Linux Enterprise Server 12 SP1, and the version of MySQL is 5.7.12.

Ok, so I found that MySQL during the installation generated a temporary password in /var/log.
But now, when I try to connect with the commadn mysql -u root -p, it returns the following error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
but the file mysql.sock doesn't exist.

thsundel
18-Apr-2016, 13:25
Ok, so I found that MySQL during the installation generated a temporary password in /var/log.
But now, when I try to connect with the commadn mysql -u root -p, it returns the following error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
but the file mysql.sock doesn't exist.

Is mysql running?

Thomas

mlazzarotto91
19-Apr-2016, 08:14
On 18/04/16 11:44, mlazzarotto91 wrote:

> Hi, I just installed MySQL from SLES repos, but during the installation
> MySQL didn't asked me for root password to set.
> The problem is that I cannot change root password.
> I tried to launch the command mysql_secure_installation, but it asks me
> root password.
> On the Internet I found a lot of people that suggest to launch
> *mysqld_safe*, but unfortunately I don't find that command on my system.
>
> And yes, I tried to use this command *mysqladmin -u root passwrd <new
> password>*, but it fails because I don't provide him the actual root
> password.
>
> The version of SUSE is SUSE Linux Enterprise Server 12 SP1, and the
> version of MySQL is 5.7.12.

With the release of SLES12 (and therefore also applies for SLES12 SP1)
SUSE replaced MySQL with MariaDB[1] so MySQL isn't available to install
from SLES repos. Please can you therefore let us know where exactly you
installed MySQL from?

HTH.
--
Simon
SUSE Knowledge Partner

------------------------------------------------------------------------
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.
------------------------------------------------------------------------

I got MySQL repositories from here (https://dev.mysql.com/downloads/repo/suse/)


Is mysql running?

Thomas
I've just tried again, the service was "inactive (dead)", after a restart of the service now I can login.