[MDEV-9545] MariaDB-Server 10.0.23-2 no root Password setting during installation (thus no connection possible) Created: 2016-02-10 Updated: 2016-02-15 Resolved: 2016-02-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Debian |
| Affects Version/s: | 10.0.23 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Infi Nity | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | armhf | ||
| Environment: |
Debian Jessie (ARMBian), armhf (Banana Pi - comparable to Raspberry Pi 2 platform). Installing from "testing" Repository (also unstable repository with same issue) |
||
| Description |
|
Hello, there is no root-password prompt during installation of mariadb-server 10.0.23-2 out of unstable and testing repos of debian for arm systems. Even if I set a password manually with:
it will still not work. Also configuring the coresponding *my.cnf* file does not help:
This is reproducable. If I install an older MariaDB-Server (10.0.23-0+deb8u1) it will direclty ask for a new root password during installation process. The issue affects in my case the installation of a seafile server. This comes during installation of seafile server in combination with mariadb-server:
|
| Comments |
| Comment by Elena Stepanova [ 2016-02-11 ] | ||||||
|
What exactly do you mean by "it will still not work" about mysqladmin, and "does not help" about my.cnf? What happens when you do either of that? | ||||||
| Comment by Infi Nity [ 2016-02-11 ] | ||||||
|
I mean with that, that the password will still not be set somehow. 1. Problem: During fresh install of MariaDB 10.0.23-2 (clean system without prior MariaDB/MySQL installations) the usually coming blue screen with prompt for setting a root password won't come up. The installation will just finish without any prompt for setting a password.
2. Then I tried to set manually a password via "mysqladmin -u root password MYPASSWORD" and I thought it is set, as no error message comes up. But afterwards during install of Seafile the same error message comes again:
3. Then I decided to make this configfile containing the root password:
And again I tried to install Seafile, but again I got the very same error message. 4. Then I installed Mariadb-server 10.0.23-0+deb8u1, which prompted directly during installation in a blue screen to set root password and seafile installed flawlessly afterwards. Something is odd with the recent version of MariaDB-Server 10.0.23-2 :/ | ||||||
| Comment by Elena Stepanova [ 2016-02-12 ] | ||||||
|
The problem with the dialog screen is to be looked at; but lets figure out the password creation issue. I don't know how Seafile works and what its requirements are, but a third-party tool is not a good way to check whether the basic password creation works. First of all, if root password is not set during installation, it should be empty, so it's very much possible to connect – not safe, but definitely possible. You should be able to connect (using mysql client) without the password option at all, or using -p and pressing enter in the prompt. Could you please try? In fact, you did exactly that when you ran your mysqladmin command – you used it without any password and were able to connect. Secondly, could you please repeat the exercise after you have set the password via mysqladmin? You should not be able to connect without the password option anymore, but your new password should work. If you are able to connect, after you do so, please run SELECT CURRENT_USER() to make sure you indeed are connected as root@localhost, and not any other root, e.g. root@'127.0.0.1' or root@<domain name>. It is important because when you enter the password via the dialog (a.k.a. "blue screen"), it sets this password for all these roots simultaneously, while mysqladmin only does it for the root you are connected with. Finally, I doubt that the client section of the config file will work for Seafile (but then again, I'm not sure how it establishes the connection); but it should work for the regular client. After we make sure that password actually works, we will ask otto about this unstable build and where the screen could have gone --it's not built by MariaDB, so he knows better how it's different from the stable one. | ||||||
| Comment by Otto Kekäläinen [ 2016-02-12 ] | ||||||
|
This is not a bug, more of an documentation/support issue. MariaDB in the official Debian Jessie release is different fromt he MariaDB in the next Debian release (testing/Stretch) despite the upstream number version being the same (10.0.23). The new version uses passwordless root via unix socket authentication. So you can simply run as root (or sudo) 'mysql -u root' and you will then have the root prompt. From there you can run whatever 'GRANT USER' statements to create a user with whatever name, password and access rights you need. It is not recommended to run Seafile with the MariaDB root user. Instead create a user called 'seafile' that has only the permissions it needs (e.g. access to seafile database and tables). | ||||||
| Comment by Infi Nity [ 2016-02-12 ] | ||||||
|
Tanks for your explanation Otto But are you aware, that this breaks compatibility with the older versions and is apparently incompatible with the original MariaDB behaviour? Now I understand the approach of avoiding the root thing, but seafile (or its installer script) for example relies on having a MySQL user prior to seafile Installation. During installation it asks for the MySQL-root-user password and after typing this root password in (which hat to be set during mariadb installation blue screen), seafile-instaler connects to MySQL and gives you the prompt to create the MySQL-seafile-user. So without root-account you can't create the seafile-user for MySQL. Apparently it is actually not supposed to use the root-user as stated by you, but currently it is mandatory to have a set root-password to be able to create a 'seafile'-user with less permissions. By the way... if I play around today evening with your 'mysql -u root' way and then it will hyperthetically work to create the 'seafile'-user... how do I set the given permissions? I don't know anything about it? Usually the 'seafile'-installer-script did create the user (also demanded permissions I guess)... That means that because of the mentioned change in mariadb armhf testing/unstable, that the seafile installer script (and probably many others relying on MySQL) need to be rewritten? @Elena Stepanova With best regards | ||||||
| Comment by Infi Nity [ 2016-02-13 ] | ||||||
|
@Elena Stepanova One thing I have to mention: MariaDB-server installation is done as root, but seafile installation is started as unpriviledged user seafile: And in this python script this section might be the problem when executing as unpriviledged user and not having a mysql-root-password already set:
Coming to your steps:
I don't know how to connect, and especially as a "client" and I don't know where to use the argument -p. It's the first time I use MySQL and actually I am not even using it... seafile uses it
Sounds plausible, I just copied the commands and saw (without any plan about this) that the seafile installation (started as unpriviledged user) stopped with the initially stated error message of failed connection with root.
Unfortunately I don't know how to connect and also how to make sure whether I'm connected as root@localhost.
This might be the whole problem! Without setting for all roots in combination with later starting the seafile setup as unpriviledged user.
Unfortunately I don't understand the structure of mariadb, so I also don't know what the client section might be and what the "regular client is" Sorry for not being helpful with this :/ I just wanted to report some Kind of bug, which affects the installation of seafile. Now it turns out that this is a change, which might lead the seafile-developers and many others I guess to change their Installation scripts. In my case I will just use the stable build of mariadb, but I hope that an apt-get update / apt-get upgrade won't brick my server / mysql databases because of this change! | ||||||
| Comment by Elena Stepanova [ 2016-02-15 ] | ||||||
|
Thanks, I've installed and tried 10.0.23-2, and also took a quick look at Seafile installation process, so now I see what's happening. As otto explained above, it's the new way Debian chose to deal with local root accounts, it does not depend on us, so I'm closing the issue. If you have objections regarding this decision, you need to go through Debian channels instead. Meanwhile, to get your Seafile work, you can use one of two ways. First, instead of using setup-seafile-mysql.sh, you can do configuration manually, as described in the Seafile manual (search for "However, sometimes you have to use the second way"). For that, you need to connect to MariaDB server:
run the SQL commands described in the manual, then run quit to exit the MariaDB prompt, and follow further instructions for Seafile installation. Secondly, you can make MariaDB server behave the usual way. As follows from Otto's comment, it is not recommended and probably isn't tested well enough with debian maintenance scripts, but at the end you are the master of your MariaDB installation. If you want to do so, you need, again, connect to the server
then run
Then you can run setup-seafile-mysql.sh as usual, with the MariaDB user root and password that you've just set. | ||||||
| Comment by Otto Kekäläinen [ 2016-02-15 ] | ||||||
|
Infinity85 I suggest you file a bug on Seafile that they have database username hardcoded in their installation script. You should be able to create a new user and database 'seafile' that Seafile uses instead of simply root. Commands how to create you custom user: https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql You can run simply 'sudo mysql' to access the console. |