LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-12-2007, 06:16 PM   #1
almost000
Member
 
Registered: Apr 2007
Distribution: Fedora 7,Windows 3.11-9X/ME,Windows 2000/XP/Vista
Posts: 107

Rep: Reputation: 15
Arrow gallery2: I need help with MySQL


I know very little on MySQL. and I love to get up gallery2



Code:
We received the following database related errors:

Warning: mysqli_real_connect() [function.mysqli-real-connect]: (28000/1045): Access denied for user 'gallery2'@'localhost' (using password: YES) in /var/www/html/gallery2/lib/adodb/drivers/adodb-mysqli.inc.php on line 108
Could't connect :
localhost: Connection error to server 'localhost' with user 'gallery2'



I also get the error
Code:
 Warning: Output buffering is enabled in your PHP by the output_buffering parameter(s) in php.ini. Gallery can function with this setting - downloading files is even faster - but Gallery might be unable to serve large files (e.g. large videos) and run into the memory limit. Also, some features like the progress bars might not work correctly if output buffering is enabled unless ini_set() is allowed.

Last edited by almost000; 05-12-2007 at 10:06 PM.
 
Old 05-12-2007, 07:26 PM   #2
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
I have no clue what the heck gallery2 is, but it says access is denied. Are you sure that you are passing the correct username/password to mysql? It is trying to connect as 'gallery2'@'localhost'
 
Old 05-13-2007, 12:27 AM   #3
taxtropel
Member
 
Registered: Mar 2005
Location: Cascade Mountains WA USA
Distribution: Linux From Scratch (LFS)
Posts: 149

Rep: Reputation: 16
Well it's obvious from the error message that gallery2 is a PHP web-based gallery. (you know, photos, vidoes, and other graphical knick-knacks)

First off, are you sending the right user name and password to mysql?

Secondly, does that user (the user is in MySQL) have permission to access files from the remote host.
(the error refers to localhost, but the error could just as well say myhost.org or something if you were
trying to access your gallery from the outside world and myhost.org was your server name)

did you install MySQL your self, or did it come pre-packaged by your distro?

if you installed it your self first you need to run (as the system root user)
Code:
 mysql_install_db
if you have yet to login to your mysql then you need to do so as the mysql root user and setup the mysql-root password
*note, that's the MySQL root user, not your systems root user.
(however you may need to be system root (su) in order to run mysqladmin)
Anyhow login as the mysql root and set your password like this:
Code:
 mysqladmin -u root password 'new-password'
ok, now you are ready to do some real setup regarding gallery2's mysql database

First you need to setup the database that gallery2 uses
do you know what this is called? it should be in the gallery2 config files or in the documentation
if you need to make one then the command is:
Code:
 
mysqladmin -h localhost -u root -ppassword create gallerydatabasename
obviously replace "gallerydatabasename" with the right name for gallery2's database.


first off start mysql client as the root user with
Code:
 mysql -h localhost -u root -ppassword
* note the lack of space between "-p" and "password"
once logged in it will provide you with a nice prompt of
Quote:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.41

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
now we can add a user for gallery2

Code:
 
GRANT ALL PRIVILEGES ON gallery2databasename.* TO 'gallery2'@'%' IDENTIFIED BY 'some_password';
the 'gallery2'@'%' will provide access to the usernamed gallery2 on all hosts (probably what you want)

next is to flush the grant table

Code:
 FLUSH PRIVILEGES;
and finaly quit mysql client

Code:
 quit
and that should set your mysql up enough to get gallery2 working

Yay!!

have fun
 
Old 05-13-2007, 12:52 AM   #4
almost000
Member
 
Registered: Apr 2007
Distribution: Fedora 7,Windows 3.11-9X/ME,Windows 2000/XP/Vista
Posts: 107

Original Poster
Rep: Reputation: 15
Smile Wow that was fast.

Well that worked. but my MySQL was installed.

I am surprise that some one that does not know about gallery. thank you for your help.

thank you taxtropel

Last edited by almost000; 05-13-2007 at 12:56 AM.
 
Old 05-13-2007, 01:12 AM   #5
taxtropel
Member
 
Registered: Mar 2005
Location: Cascade Mountains WA USA
Distribution: Linux From Scratch (LFS)
Posts: 149

Rep: Reputation: 16
No worries
I could tell what gallery2 was by the error message you posted. Good on you!
And it's a pretty standard PHP / MySQL type error.
BTW both PHP and MySQL have great documentation online at each respective website.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 03:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) sunlinux Linux - Software 1 11-07-2006 01:08 AM
Gallery2 Manual Backup JerryMcFarts Linux - Software 4 05-27-2006 01:00 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM


All times are GMT -5. The time now is 10:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration