Please, can anyone help with mysql?
 
When I tried to initialize Database from CA interface I had this error:
 

      Error 10040

        General Error Error while initializing the database. Cannot create the table ca_certificate. (error 20016: EXECUTE_FAILED (error 11111: Do not commit if the database or the module itself fails. (error 11111: Do not commit if the database or the module itself fails. (error 20016: EXECUTE_FAILED (error 11111: Do not commit if the database or the module itself fails. (error 11111: Do not commit if the database or the module itself fails. (error 11111: Do not commit if the database or the module itself fails.)))))))


 
 
Anyway, I proceed and I have this error when I tried to store my CA cert request..
 


      Error 690

        Configuration Error. Error while storing CA cert to dB!.
                 
                 
                Can anyone send the commands to give all the  privileges for the openca user im mysql?
                 
                I saw the "Openca Guide" and I don't found any information about mysql configuration... :(
                 
                 
                Thanks!
                 
                 
                Andr�a
                 
                 
                ----- Original Message -----
                Sent: Friday, March 04, 2005 10:19 AM
                Subject: Re: [Openca-Users] CONNECT_FAILED

                Hello folks!
                 
                Please, anyone have a "step by step" about how to set the permissions for the user OpenCa?
                 
                I'm curious... How the tables are create? There are a script inside OpenCa package wich do this for us?
                 
                What can I do for this "SELECT" problem?
                 
                I initialized OpenCa but when I tried:
                 
                [EMAIL PROTECTED] mysql]# mysql -uopenca openca -p
                Enter password:
                Welcome to the MySQL monitor.  Commands end with ; or \g.
                Your MySQL connection id is 11 to server version: 3.23.58
                Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

                mysql> use openca;
                Database changed
                mysql> show tables;
                Empty set (0.00 sec)

                mysql> exit;
                ... I don't have tables. So, where the commit, select and others will be done????
                 
                 
                In Initialization > Phase I > SQL Database Statement I have:
                 
                SQL statements for database initialization
                 
                select * from ca.ca_certificate;
                drop table ca.ca_certificate;
                create table ca.ca_certificate (ca_cert_key VARCHAR (255) NOT NULL PRIMARY KEY, format TEXT, data TEXT, dn TEXT, cn TEXT, email TEXT, status TEXT, public_key TEXT, notafter BIGINT) TYPE=BDB;
                select * from ca.crl;
                drop table ca.crl;
                create table ca.crl (crl_key VARCHAR (255) NOT NULL PRIMARY KEY, status TEXT, format TEXT, data TEXT, last_update TEXT, next_update TEXT) TYPE=BDB;
                select * from ca.crr;
                drop table ca.crr;
                create table ca.crr (crr_key BIGINT NOT NULL PRIMARY KEY, cert_key BIGINT, submit_date TEXT, format TEXT, data TEXT, dn TEXT, cn TEXT, email TEXT, ra TEXT, rao TEXT, status TEXT, reason TEXT, loa TEXT) TYPE=BDB;
                select * from ca.request;
                drop table ca.request;
                create table ca.request (req_key BIGINT NOT NULL PRIMARY KEY, format TEXT, data TEXT, dn TEXT, cn TEXT, email TEXT, ra TEXT, rao TEXT, status TEXT, role TEXT, public_key TEXT, scep_tid TEXT, loa TEXT) TYPE=BDB;
                select * from ca.certificate;
                drop table ca.certificate;
                create table ca.certificate (cert_key BIGINT NOT NULL PRIMARY KEY, format TEXT, data TEXT, dn TEXT, cn TEXT, email TEXT, status TEXT, role TEXT, public_key TEXT, notafter BIGINT, req_key BIGINT, loa TEXT) TYPE=BDB;
                 
                Thanks!
                 
                Andr�a
                 
                ----- Original Message -----
                Sent: Monday, February 28, 2005 5:10 PM
                Subject: [Openca-Users] CONNECT_FAILED

                Hi people!

                After your tips, I rerun the follow commands to set the right
                permissions for the openca user and finally I can initialize the CA.
                 
                But when I try:
                initalize -> initalize phase 2 -> new request, I have the follow error after click in CONTINUE button:
                 
                Certificate Data
                E-Mail [EMAIL PROTECTED]
                Name Pamsist
                Certificate Request Group Internet
                alternative email [EMAIL PROTECTED]
                IP address 10.10.3.174
                DNS name
                DNS name
                User Data
                Name (first and Last name) Andrea Teste
                Email [EMAIL PROTECTED]
                Department Suptec
                Telephone 38891418
                Level Of Assurance (LOA) Test
                Role CA Operator
                Registration Authority Trustcenter itself
                Keysize 1024

                    Error 700

                      General Error Database failed with errorcode 20032. SELECT_FAILED (error 20016: EXECUTE_FAILED (error 11111: Do not commit if the database or the module itself fails.))
                
                    


                 
                What is the problem now??
                 
                Above are the commands that I run for Mysql...


                [EMAIL PROTECTED] mysql]# mysql -uroot -p mysql    ## I enter with root to grant
                the previleges##
                Enter password:
                Reading table information for completion of table and column names
                You can turn off this feature to get a quicker startup with -A
                Welcome to the MySQL monitor.  Commands end with ; or \g.
                Your MySQL connection id is 10 to server version: 3.23.58
                Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

                mysql> grant all privileges ON openca.* TO
                [EMAIL PROTECTED] IDENTIFIED BY
                'mudar123';
                Query OK, 0 rows affected (0.00 sec)

                mysql> exit;
                Bye


                Testing the DB with user openca...
                [EMAIL PROTECTED] mysql]# mysql -uopenca openca -p
                Enter password:
                Welcome to the MySQL monitor.  Commands end with ; or \g.
                Your MySQL connection id is 11 to server version: 3.23.58

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

                mysql> use openca;
                Database changed
                mysql> show tables;
                Empty set (0.00 sec)

                mysql> exit;
                Bye


                In my config.xml I have:

                 <!-- ====================== -->
                        <!-- database configuration -->
                        <!-- ====================== -->
                        <option>
                            <name>dbmodule</name>
                            <!-- you can use DB or DBI -->
                            <value>DBI</value>
                        </option>
                        <option>
                        <option>
                            <name>db_host</name>
                            <value>10.10.3.174</value> ## the same ip ##
                        </option>
                        <option>
                            <name>db_port</name>
                            <value>3306</value>
                        </option>
                        <option>
                            <name>db_user</name> ##the same user##
                            <value>openca</value>
                        </option>
                        <option>
                            <name>db_passwd</name>
                            <value>mudar123</value> ### The same password that I set in
                mysql###
                        </option>

                Please, can anyone help me?
                Any tests to do??
                 
                Thanks a lot!!!!
                 


                Andr�a Cavallari

                Suporte Tecnol�gico
                Pamsist - Unidade de Sistemas, Servi�os e Tecnologia
                Pamcary Sistemas de Gerenciamento de Riscos Ltda.
                3889-1418
                [EMAIL PROTECTED]
                ----- Original Message -----
                From: <
                [EMAIL PROTECTED]>
                To: <
                [email protected]>
                Sent: Friday, February 25, 2005 12:43 PM
                Subject: AW: [Openca-Users] CONNECT_FAILED


                Hi,

                The grant statement seems to be wrong. It should look like this:

                GRANT ALL ON {db_name}.* TO
                [EMAIL PROTECTED] IDENTIFIED BY
                'somepassword';

                Yours looks like this:

                grant all privileges on openca.* to root identified by "openca";

                This means that you created the user root with password openca. In your
                config.xml you use a different user name and password.


                Mit freundlichen Gr��en / With Kind Regards
                Max Schmid



                -----Urspr�ngliche Nachricht-----
                Von:
                [EMAIL PROTECTED]
                [mailto:[EMAIL PROTECTED] Im Auftrag von Andr�a
                Cavallari
                Gesendet: Donnerstag, 24. Februar 2005 13:54
                An:
                [email protected]
                Betreff: Re: [Openca-Users] CONNECT_FAILED


                Hello Dalini!

                So, let me talk about my environment...

                I'm using in the same machine mysql and CA.

                Here, we can see taht mysql is connected and using the 3306 port:

                [EMAIL PROTECTED] openca]# netstat -anp
                Active Internet connections (servers and established)
                Proto Recv-Q Send-Q Local Address               Foreign Address
                State       PID/Program name
                tcp        0      0 0.0.0.0:3306                0.0.0.0:*
                LISTEN      6850/mysqld
                tcp        0      0 0.0.0.0:80                  0.0.0.0:*
                LISTEN      2713/httpd
                tcp        0      0 0.0.0.0:22                  0.0.0.0:*
                LISTEN      2268/sshd
                tcp        0      0 127.0.0.1:25                0.0.0.0:*
                LISTEN      2300/sendmail: acce
                tcp        0      0 0.0.0.0:443                 0.0.0.0:*
                LISTEN      2713/httpd
                tcp        0      0 10.10.3.174:22              10.10.2.181:3399
                ESTABLISHED 8608/0
                tcp       52      0 10.10.3.174:22              10.10.2.181:3429
                ESTABLISHED 8676/2
                Active UNIX domain sockets (servers and established)
                Proto RefCnt Flags       Type       State         I-Node PID/Program name
                Path
                unix  2      [ ACC ]     STREAM     LISTENING     60704  8100/perl
                /var/lib/openca/tmp/openca_xml_cache
                unix  2      [ ACC ]     STREAM     LISTENING     64517  8101/perl
                /var/lib/openca/tmp/openca_socket
                unix  2      [ ACC ]     STREAM     LISTENING     58732  6850/mysqld
                /var/lib/mysql/mysql.sock
                unix  2      [ ACC ]     STREAM     LISTENING     7898   2658/xfs
                /tmp/.font-unix/fs7100
                unix  2      [ ACC ]     STREAM     LISTENING     2844   2319/gpm
                /dev/gpmctl
                unix  10     [ ]         DGRAM                    2399   2168/syslogd
                /dev/log
                unix  3      [ ]         STREAM     CONNECTED     65358  6850/mysqld
                /var/lib/mysql/mysql.sock
                unix  3      [ ]         STREAM     CONNECTED     65357  8732/mysql
                unix  3      [ ]         STREAM     CONNECTED     64515  8100/perl
                /var/lib/openca/tmp/openca_xml_cache
                unix  3      [ ]         STREAM     CONNECTED     64514  8101/perl
                unix  2      [ ]         DGRAM                    60854  8101/perl
                unix  2      [ ]         DGRAM                    7948   2658/xfs
                unix  2      [ ]         DGRAM                    7924   2677/rhnsd
                unix  2      [ ]         DGRAM                    7867   2632/crond
                unix  2      [ ]         DGRAM                    2831   2309/clientmqueue
                unix  2      [ ]         DGRAM                    2814   2300/sendmail: acce
                unix  2      [ ]         DGRAM                    2488   2231/apmd
                unix  2      [ ]         DGRAM                    2407   2172/klogd

                In the /varlog/mysqld.log I have:
                050223 15:52:37  mysqld started
                Cannot initialize InnoDB as 'innodb_data_file_path' is not set. If you do
                not want to use transactional InnoDB tables, add a line skip-innodb to the
                [mysqld] section of init parameters in your my.cnf or my.ini. If you want to
                use InnoDB tables, add to the [mysqld] section, for example,
                innodb_data_file_path = ibdata1:10M:autoextend But to get good performance
                you should adjust for your hardware the InnoDB startup options listed in
                section 2 at
                http://www.innodb.com/ibman.html
                /usr/libexec/mysqld: ready for connections


                To create de DB I use:

                mysql -uroot -p mysql
                <password>
                create database openca;
                create database openra;
                grant all privileges on openca.* to root identified by "openca"; grant all
                privileges on openra.* to root identified by "openra";

                I can connect....
                mysql> connect openca
                Connection id:    22
                Current database: openca

                And I can see the database created...
                mysql> show databases;
                +----------+
                | Database |
                +----------+
                | mysql    |
                | openca   |
                | openra   |
                | test     |
                +----------+
                4 rows in set (0.00 sec)

                But when I will test it, I have this result:

                [EMAIL PROTECTED] openca]# mysql -uopenca -p
                Enter password: (I DIDN'T INPUT ANY PASSWORD! BUT I CAN ENTER!!) Welcome to
                the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is
                23 to server version: 3.23.58

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

                mysql> use openca;
                ERROR 1044: Access denied for user:
                '@localhost' to database 'openca'
                mysql>


                In my config.xml I have a password for openca DB:
                <!-- ====================== -->
                        <!-- database configuration -->
                        <!-- ====================== -->
                        <option>
                            <name>dbmodule</name>
                            <!-- you can use DB or DBI -->
                            <value>DBI</value>
                        </option>
                        <option>
                            <name>db_type</name>
                            <value>mysql</value>
                        </option>
                        <option>
                            <name>db_name</name>
                            <value>openca</value>
                        </option>
                        <option>
                            <name>db_host</name>
                            <value>10.10.3.174</value>
                        </option>
                        <option>
                            <name>db_port</name>
                            <value>3306</value>
                        </option>
                        <option>
                            <name>db_user</name>
                            <value>openca</value>
                        </option>
                        <option>
                            <name>db_passwd</name>
                            <value>mudar123</value>
                        </option>
                        <option>

                But if I type the same password that I have in config.xml I have this result
                (the password is the same to login on linux too):

                [EMAIL PROTECTED] openca]# mysql -uopenca -p
                Enter password:
                ERROR 1045: Access denied for user:
                '[EMAIL PROTECTED]' (Using password: YES)


                So, Where I can define a correct password for this user openca??

                Why mysql is referenced by localhost if I put the ip address in config.xml??
                There are any mysql config file that I can verify this??


                Thanks a lot!

                Andr�a


                ----- Original Message -----
                From: "Ives Steglich" <
                [EMAIL PROTECTED]>
                To: <
                [email protected]>
                Sent: Thursday, February 24, 2005 9:01 AM
                Subject: Re: [Openca-Users] CONNECT_FAILED


                Andr�a Cavallari wrote:
                > config.xml and started to see the error.
                >
                i just forgot

                could you please send the mysql setting for this user?
                means, what is the exact entry for the rights... in the user table? (pwd
                doesn't matter...) together with the config.xml entry and like mentioned,
                where is the db - same machine, different machine and if they are different,
                whats the ca dns/ip... this must match the mysql entry... if its not % (for
                all host to allow to connect, which it shouldn't of
                course)


                greetings
                dalini

                Reply via email to