lundi 3 juin 2013

Installation de Mysql sous Gentoo

Après plusieurs tentaives pour installer Mysql sous Gentoo avec emerge sans succès, j'ai finalement installé Mysql manuellement.
J'ai suivi les étapes du fichier d'installation  :

  • shell> groupadd mysql
  • shell> useradd -r -g mysql mysql
  • shell> cd /usr/local
  • shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
  • shell> ln -s full-path-to-mysql-VERSION-OS mysql
  • shell> cd mysql
  • shell> chown -R mysql .
  • shell> chgrp -R mysql .
  • shell> scripts/mysql_install_db --user=mysql
J'ai rencontré l'erreur suivante :

Installing MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

Pour résoudre ce problème, j'ai installé libaio avec emerge dev-libs/libaio

  • shell> chown -R root .
  • shell> chown -R mysql data
  • shell> cp support-files/my-medium.cnf /etc/my.cnf
  • shell> bin/mysqld_safe --user=mysql &
Dans le fichier d'erreur monfichier.err qui se trouve dans le répertoire /usr/local/mysql/data/
J'avais l'erreur suivante : Can't open and lock privilege tables: Table 'mysql.user' doesn't exist


J'ai résolu le problème avec mysql_install_db --user=mysql --ldata=/usr/local/mysql/data/


Remarque :

J'ai rencontré la même erreur en faisant
GRANT ALL ON tbl.* TO 'user'@'localhost' IDENTIFIED BY 'tbl';
==> Erreur Mysql.User doesn't exist
Une veille version de Mysql existait sur mon poste, j'ai du l'effacer et relancer la commande suivante :

./scripts/mysql_install_db --user=mysql --ldata=/usr/local/mysql/data/
Installing MySQL system tables...2013-06-03 13:28:20 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-06-03 13:28:20 7779 [Note] InnoDB: The InnoDB memory heap is disabled
2013-06-03 13:28:20 7779 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2013-06-03 13:28:20 7779 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-06-03 13:28:20 7779 [Note] InnoDB: Using Linux native AIO
2013-06-03 13:28:20 7779 [Note] InnoDB: Not using CPU crc32 instructions
2013-06-03 13:28:20 7779 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-06-03 13:28:20 7779 [Note] InnoDB: Completed initialization of buffer pool
2013-06-03 13:28:20 7779 [Note] InnoDB: Highest supported file format is Barracuda.
2013-06-03 13:28:20 7779 [Note] InnoDB: The log sequence numbers 1600614 and 1600614 in ibdata files do not match the log sequence number 1601046 in the ib_logfiles!
2013-06-03 13:28:20 7779 [Note] InnoDB: Database was not shutdown normally!
2013-06-03 13:28:20 7779 [Note] InnoDB: Starting crash recovery.
2013-06-03 13:28:20 7779 [Note] InnoDB: Reading tablespace information from the .ibd files...
2013-06-03 13:28:20 7779 [Note] InnoDB: Restoring possible half-written data pages
2013-06-03 13:28:20 7779 [Note] InnoDB: from the doublewrite buffer...
2013-06-03 13:28:20 7779 [Note] InnoDB: 128 rollback segment(s) are active.
2013-06-03 13:28:20 7779 [Note] InnoDB: Waiting for purge to start
2013-06-03 13:28:20 7779 [Note] InnoDB: 5.6.11 started; log sequence number 1601046
2013-06-03 13:28:24 7779 [Note] Binlog end
2013-06-03 13:28:24 7779 [Note] InnoDB: FTS optimize thread exiting.
2013-06-03 13:28:24 7779 [Note] InnoDB: Starting shutdown...
2013-06-03 13:28:25 7779 [Note] InnoDB: Shutdown completed; log sequence number 1626426
OK

Filling help tables...2013-06-03 13:28:25 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-06-03 13:28:25 7804 [Note] InnoDB: The InnoDB memory heap is disabled
2013-06-03 13:28:25 7804 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2013-06-03 13:28:25 7804 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-06-03 13:28:25 7804 [Note] InnoDB: Using Linux native AIO
2013-06-03 13:28:25 7804 [Note] InnoDB: Not using CPU crc32 instructions
2013-06-03 13:28:25 7804 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-06-03 13:28:25 7804 [Note] InnoDB: Completed initialization of buffer pool
2013-06-03 13:28:25 7804 [Note] InnoDB: Highest supported file format is Barracuda.
2013-06-03 13:28:25 7804 [Note] InnoDB: 128 rollback segment(s) are active.
2013-06-03 13:28:25 7804 [Note] InnoDB: Waiting for purge to start
2013-06-03 13:28:25 7804 [Note] InnoDB: 5.6.11 started; log sequence number 1626426
2013-06-03 13:28:25 7804 [Note] Binlog end
2013-06-03 13:28:25 7804 [Note] InnoDB: FTS optimize thread exiting.
2013-06-03 13:28:25 7804 [Note] InnoDB: Starting shutdown...
2013-06-03 13:28:27 7804 [Note] InnoDB: Shutdown completed; log sequence number 1626436
OK


...
Vous devez voir OK apparaîttre !

Aucun commentaire:

Enregistrer un commentaire


PoweredByGento