36 lines
820 B
Markdown
36 lines
820 B
Markdown
|
**Cette page a été importée automatiquement de notre ancien wiki mais n'a pas encore été révisée.**
|
||
|
|
||
|
# Mysql
|
||
|
|
||
|
### Prérequis
|
||
|
|
||
|
Installation de [wiki:HowtoMySQL MySQL].
|
||
|
|
||
|
Installation des librairies de développements MySQL
|
||
|
~~~
|
||
|
aptitude install libmysqlclient-dev
|
||
|
~~~
|
||
|
|
||
|
### Configuration
|
||
|
|
||
|
Création de l'utilisateur et de la base de donnée :
|
||
|
~~~
|
||
|
MYSQLPASS=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)')
|
||
|
mysql <<EOF
|
||
|
CREATE DATABASE $REDMINE CHARACTER SET utf8;
|
||
|
GRANT ALL PRIVILEGES ON $REDMINE.* TO "$REDMINE"@'localhost' identified by '$MYSQLPASS';
|
||
|
EOF
|
||
|
~~~
|
||
|
|
||
|
Configuration autologin MySQL de l'utilisateur $REDMINE :
|
||
|
~~~
|
||
|
cat > /home/$REDMINE/.my.cnf <<EOF
|
||
|
[client]
|
||
|
user = $REDMINE
|
||
|
password = $MYSQLPASS
|
||
|
EOF
|
||
|
~~~
|
||
|
Correction des droits sur .my.cnf :
|
||
|
~~~
|
||
|
chown $REDMINE: /home/$REDMINE/.my.cnf
|
||
|
~~~
|