Announcement

Collapse
No announcement yet.

MySQL SSL and LOAD DATA LOCAL INFILE issues

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    MySQL SSL and LOAD DATA LOCAL INFILE issues

    I have a LAMP server I use for development and testing

    Installed LAMP programs via tasksel and LAMP Server

    Did some tweaks to get things to my needs, add phpmyadmin... and I've run into two problems that no supposed resolutions via google solve.

    1) MySQL SSL

    I want to enable this so that I can replicate the local DB to the final remote production DB and I would much rather and prefer to use SSL

    I followed:

    https://mifosforge.jira.com/wiki/dis...+SSL+on+Ubuntu

    Went through all the key steps.

    But still no SSL...

    Code:
    mysql> show variables like "%ssl%";
    +---------------+----------------------------+
    | Variable_name | Value                      |
    +---------------+----------------------------+
    | have_openssl  | DISABLED                   |
    | have_ssl      | DISABLED                   |
    | ssl_ca        | /etc/mysql/ca-cert.pem     |
    | ssl_capath    |                            |
    | ssl_cert      | /etc/mysql/server-cert.pem |
    | ssl_cipher    |                            |
    | ssl_key       | /etc/mysql/server-key.pem  |
    +---------------+----------------------------+
    7 rows in set (0.08 sec)
    
    mysql>
    Thinking this is apparmor I changed things in the apparmor profile, but that results in another issue

    I can't get appaprmor to reload the profile, just keeps whining about commands not there or unknown.


    Ok, so put the SSL stuf in areas where apparmor already approves of in the current profile.

    /var/lib/mysql v. /etc/mysql

    No joy! :mad: Still NO SSL.

    Comments? Suggestions? ? ?

    2) MySQL's improved "security feature" which prevents local-infile

    I've tried every location in my.cnf and restarting MySQL to the point it MySQL said enough, I am not doing it! Ok.. so the last is a lot of hyperbole... fo r effect.. I am just a tad annoyed....

    Using phpmyadmin I get "#1148 - The used command is not allowed with this MySQL version"

    OK... search... OK.. add

    local-infile to my.cnf in the [mysql] and [mysqld] areas... restart.. Fixed.

    NO Joy.

    ok

    local-infile=1 etc.... NO Joy


    Ok.. lets try this direct on the server...

    LOAD DATA LOCAL INFILE 'home/myuser/someimportfile.dat' INTO TABLE `EN` FIELDS TERMINATED BY '|' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n'

    Works fine. WOoohooo

    So:

    Code:
    :~$ mysql -umyuser -pmypass --local-infile=1 mydb
    This works...

    So how do I get mysgl to co-operate with this in the my.cnf file so phpmyadmin will cooperate.

    Thanks!
Working...
X