MySQL Connection Error !!

4 replies
xserver
xserver's picture
Joined: 11/21/2009
User offline. Last seen 34 weeks 5 days ago.

Recently i installed greenSQL and finished the configuration.

But when i launch greenSQL

sudo /etc/init.d/greensql-fw start

I get Error in /var/log/greensql.log

Mysql error: Access denied for user 'usergreen'@'localhost' (using password: YES)

Config File

[database]
dbhost=localhost
dbname=greendb
dbuser=usergreen
dbpass=greenpassword
#dbport=3306

I can successfully use the same user name and log into MySQL

testing@testing:~$ mysql -u usergreen -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 205642
Server version: 5.0.67-0ubuntu6 (Ubuntu)

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

mysql> use greendb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>

xserver
xserver's picture
Joined: 11/21/2009
User offline. Last seen 34 weeks 5 days ago.

Nothing ?

yuli
yuli's picture
Joined: 01/30/2008
User offline. Last seen 2 days 2 hours ago.

Hello

Please check if usergreen user has access to greendb database.
Another idea is to change localhost to 127.0.0.1 in the greensql configuration file.

Yuli

xserver
xserver's picture
Joined: 11/21/2009
User offline. Last seen 34 weeks 5 days ago.

Hello Yuli ,

As you can see in my first post, i have logged into mysql using "mysql -u usergreen -p " and selected the "greendb" database.

It means usergreen is allowed to access mysql and respective database.

As far 127.0.0.1 instead of localhost is concerned, i have already tried but the problem remains the same.

yuli
yuli's picture
Joined: 01/30/2008
User offline. Last seen 2 days 2 hours ago.

Hello

It is possible that SElinux is installed on your server. Please check the readme.txt file.

http://greensql.svn.sourceforge.net/viewvc/greensql/trunk/greensql-conso...

Thanks,
Yuli

Back to top