Error in mysql #4

Closed
paulschwarz opened this Issue May 21, 2012 · 8 comments

Comments

Projects
None yet
3 participants

[Mon, 21 May 2012 18:50:04 +0200] INFO: execute[add-admin-user] sh(/usr/bin/mysql -u root -proot -e "CREATE USER 'myadmin'@'localhost' IDENTIFIED BY 'myadmin';G
RANT ALL PRIVILEGES ON . TO 'myadmin'@'localhost' WITH GRANT OPTION;CREATE USER 'myadmin'@'%' IDENTIFIED BY 'myadmin';GRANT ALL PRIVILEGES ON . TO 'myadmin'
@'%' WITH GRANT OPTION;" mysql)
[Mon, 21 May 2012 18:50:04 +0200] ERROR: execute[add-admin-user](vagrant_main::default line 49) had an error: Expected process to exit with [0], but received '
1'
---- Begin output of /usr/bin/mysql -u root -proot -e "CREATE USER 'myadmin'@'localhost' IDENTIFIED BY 'myadmin';GRANT ALL PRIVILEGES ON . TO 'myadmin'@'local
host' WITH GRANT OPTION;CREATE USER 'myadmin'@'%' IDENTIFIED BY 'myadmin';GRANT ALL PRIVILEGES ON . TO 'myadmin'@'%' WITH GRANT OPTION;" mysql ----
STDOUT:
STDERR: ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'myadmin'@'localhost'
---- End output of /usr/bin/mysql -u root -proot -e "CREATE USER 'myadmin'@'localhost' IDENTIFIED BY 'myadmin';GRANT ALL PRIVILEGES ON . TO 'myadmin'@'localho
st' WITH GRANT OPTION;CREATE USER 'myadmin'@'%' IDENTIFIED BY 'myadmin';GRANT ALL PRIVILEGES ON . TO 'myadmin'@'%' WITH GRANT OPTION;" mysql ----
Ran /usr/bin/mysql -u root -proot -e "CREATE USER 'myadmin'@'localhost' IDENTIFIED BY 'myadmin';GRANT ALL PRIVILEGES ON . TO 'myadmin'@'localhost' WITH GRANT
OPTION;CREATE USER 'myadmin'@'%' IDENTIFIED BY 'myadmin';GRANT ALL PRIVILEGES ON . TO 'myadmin'@'%' WITH GRANT OPTION;" mysql returned 1

Owner

ymainier commented May 21, 2012

I merged the pull requests from @ciastek and now it seems to work completely on my macbookpro.
=> INFO: Ran execute[add-admin-user] successfully \o/

Could you retry from windows (from scratch) with the last version on github ?
Note that, once you cloned the vagrant-lamp repository, you no longer need to run vagrant init
You only need to do a vagrant up

@ciastek's changes were a nice improvement and fixed the main issue which was the lack of "build-essential", however I am still getting a mysql error right at the end.

https://gist.github.com/2774519

Contributor

ciastek commented May 26, 2012

@paulsschwarz can't replicate your problem

Nor can I anymore! I'm not sure what's changed but I used to repeat-ably get a mysql error during provisioning, now it works.

paulschwarz reopened this May 30, 2012

I'm not sure how chef treats this, but could it be that because the mysql user already exists, provisioning a second time causes and error?

Contributor

ciastek commented May 31, 2012

Sorry, I'm lost. I don't know how to make proper pull request. :)

Owner

ymainier commented Jun 4, 2012

Hi,

Sorry for the response time !

@ciastek : It seems to be a nice solution, I'll test it this evening and take this change into account. Unfortunately I think that I will have to make a git-cherry-pick to include your commit without a pull request, so we will lose your original reference :( (I'll add it in the commit message)

ymainier closed this Jun 4, 2012

Owner

ymainier commented Jun 4, 2012

Thank you @ciastek for the correction once again ! You can note that the reference to your original commit is not lost :)
And thanks @paulsschwarz for opening the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment