![]() The only thing I can't explain is why the UNIX_SOCKET plugin is regularly set on each account of the database, without any action on my side. So you can safely disable it if you don't use unix socket as a logging-in method. In fact, this plugin is an authentication plugin and not a method of communication with the SQL server. So I've got a better comprehension of the probem there's an UNIX_SOCKET plugin that can let you log in a MariaDB account without having to create a password, because it uses the shell's credentials to trust you, without having to enter any password. After my MySQL va repaired, in PMA, I can see that the connection is established through an Unix socket.ĮDIT, some months later: I'm now used to have this problem come back frequently, I think at each update of MariaDB (or something like that). This will not necessarily disable the connection via Unix socket. Then, restart MySQL in normal mode and you should be able to connect to the root account. ![]() Privileges parameters need to be saved explicitly: FLUSH PRIVILEGES If not, update it with: UPDATE user SET password=PASSWORD("my_password") WHERE user="root" UPDATE user SET plugin="" // without WHERE clauseĪlso, make sure that a password is defined, because sometimes it seems to be erased (select on user, password fields). I had to reset the plugin field of each entry to a blank string. Look at the plugin field into the er table: MariaDB > SELECT user, plugin FROM user (not necessary at all, read my edits at the end of the post) Reboot MySQL/MariaDB using -skip-grant-tables (search for tutorials on the web). MariaDB > sudo service mysql mysql -uroot -pnewPassĮRROR 1698 (28000): Access denied for user have found a solution that is as strange as the problem itself. MariaDB > update user set password=PASSWORD("newPass") where user='root' Type '\c' to clear the current input statement. Server version: 10.0.20-MariaDB-0ubuntu0.15.04.1 (Ubuntu)Ĭopyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. + Terminé 1 sudo mysqld_safe mysql -u root Remove all -log-error configuration options for -syslog to take effect.ġ50802 19:07:25 mysqld_safe Logging to '/var/log/mysql/error.log'.ġ50802 19:07:25 mysqld_safe A mysqld process already exists 150802 19:07:25 mysqld_safe Can't log to error log and syslog at the same time. See that: sudo mysqld_safe -skip-grant-tables & I tried the usual method to reset the root password (skip grant tables mounting and reset the passord) but it seems it doesn't works. I tried via a terminal, same problem, and it is because my password is wrong. It said: "Cannot log in to the MySQL server". The compose seems to work fine, however when I try to update my database from a dump (this exec is just for testing so fine that it isn't hands-off) using this command:ĭocker exec -i my_db_containter mysql -uroot -pmypassword < dbserver/sqlconfig/db_dump.sqlĮRROR 1045 (28000): Access denied for user (using password: YES)Ĭan anyone spot what I might be doing wrong here, is able to perhaps suggest an alternative solution to setting the server root password in this manner?ĮDIT: After doing some more reading, it seems like even this method isn't that secure as it just seems to mount a read-only file in the container? Does anyone have any suggestions as to how I can automatically and securely set the MYSQL_ROOT_PASSWORD, ideally without swarm? If swarm really is the only option then I guess I can look into it.Today, I wanted to create a database in PMA. I read that it was possible to do it using docker compose so I have written a YAML for it, however it does not seem to be working. I have tried multiple ways of getting this to work, including BuildKit secrets, but am trying to avoid using Swarm if possible. ![]() I want to be a completely hands-off build. I'm trying to create a docker build/compose where I can securely set the root password for my MariaDB server at build/runtime rather than having to do it manually in the shell through docker exec. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |