[MDEV-13133] Broken yum install on RHEL 7 Created: 2017-06-20 Updated: 2017-06-21 Resolved: 2017-06-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform RedHat |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Marco Liceti | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, I (tried to) install MariaDB using these instructions: https://mariadb.com/kb/en/mariadb/yum/ The installation succeeds, but I'm locked out, i.e. can't connect as root. A comment on the same page says that the root password is blank, but that's not true. |
| Comments |
| Comment by Elena Stepanova [ 2017-06-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Have you started the server after installation? If it wasn't installed and running before, it won't start on its own. If you have, then please
You can obfuscate any data that is confidential, but please don't remove anything. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marco Liceti [ 2017-06-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, Elena. Of course I started the server. As for the version that I'm installing, it should be the one referenced by the page I linked previously. More precisely, this is the content of /etc/yum.repos.d/MariaDB.repo:
The output of rpm -qa | grep -E 'maria|mysql' is blank. The output of ls /etc/my* /var/lib/mysql is:
Here is the output of the install process:
Then I start the service:
There is no output. But I think this means that the service started up correctly. This is the output I get when I try to connect:
Just to be sure that the server is running, I stopped and retried to connect:
As you can see, the output is changed. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-06-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for this, it's quite clear now. The comment on that page isn't wrong, it just assumes a new clean installation. As you can see, even though there are no MySQL/MariaDB packages on your machine at the moment, there had been some MariaDB before, that's why you still have /var/lib/mysql. Among other things, it contains authentication information – users, passwords and such. When MariaDB is installed over already existing datadir, it doesn't clean it of course, it assumes that if a user kept it, it was for a reason (which is a very common scenario when you upgrade to a higher major version on RPM-based systems – you remove the old version first, and then install a new one, but of course you want to preserve the data). So, if you want a really clean installation and there is nothing important for you in /var/lib/mysql, you need to remove it before installation. You can uninstall/clean/install again (in addition to cleaning the datadir, it might make sense to check that you don't have stale config files in /etc/my.cnf and /etc/mysql/.... Or, if the password is the only problem, you can keep the current installation, start the server with skip-grant-tables, reset the password(s) and run FLUSH PRIVILEGES. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marco Liceti [ 2017-06-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
You're right. Apparently I was working on a dirty machine, I'm sorry. I deleted /var/lib/mysql and /etc/my.cnf, then I reinstalled from scratch. I confirm that now it's possible to connect as root with a blank password |