openssl questions

2004-05-10 Thread rconner
I am having some issues getting OpenSSL to work correctly.
I was able to sign and set up the certificates but thats it.  I cannot
seem to do much else.

First of all if I try and update my grants tables I get this error.

If I try and mysql_fix_privilege_tables I get an error that says:

error: Found option without preceding group in config file: /etc/my.cnf at
line: 1

Fatal error in defaults handling. Program aborted
my my.cnf file looks as follows.
---
cnf=
cnf=$cnf [client]
cnf=$cnf ssl-ca=$DIR/cacert.pem
cnf=$cnf ssl-cert=$DIR/client-cert.pem
cnf=$cnf ssl-key=$DIR/client-key.pem
cnf=$cnf [mysqld]
cnf=$cnf ssl-ca=$DIR/cacert.pem
cnf=$cnf ssl-cert=$DIR/server-cert.pem
cnf=$cnf ssl-key=$DIR/server-key.pem
echo $cnf | replace   '
'  $DIR/my.cnf


So thatÂ’s not really working currently.  I was able to manage to get the
certs all signed and setup using MySQL official page.  Here is the problem
though.



The MySQL site says to:
from www.mysql.org-
To test SSL connections, start the server as follows, where $DIR is the
pathname to the directory where the sample `my.cnf' option file is
located:

shell mysqld --defaults-file=$DIR/my.cnf 

Then invoke a client program using the same option file:

shell mysql --defaults-file=$DIR/my.cnf
--end from www.mysql.org

If I try to do as it says, it will not let me run

mysqld --defaults-file=$DIR/my.cnf 

says I cannot do this from root which is fine because I would rather not
anyways.  so I modified it a bit and tried:

mysqld_safe --defaults-file=$DIR/my.cnf 

I then get the error

WARNING: Defaults file '/my.cnf' not found!

So even though my.cnf is in $DIR i path it out and run:

mysqld_safe --defaults-file=/usr/local/openssl/my.cnf 

This give me an error of:

[EMAIL PROTECTED] openssl]# /usr/local/mysql/bin/mysqld_safe
--defaults-file=/usr/local/openssl/my.cnf
error: Found option without preceding group in config file:
/usr/local/openssl/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
error: Found option without preceding group in config file:
/usr/local/openssl/my.cnf at line: 1
Fatal error in defaults handling. Program aborted

My my.cnf file is as follows, also taken from www.mysql.org


cnf=
cnf=$cnf [client]
cnf=$cnf ssl-ca=$DIR/cacert.pem
cnf=$cnf ssl-cert=$DIR/client-cert.pem
cnf=$cnf ssl-key=$DIR/client-key.pem
cnf=$cnf [mysqld]
cnf=$cnf ssl-ca=$DIR/cacert.pem
cnf=$cnf ssl-cert=$DIR/server-cert.pem
cnf=$cnf ssl-key=$DIR/server-key.pem
echo $cnf | replace   '
'  $DIR/my.cnf


So, I am not sure what is up with that.  Now just trying to log into the
server,

If I try to log in as root
I am able to log into mysql server now using

/usr/local/mysql/bin/mysql --defaults-file=$DIR/my.cnf -p

it then asks for a Password and I am able to get in fine.
Now root is just set normally requiring no ssl.

I did creat a user called hal that I added REQUIRE SSL; to the privileges
granting command.  Now when I try to log in as hal the same way using:

/usr/local/mysql/bin/mysql --defaults-file=$DIR/my.cnf -p

I get:

[EMAIL PROTECTED] sbin]$ /usr/local/mysql/bin/mysql
--defaults-file=$DIR/my.cnf -p
Enter password:
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)

So I am not sure about that.  Does this have to do with the fact that i
was not able to run

/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/openssl/my.cnf

?

What does that above command actually do? I know that mysqld_safe starts
the server so I assume taht the
--defaults-file=/usr/local/openssl/my.cnf
Starts the sever so it looks to the my.cnf to auth. ssl users?  Anyways
any help you could give me would REALLY help.  I wanted to give you as
much information as possible...thanks...


Conner

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



my.cnf setup

2004-05-10 Thread rconner
I am running a mysql server off a Dell 2650.
Dual 2.8Ghz Intel Xeon processors
1 Gig of RAM

The MySQL data comes up rather slowly.  Would like some suggestions on my
my.cnf file if you had a minute.

here is what I have

++--+
| Variable_name  | Value|
++--+
| Aborted_clients| 0|
| Aborted_connects   | 0|
| Bytes_received | 1083533  |
| Bytes_sent | 979790   |
| Com_admin_commands | 0|
| Com_alter_table| 0|
| Com_analyze| 0|
| Com_backup_table   | 0|
| Com_begin  | 0|
| Com_change_db  | 40   |
| Com_change_master  | 0|
| Com_check  | 0|
| Com_commit | 14   |
| Com_create_db  | 0|
| Com_create_function| 0|
| Com_create_index   | 0|
| Com_create_table   | 0|
| Com_delete | 0|
| Com_delete_multi   | 0|
| Com_drop_db| 0|
| Com_drop_function  | 0|
| Com_drop_index | 0|
| Com_drop_table | 0|
| Com_flush  | 0|
| Com_grant  | 0|
| Com_ha_close   | 0|
| Com_ha_open| 0|
| Com_ha_read| 0|
| Com_insert | 0|
| Com_insert_select  | 0|
| Com_kill   | 0|
| Com_load   | 0|
| Com_load_master_data   | 0|
| Com_load_master_table  | 0|
| Com_lock_tables| 0|
| Com_optimize   | 0|
| Com_purge  | 0|
| Com_rename_table   | 0|
| Com_repair | 0|
| Com_replace| 0|
| Com_replace_select | 0|
| Com_reset  | 0|
| Com_restore_table  | 0|
| Com_revoke | 0|
| Com_rollback   | 0|
| Com_savepoint  | 0|
| Com_select | 184  |
| Com_set_option | 28   |
| Com_show_binlog_events | 0|
| Com_show_binlogs   | 0|
| Com_show_create| 0|
| Com_show_databases | 0|
| Com_show_fields| 0|
| Com_show_grants| 0|
| Com_show_keys  | 0|
| Com_show_logs  | 0|
| Com_show_master_status | 0|
| Com_show_new_master| 0|
| Com_show_open_tables   | 0|
| Com_show_processlist   | 0|
| Com_show_slave_hosts   | 0|
| Com_show_slave_status  | 0|
| Com_show_status| 1|
| Com_show_innodb_status | 0|
| Com_show_tables| 0|
| Com_show_variables | 0|
| Com_slave_start| 0|
| Com_slave_stop | 0|
| Com_truncate   | 0|
| Com_unlock_tables  | 0|
| Com_update | 0|
| Connections| 43   |
| Created_tmp_disk_tables| 13   |
| Created_tmp_tables | 13   |
| Created_tmp_files  | 0|
| Delayed_insert_threads | 0|
| Delayed_writes | 0|
| Delayed_errors | 0|
| Flush_commands | 1|
| Handler_commit | 0|
| Handler_delete | 0|
| Handler_read_first | 2|
| Handler_read_key   | 9080 |
| Handler_read_next  | 35   |
| Handler_read_prev  | 1764 |
| Handler_read_rnd   | 723  |
| Handler_read_rnd_next  | 63575|
| Handler_rollback   | 0|
| Handler_update | 0|
| Handler_write  | 154  |
| Key_blocks_used| 51   |
| Key_read_requests  | 13370|
| Key_reads  | 41   |
| Key_write_requests | 67   |
| Key_writes | 0|
| Max_used_connections   | 4|
| Not_flushed_key_blocks | 0|
| Not_flushed_delayed_rows   | 0|
| Open_tables| 18   |
| Open_files | 38   |
| Open_streams   | 0