Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

msyslog logging to a mysql database

  • 27-02-2002 2:57pm
    #1
    Closed Accounts Posts: 8


    Im trying to set up msyslog (modular syslog) to log directly to a databse
    however i am having a lot of trouble with it! IE it logs nothing now!!

    I have disabled syslogd, which inturn disabled klogd.
    I installed msyslog using an rpm, so i assume everything has installed
    properly and i edited mt /etc/syslog.conf file to look like this:

    *.* mysql -u <user> -p <password> -d syslogDB -t syslogTB

    Thats what the man files say! There is no help on the website either.

    I have also created the user with said passwd, the database and the table mentioned above. I also know that the args passed to mysql in the conf file are not the same as mysql's args.

    So basically what i'm looking for is if someone knows how to configure it properly (i assume its not) to just give me a few pointers.

    TA


Comments

  • Closed Accounts Posts: 296 ✭✭moist


    Check the msyslogd man page to see if you can run it in the foreground without forking
    then you might be able to see whatever errors it might be having.

    You might even want to try using truss or strace to see that msyslogd is doing
    and see what problems it is having.

    Are you sure that /etc/syslog.conf is the config file for it ?
    The above methods should tell you if its trying to open a different config file.

    Also some versions of syslog only allow you to use tabs in the config file
    they don't like spaces, so if you copied and pasted they are probably spaces.
    i.e. you should have...

    *.*<TAB><TAB>mysql -u <user> -p <password> -d syslogDB -t syslogTB


    Try them for a start....


  • Registered Users, Registered Users 2 Posts: 1,982 ✭✭✭ObeyGiant


    Originally posted by daedalusxr
    *.* mysql -u <user> -p <password> -d syslogDB -t syslogTB
    I've not used this, but from a little experience of using MySQL, I know that "-p <password>" hasn't worked on any machine I've worked on. -p, when followed by a space tells mysql to prompt you for a password. You need to set -p=<password>, or --password=<password> for it to accept the password on the command line.

    Might wanna give that a go?


  • Closed Accounts Posts: 3,859 ✭✭✭logic1


    Originally posted by ObeyGiant

    I've not used this, but from a little experience of using MySQL, I know that "-p <password>" hasn't worked on any machine I've worked on. -p, when followed by a space tells mysql to prompt you for a password. You need to set -p=<password>, or --password=<password> for it to accept the password on the command line.

    Might wanna give that a go?

    Yeah you're dead right there. Any time I've ever used sql I log in with:

    mysql -u <user> -p <return>
    password: <pass>

    Taken from: MYSql.com
    When you login to a MySQL server with a command line client you should specify the password with --password=your-password. See section 4.2.8 Connecting to the MySQL Server.

    mysql --user=monty --password=guess database_name

    If you want the client to prompt for a password, you should use --password without any argument

    mysql --user=monty --password database_name

    or the short form:

    mysql -u monty -p database_name

    Note that in the last example the password is not 'database_name'.

    If you want to use the -p option to supply a password you should do so like this:

    mysql -u monty -pguess database_name

    On some systems, the library call that MySQL uses to prompt for a password will automatically cut the password to 8 characters. Internally MySQL doesn't have any limit for the length of the password.


    .logic.


Advertisement