wesleytodd / YeoPress

A Yeoman generator for WordPress
Other
1.08k stars 163 forks source link

Cannot access database #105

Closed fmammoli closed 10 years ago

fmammoli commented 10 years ago

Hi, I'm having problems running the generator. Everything goes fine but, when creating the wp-config.php it outputs the error:

Cannot access database Make sure you create the database and update the credentials in the wp-config.php

But i can access the database on CLI using the same user I set on the generator. Using the generator on verbose did not gave me more information.

Entering http://yeopress.localhost/ gives me a Not Found message.

I'm just starting with wordpress so, sry if its a noob question... Thx,

wesleytodd commented 10 years ago

That message is more of a warning. Basically, there are too many reasons it might no be able to connect to the DB than I can realistically figure out. So don't worry because it will almost always say that.

For the actual connecting, it really depends on your setup. That message happens in one of two cases:

  1. The driver cannot connect to mysql
  2. The database does not already exist and user is not allowed to create databases

So, if you look here you could print out the error. I can probably add that for a future release, as verbose info.

That can give you more insight, but really is depends on your system, so I probably cannot help more than that. Good Luck.

collapsedwave commented 9 years ago

Getting this same error. Setup is a very standard MAMP configuration, and Yeopress was working as recently as a month ago. I've updated npm, yeoman and the generator in that time, so not sure where the error may have been introduced. Any suggestions?

Edit: For the record, downloading Wordpress core and installing without using the generator works 100%.

gduprez commented 9 years ago

having the same issue, does anyone figured out this MAMP / Yeopress problem ?

wesleytodd commented 9 years ago

You should check your wp-config.php and local-config.php files. The local file is one definite difference between yeopress and a raw download.

But really this is just a environment issue, unless you guys can find an error in the way yeopress is generating the configs. But I am pretty sure it is fine in most cases. Maybe you all are hitting edge cases, but unless you can figure it out on your systems I am not much help.

gduprez commented 9 years ago

Hi Welsey, thanks for the answer, i'll try to have a look on it later, keep you in touch.