Trouble setting up a gallery3 instance
Tahaan
Joined: 2013-11-15
Posts: 3 |
Posted: Mon, 2013-11-18 08:24 |
I am having a problem similar to many other users here. After entering the mysql connection informtion I get the error Quote:
Uh oh! Someone posted, and I quote... Quote:
At least one piece of information you are feeding gallery is incorrect I have confirmed that the password and username is correct. I can log in with that user name and password on the commandline (ie using "mysql -u root -p") I have tried both "localhost" as well as the hostname. The user in any case does not seem to be "allowed" from outside, eg: mysql> select host,user,super_priv from mysql.user where user="root"; +-----------+------+------------+ | host | user | super_priv | +-----------+------+------------+ | localhost | root | Y | | 127.0.0.1 | root | Y | +-----------+------+------------+ 2 rows in set (0.00 sec) The database name certainly is right, and I must criticise that the "Quick Start page" does not tell you to create a database before hand. But now the database does exist (and the problem persists): The database exists (as seen by show databases) ... but how do I confirm that it is ok? What else have I tried?
More info:
Furthermore and this may be telling: A few weeks prior to this I succesfully installed gallery3 on another virtual host on the same system (hosted on AWS fwiw). That was my first attempt at gallery3, really just a quick trial, and it worked after a few false starts. I recall that I manually created the database and tried to create a "non-root" admin for the gallery database. But I gave up and then just tried to do it "the normal way" and so I started over... thought probably not "fresh". That installation worked for a while, I was able to create users, galleries, upload pictures, and so on. In fact the gallery can still be browsed by anonymous users, but when I try to log in I get an error like this: Quote:
We tried really hard, but it's broken. No amount of talking to myself have helped in fixing this. I have even reset the admin password thinking it got changed using advice found on these forums (which lets me log in as admin and all appears OK, until I try to log out and log in using the normal method again) FWIW the above troubleshooting is about the extent of my skill, I am no DBA Maybe some system log or mysql log would reveal the cause of my woes... Once I sort out this whole thing I will see whether I can add/update a wiki page with mea learning somewhere. |
|
Posts: 3
I also want to mention, just in case it matters, that I did rename the installation directory from "gallery3" to "gal". This did not seem to matter the last time I tried gallery3.
Posts: 1857
Are you still working on this?
Stop using the root user.
Create a new user and give that new user permissions on the database.
Give Gallery the username and password for that new user.
Posts: 3
I had to make my Apache installation less secure to get it to work. I found hints to the solution while looking at the .htaccess file (The one provides with Gallery3)
In /etc/apache2/apache2.conf I use
AllowOverride None
I had to change the Site config to specify
AllowOverride All
Which I do not think is a very good idea, I need to restrict it a bit further but have not yet had time to do so. Specifically I would like to restrict the site root and allow only needed Overrides in the Gallery directory, and only those sub-directories that actually need it.
In any case after setting AllowOvertide = All The gallery installation started to work, any I can now set up a specific user and give it access to only the gallery3 DB for that specific site.
Thank you,
_Johan
Posts: 1857
Setting AllowOverride to None will cause all htaccess to be ignored.
You can limit what directories you allow to override, and you can limit what overrides are allowed; you don't have to allow everything to be overridden everywhere on the server.
EDIT: Not sure what you already do or don't know, but can start here with the official docs: http://httpd.apache.org/docs/current/mod/core.html#allowoverride