I’m new to use couchbase, I have uploaded package from ‘https://github.com/ytake/Laravel-Couchbase’,
using laravel 5.5.
and I follow with the readme like below
in app/config.php:
'couchbase' => [
'driver' => 'couchbase',
'host' => 'couchbase://127.0.0.1',
'user' => 'test', // optional administrator
'password' => 'test123', // optional administrator
// optional configuration / management operations against a bucket.
'administrator' => [
'user' => 'Administrator',
'password' => 'password',
],
],
in controller file:
public function index(){
/* it can work
$cluster = new \CouchbaseCluster('127.0.0.1');
$cluster->authenticateAs('test','test123');
$bucket =$cluster->openBucket('mall_orders');
$query = \CouchbaseN1qlQuery::fromString('SELECT * FROM mall_orders ');
$results = $bucket->query($query);
var_dump($results);
*/
DB::connection('couchbase')->table('mall_activities')->get();
}
and I got a problem
LCB_AUTH_ERROR: Authentication failed. You may have provided an invalid username/password combination (SQL: select * from mall_activities)