# mysql\_database resource does not create database ... and chef-client -ldebug not showing any log output from database cookbook

**URL:** <https://discourse.chef.io/t/mysql-database-resource-does-not-create-database-and-chef-client-ldebug-not-showing-any-log-output-from-database-cookbook/4085>\
**Category:** Chef Infra (archive)\
**Created:** [June 13, 2013, 4:04am UTC](https://discourse.chef.io/t/mysql-database-resource-does-not-create-database-and-chef-client-ldebug-not-showing-any-log-output-from-database-cookbook/4085 "2013-06-13T04:04:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jay\_Pipes](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jay_pipes/32/478_2.png) [@Jay\_Pipes](https://discourse.chef.io/u/Jay_Pipes)\
**Post date:** [June 13, 2013, 4:04am UTC](https://discourse.chef.io/t/mysql-database-resource-does-not-create-database-and-chef-client-ldebug-not-showing-any-log-output-from-database-cookbook/4085/1 "2013-06-13T04:04:19Z")

</div>

Hi Chefs,

I am trying to debug a seemingly normal and correct call to create a new  
database and db user:

mysql\_database “install reviewdb” do  
connection mysql\_info  
database\_name db\_name  
action :create  
end

mysql\_database\_user db\_username do  
connection mysql\_info  
password db\_password  
database\_name db\_name  
host db\_address  
action [:create, :grant]  
end

I’ve validated all of the mysql\_info credentials are correct, but this  
code never seems to get run. Or at least, I can see no record of it  
running. The database and the user never get created, and when I run  
chef-client -ldebug, I see no log output at all from the database cookbook.

Can someone tell me if I’m doing something wrong or how I can see what  
the database cookbook LWRPs are actually doing in the chef-client log  
output?

Thanks much!  
-jay

---

<div class="post-metadata">

**Author:** ![jdunn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jdunn/32/1800_2.png) [@jdunn](https://discourse.chef.io/u/jdunn)\
**Post date:** [June 13, 2013, 5:32pm UTC](https://discourse.chef.io/t/mysql-database-resource-does-not-create-database-and-chef-client-ldebug-not-showing-any-log-output-from-database-cookbook/4085/2 "2013-06-13T17:32:38Z")

</div>

Can you paste the output of the run (with debugging turned on) somewhere?

- Julian

On Thu, Jun 13, 2013 at 12:04 AM, Jay Pipes [jaypipes@gmail.com](mailto:jaypipes@gmail.com) wrote:

> Hi Chefs,
> 
> I am trying to debug a seemingly normal and correct call to create a new  
> database and db user:
> 
> mysql\_database "install reviewdb" do  
> connection mysql\_info  
> database\_name db\_name  
> action :create  
> end
> 
> mysql\_database\_user db\_username do  
> connection mysql\_info  
> password db\_password  
> database\_name db\_name  
> host db\_address  
> action [:create, :grant]  
> end
> 
> I've validated all of the mysql\_info credentials are correct, but this  
> code never seems to get run. Or at least, I can see no record of it  
> running. The database and the user never get created, and when I run  
> chef-client -ldebug, I see no log output at all from the database cookbook.
> 
> Can someone tell me if I'm doing something wrong or how I can see what the  
> database cookbook LWRPs are actually doing in the chef-client log output?
> 
> Thanks much!  
> -jay

--  
[Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com) \* Sorry, I'm ]  
[WWW: [Julian Dunn's Blog - Commentary on media, technology, and everything in between.](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
[gopher://sdf.org/1/users/keymaker/ \* compliant!]  
[PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]

---

<div class="post-metadata">

**Author:** ![Matt\_Ray\_OPSCODE](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_ray_opscode/32/459_2.png) [@Matt\_Ray\_OPSCODE](https://discourse.chef.io/u/Matt_Ray_OPSCODE)\
**Post date:** [June 13, 2013, 7:16pm UTC](https://discourse.chef.io/t/mysql-database-resource-does-not-create-database-and-chef-client-ldebug-not-showing-any-log-output-from-database-cookbook/4085/3 "2013-06-13T19:16:53Z")

</div>

Using mysql 3.0.2 and database 1.4.0 I’m able to use those commands with the following recipe:

> <https://github.com/mattray/testing-cookbook/blob/master/recipes/mysql_test.rb>

recipe[testing::mysql\_testing] is the only thing in my run list, the table is created and I’m able to connect as the created user.

Thanks,  
Matt Ray  
Cloud Integrations Product Lead :: Opscode[http://opscode.com](http://opscode.com)  
512.731.2218 :: [matt@opscode.com](mailto:matt@opscode.com)  
mattray :: GitHub[http://github.com/mattray/](http://github.com/mattray/) :: IRC :: Twitter[http://twitter.com/mattray](http://twitter.com/mattray)

* * *

From: Julian C. Dunn  
Sent: Thursday, June 13, 2013 12:32 PM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: mysql\_database resource does not create database … and chef-client -ldebug not showing any log output from database cookbook

Can you paste the output of the run (with debugging turned on) somewhere?

- Julian

On Thu, Jun 13, 2013 at 12:04 AM, Jay Pipes \<[jaypipes@gmail.com](mailto:jaypipes@gmail.com)[mailto:jaypipes@gmail.com](mailto:jaypipes@gmail.com)\> wrote:  
Hi Chefs,

I am trying to debug a seemingly normal and correct call to create a new database and db user:

mysql\_database “install reviewdb” do  
connection mysql\_info  
database\_name db\_name  
action :create  
end

mysql\_database\_user db\_username do  
connection mysql\_info  
password db\_password  
database\_name db\_name  
host db\_address  
action [:create, :grant]  
end

I’ve validated all of the mysql\_info credentials are correct, but this code never seems to get run. Or at least, I can see no record of it running. The database and the user never get created, and when I run chef-client -ldebug, I see no log output at all from the database cookbook.

Can someone tell me if I’m doing something wrong or how I can see what the database cookbook LWRPs are actually doing in the chef-client log output?

Thanks much!  
-jay

–  
[Julian C. Dunn \<[jdunn@aquezada.com](mailto:jdunn@aquezada.com)[mailto:jdunn@aquezada.com](mailto:jdunn@aquezada.com)\> \* Sorry, I’m ]  
[WWW: [http://www.aquezada.com/staff/julian](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
[gopher://sdf.org/1/users/keymaker/[http://sdf.org/1/users/keymaker/](http://sdf.org/1/users/keymaker/) \* compliant! ]  
[PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]
