MySQL woes(far from over)

Ok, my apologies guys. I accidentally set thread: http://www.igniterealtime.org/community/thread/32612?tstart=15 as “Answered”.

Though I must say Coolcat jumped in and gave me a good explanation. The overall issue I believe stems from what I was harping about in the 1st post on thread: http://www.igniterealtime.org/community/thread/32610?tstart=0

Some odd reason, I cannot get ANYTHING to connect to the blasted MySQL service aside from the CLI! I tried googling for a setup walkthrough for openfire and I’ve came across a setup in which I apparently am using the correct settings. Yet here I am still wrestling with getting MySQL to accept the connection!

A connection to the database could not be made. View the error message by opening the “/logs/error.log” log file, then go back to fix the problem.

I keep getting that error there but I’ll be honest with you guys. I have not 1 clue as to what I am reading and what to look for when I read that log! Now, alot of folks I am coming across either “edited” something in the my.cnf file and BAM! It started working as needed. While some others, never had to touch it a day in their admin lives. In this case is it possible I may need to edit it?

I think you need to allow access from a remote address, something like:

mysql>grant all on openfire.* to <user>@’%’ identified by ‘password’ where % specifies any IP (literally) - something you don’t want to do if your host is internet facing.

If you want openfire to connect to a local DB server that it’s running on, replace ‘%’ with 127.0.0.1

Thanks Martyn.

I should apologize for not providing more info. Just that I been at this for nights on end and its starting to wear me down now. The server is THIS machine right here. So, theres no remote host. Im running MySQL5.0 on PCLinux07(based off Mandriva*). All things that would be connecting to this DB service is openfire and a few webscripts. I’d imagine in a case like this, I dont need to take it off localhost type settings. But I DO however wish to at least be able to use the MySQL GUI Tool as well.

In the end, it just comes down to where its not letting anything connect to it locally. Besides the user I created for the openfire DB. How do I get Root to at least get access to the server?

No worries - have you run that command giving explicit access to your openfire user ?

I had to give my OF user explicit rights on my CentOS server. I’m assuming you’ve also setup the default permissions and tables for MySQL ?

Martyn wrote:

No worries - have you run that command giving explicit access to your openfire user ?

I did. Set it to “localhost” as suggested but Im still not getting through.

I’m assuming you’ve also setup the default permissions and tables for MySQL ?

No, MySQL was installed via package manager. So all that was done on its own.

I have a question: Ok, when I 1st was having complications withthis same issue a person I knew had me remove a line called “skip-networking” in my.cnf. I tried it again after I had to reinstall everything but still was not able to connect. Maybe I did it wrong(?). Would that probably help?

Mine was also installed as part of the server install, but I still had to setup the default tables. Here is my my.cnf

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

  1. Default to using old password format for compatibility with mysql 3.x

  2. clients (those using the mysqlclient10 compatibility package).

default-storage-engine=INNODB

default-character-set=utf8

old_passwords=1

http://mysql.server

user=mysql

basedir=/var/lib

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

The default-* are entries I added. May be worth checking the datdir dir on yours contains some files and see who owns them.

Martyn wrote:

Mine was also installed as part of the server install, but I still had to setup the default tables. Here is my my.cnf

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

Ok, its at THIS point the similarities in our cnf files ceased and I became even more confused.

Is there by chance a way I can EMAIL to you what I am looking at(or course after I “x” out the parts with my info)?

Do you not have those statements in your cnf file ? Without those basic statements I would guess it won’t work properly. I hasten to add I’m not a MyAQL expert or DBA.

No, I dont see them anywhere unless they are just reworded differently.

Which is why I made the suggestion to let you see it.

Thats fine if you’re not an expert. Im just happy with any advice or help that at least gets me closer to the solution then I originally was.:wink:

Are you starting MySQL with one of the scripts or started in an init script ? I’m just wondering what paramters are being passed in the command line.

It starts on its own upon system start up. So, I guess you could say its “init”.

If you grep mysql, what does it show ? For instance, mine show this:

/usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=<user ID> --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock

grep?! I have no clue what that is 0.o

I mentioned Im still learning this stuff right?^^;

I have read a few guides here & there. But I am not familiar with such a command.

Ok, assuming you’re in as root type this:

ps -ef | grep mysql

where | is pipe, shift + \

You may want to PM me rather than this trail getting really long