Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALTER USER 'root'@'localhost' does not work on MariaDB 10.1 #220

Closed
aalmenar opened this issue Sep 19, 2018 · 2 comments
Closed

ALTER USER 'root'@'localhost' does not work on MariaDB 10.1 #220

aalmenar opened this issue Sep 19, 2018 · 2 comments

Comments

@aalmenar
Copy link

Cookbook version

master from github (2.0.0) at this time

Chef-client version

14.4.56

Platform Details

Debian 9 and Debian Testing

Scenario:

[What you are trying to achieve and you can't?]

Steps to Reproduce:

mariadb_server_install 'MariaDB Server install' do
action [:install, :create]
version '10.1'
password 'mypassword'
end

Expected Result:

Install and change root password

Actual Result:

================================================================================
Error executing action create on resource 'mariadb_server_install[MariaDB Server install]'
================================================================================

       Mixlib::ShellOut::ShellCommandFailed
       ------------------------------------
       bash[generate-mariadb-root-password] (/tmp/kitchen/cache/cookbooks/mariadb/resources/server_install.rb line 60) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
       ---- Begin output of "bash"  "/tmp/chef-script20180919-7647-zzq1so" ----
       STDOUT:
       STDERR: ERROR 1064 (42000) at line 1: 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 'USER 'root'@'localhost' IDENTIFIED BY 'mypassword'' at line 1
       ---- End output of "bash"  "/tmp/chef-script20180919-7647-zzq1so" ----
       Ran "bash"  "/tmp/chef-script20180919-7647-zzq1so" returned 1

Using this on CLI works:

mysql [root@(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypassword');

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypassword')

Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql [root@(none)]>

@aalmenar aalmenar changed the title echo "ALTER USER 'root'@'localhost' does not work on MariaDB 10.1 ALTER USER 'root'@'localhost' does not work on MariaDB 10.1 Sep 19, 2018
@askz
Copy link

askz commented Dec 19, 2018

Same here..

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants