› Foros › PC › Software libre
user@ubuntu-server:~/SSL/newcerts$ /usr/local/mysql/bin/mysql -h 192.168.1.36 -v
--user=remoto -p --ssl-ca=cacert.pem --ssl-cert=client-cert.pem --ssl-key=client-key.pem
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 361
Server version: 5.0.45 Source distribution
Reading history-file /home/user/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> \s
--------------
/usr/local/mysql/bin/mysql Ver 14.12 Distrib 5.0.45, for pc-linux-gnu (i686) using
EditLine wrapper
Connection id: 361
Current database:
Current user: remoto@192.168.1.60
SSL: CIPHER IN USE IS EDH-RSA-DES-CBC3-SHA
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.0.45 Source distribution
Protocol version: 10
Connection: 192.168.1.36[3] via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
TCP port: 3306
Uptime: 1 day 43 min 57 sec
Threads: 21 Questions: 10803 Slow queries: 0 Opens: 255 Flush tables: 1 Open tables:
64 Queries per second avg: 0.121
--------------
<?php
$link = mysqli_init();
mysqli_ssl_set($link, ‘server-key.pem’, ‘server-sert.pem’, ‘cacert.pam’, NULL, NULL);
mysqli_real_connect($link,'192.168.1.36','remoto'’,password','drupal_BD',NULL,NULL,MYSQLI_CLIENT_SSL);
// … Continua
?>