MySQL Forums
Forum List  »  Security

problem with SSL/mysql
Posted by: rao n
Date: January 07, 2006 10:13PM

Hi,

Good Morning...

I am trying to use SSL in my application. I have followed the steps below to generate and use SSL certificates but quite unfortunately I am facing a problem while trying to connect to Database server using SSL option.. Can some one corrects me if Am doing it in a wrong way.. ur help is highly appreciated..

Steps that i have followed
1) Compiled MYSQL Server using SSL libs
2)Compiled MYSQL Client using SSL Libs
3) created SSL Server and Client certificates by following
DIR=`pwd`/openssl
PRIV=$DIR/private

mkdir $DIR $PRIV $DIR/newcerts
cp /usr/share/ssl/openssl.cnf $DIR
replace ./demoCA $DIR -- $DIR/openssl.cnf


touch $DIR/index.txt
echo "01" > $DIR/serial

openssl req -new -x509 -keyout $PRIV/cakey.pem -out $DIR/cacert.pem \
-config $DIR/openssl.cnf

openssl req -new -keyout $DIR/server-key.pem -out \
$DIR/server-req.pem -days 3600 -config $DIR/openssl.cnf


openssl rsa -in $DIR/server-key.pem -out $DIR/server-key.pem

openssl ca -policy policy_anything -out $DIR/server-cert.pem \
-config $DIR/openssl.cnf -infiles $DIR/server-req.pem

openssl req -new -keyout $DIR/client-key.pem -out \
$DIR/client-req.pem -days 3600 -config $DIR/openssl.cnf

openssl rsa -in $DIR/client-key.pem -out $DIR/client-key.pem

openssl ca -policy policy_anything -out $DIR/client-cert.pem \
-config $DIR/openssl.cnf -infiles $DIR/client-req.pem

4) Started MY SQL Server by issuing

mysqld_safe --ssa-ca=$DIR/cacert.pem --ssl-cert=$DIR/server-cert.pem --ssl-key=$DIR/server-key.pem --user=mysql &

5) Using mysql client issued grant statement

mysql
GRANT ALL PRIVILEGES ON database.table To user@host require SSL

6) Tried bringing up mysql client by

mysql --user=user --ssa-ca=$DIR/cacert.pem --ssl-cert=$DIR/client-cert.pem --ssl-key=$DIR/client-key.pem --user=mysql

I am getting an error saying permission denied with an error code of 1044..

Options: ReplyQuote


Subject
Views
Written By
Posted
problem with SSL/mysql
3604
January 07, 2006 10:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.