I'm new to LearningLocker (and also MongoDB), but am trying to get it set up on my local computer for testing. I seem to have got some way with the installation process (following: http://docs.learninglocker.net/installation/), but when I try to run the `php artisan migrate` command I keep getting an authentication failure message.
I hope this is the correct place to post - but just let me know if not.
The full error that I get is as follows:
> php artisan migrate
Status: 500 Error: Failed to connect to: localhost:27017: Authentication failed on database 'learninglocker' with username 'root': auth failed
[MongoConnectionException]
Failed to connect to: localhost:27017: Authentication failed on database 'l
earninglocker' with username 'root': auth failed
migrate [--bench[="..."]] [--database[="..."]] [--force] [--path[="..."]] [--package[="..."]] [--pretend] [--seed]
I realise that this is most likely due to my setup with Mongo, but I'm really failing to see where I may have gone wrong. For info I'm on Ubuntu 14.04 LTS Desktop, running Mongo 3.2.4 and I have Mongo PHP driver v1.6.13 installed (at least in my phpinfo() output says it's installed and enabled).
I set up the database in Mongo with `use learninglocker` and adding a user ('learnlock') with the `readWrite` role as follows:
> use learninglocker
switched to db learninglocker
> db.createUser(
... {
... user: "learnlock",
... pwd: "****",
... roles: [ { role: "readWrite", db: "learninglocker" } ]
... }
... )
Successfully added user: {
"user" : "learnlock",
"roles" : [
{
"role" : "readWrite",
"db" : "learninglocker"
}
]
}
>
I set this up in Mongo whilst authentication was disabled, then restarted with Mongo auth enabled. Logging in via the terminal and the login credentials seems to work fine:
> mongo -u learnlock -p **** --authenticationDatabase learninglocker
MongoDB shell version: 3.2.4
connecting to: test
> use learninglocker
switched to db learninglocker
>
So struggling to understand why the migrate command isn't authenticating.
I'm little unclear if this is due to my lack of knowledge around Mongo, or learninglocker. If any more output/setup/log info is needed to help then feel free to let me know.
Any help would be very much appreciated,
Cheers,
Alex
--
You received this message because you are subscribed to a topic in the Google Groups "Learning Locker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/learning-locker/3tSYHrOfuto/unsubscribe.
To unsubscribe from this group and all its topics, send an email to learning-lock...@googlegroups.com.
To post to this group, send email to learnin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
.Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
mongo 1.6.14 (stable) MongoDB database driver
mongodb 1.2.0alpha3 (alpha) 1.1.8 MongoDB driver for PHP
Never mind! I figured it out!
Hi - what did you need to do to get this working?
Admittedly I've not had chance to look back at this for quite a
while, but am planning on doing so soon, so any pointers would be
very helpful.
Cheers,
Alex
great - thanks!
Hey Alex, I actually just did a video on this process (installing Learning Locker on AWS from a Mac) in case it might help others. It's currently processing in YouTube. When it's done, it'll be available here: https://youtu.be/51Dci7B49xA