Re: Problème avec mysql.host
Citation:
Envoyé par LePhasme
Je n'ai pas demandé le controle des privilèges donc pourquoi me demande-t-il le fichier mysql.host ?
par défaut les privilièges sont utilisés si tu ne l'a pas spécifé dans le fichier de configuration
Citation:
Envoyé par LePhasme
Est-ce normal que je reçoive les messages d'InnoDB alors que je n'ai pas décomenté les lignes dans le fichier my.cnf ?
par rapport à ma réponse précédante, je pense qu'il y a un problème de lecture du fichier de configuration
Citation:
Envoyé par LePhasme
Est-ce que j'ai plus de chances d'avoir une réponse dans la section C ?
pas sur, ça à l'air d'être un problème de configuration
tu pourrais nous donner plus de détails sur le positionnement des fichiers binaires, des fichiers des tables et du fichier de configuration ?
Re: Problème avec mysql.host
Citation:
Envoyé par mathieu
par défaut les privilièges sont utilisés si tu ne l'a pas spécifé dans le fichier de configuration
Pourtant d'après ceci :
By default, the embedded server doesn't require user authentication. However, you could require the user to authenticate if you'd like. You would do this by adding the --with-embedded-privilege-control to the server options (in server_options[]) for mysql_server_init(). You would also need to give the host address, user name, and password with the mysql_real_connect() function above.
Trouvé ici, par défaut non.
Citation:
tu pourrais nous donner plus de détails sur le positionnement des fichiers binaires, des fichiers des tables et du fichier de configuration ?
Les fichiers binaires sont dans /usr/local/mysql/bin
Les fichiers des tables sont dans /usr/local/mysql/var j'ai fait une copie du dossier database1 ( qui est le nom de la base que j'utilise pour l'exemple ) avec les 3 fichiers qu'il contient dans le dossier data qui est situé au même niveau que l'exécutable ( dans /home/loris/workspace/TestMysql/Debug ) et dans les options du serveur j'ai mis --datadir=./data
Le fichier de configuration est dans /etc et dans /etc/mysql
Si tu as besoin d'autres informations n'hésites pas !
Merci :-)
mysql [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
bonjour
En fait je réinstalle sur les nouvelles machines mysql en version 5.5 qui avait été installée par 2 personnes qui bidouillent mysql (sans plus)
j'ai réinstallé avec l'aborescence que j'ai voulu
ça à marcher ! je ne comprends par défaut il installe le fichier.cnf sous /etc/ :
[client]
#password = your_password
port = 3306
socket = /mysql/Mysql-Ent-5-5-20/mydata/base/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
/etc/mysql/my.cnf /mysql/Mysql-Ent-5-5-15/mytools/init/my_Base.cnf ~/.my.cnf
[mysqld]
port = 3306
socket = /mysql/Mysql-Ent-5-5-20/mydata/base/mysql.sock
datadir = /mysql/Mysql-Ent-5-5-20/mydata/base
sql_mode = 'TRADITIONAL,NO_ENGINE_SUBSTITUTION'
skip-external-locking
key_buffer_size = 16M
# max_allowed_packet = 10M
max_allowed_packet = 64M
table_open_cache =61024
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
tmpdir=/mysql/Mysql-Ent-5-5-20/mytmp/tmpdir
innodb_file_per_table
net_write_timeout = 1200
# Debut de la replication
log-bin=/mysql/Mysql-Ent-5-5-20/mybinlog/log-bin/mysql-bin
binlog_format=mixed
server-id = 1
log-slave-update
# Nombre de jours de log
expire_logs_days = 4
# fin de la replication
innodb_data_home_dir = /mysql/Mysql-Ent-5-5-20/mydata/base
innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql
innodb_log_group_home_dir = /mysql/Mysql-Ent-5-5-20/mydata/base
#rajout pour sauvegarde
#set-variable = innodb_log_files_in_group=2
#set-variable = innodb_log_file_size=1G
innodb_log_files_in_group=2
innodb_log_file_size=1G
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 60G
innodb_additional_mem_pool_size = 2M
#innodb_buffer_pool_size = 32M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 1G
innodb_log_buffer_size = 8M
#innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_thread_concurrency=8
innodb_flush_method = O_DIRECT
thread_cache_size=20
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
j'ai fais une copie de fichier que j'ai copié dans le répertoire suivant :
/mysql/Mysql-Ent-5-5-15/mytools/init/
voici mon fichier de my_Base.cnf:
Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /mysql/Mysql-Ent-5-5-20/mytools/init/mysql_Base.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /mysql/Mysql-Ent-5-5-20/mytools/init/mysql_Base.sock
datadir = /mysql/Mysql-Ent-5-5-20/mydata/base
basedir = /mysql/Mysql-Ent-5-5-15/mytools/init/mysql-5.5.15-linux2.6-x86_64
sql_mode = 'TRADITIONAL,NO_ENGINE_SUBSTITUTION'
skip-external-locking
key_buffer_size = 16M
# max_allowed_packet = 10M
max_allowed_packet = 64M
table_open_cache =61024
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
tmpdir=/mysql/Mysql-Ent-5-5-20/mytmp/tmpdir
innodb_file_per_table
net_write_timeout = 1200
# Debut de la replication
log-bin=/mysql/Mysql-Ent-5-5-20/mybinlog/log-bin/mysql-bin
binlog_format=mixed
server-id = 1
log-slave-update
# Nombre de jours de log
expire_logs_days = 4
# fin de la replication
innodb_data_home_dir = /mysql/Mysql-Ent-5-5-20/mydata/base
innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql
innodb_log_group_home_dir = /mysql/Mysql-Ent-5-5-20/mydata/base
#rajout pour sauvegarde
#set-variable = innodb_log_files_in_group=2
#set-variable = innodb_log_file_size=1G
innodb_log_files_in_group=2
innodb_log_file_size=1G
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 60G
innodb_additional_mem_pool_size = 2M
#innodb_buffer_pool_size = 32M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 1G
innodb_log_buffer_size = 8M
#innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_thread_concurrency=8
innodb_flush_method = O_DIRECT
thread_cache_size=20
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
je lance mysql :
./bin/mysqld_safe&
[1] 63334
mysql@srvdps53:/mysql/Mysql-Ent-5-5-15/mytools/init/mysql-5.5.15-linux2.6-x86_64-]120305 08:43:22 mysqld_safe Logging to '/mysql/Mysql-Ent-5-5-15/mytools/init/mysql-5.5.15-linux2.6-x86_64/data/srv.err'.
120305 08:43:22 mysqld_safe Starting mysqld daemon with databases from /mysql/Mysql-Ent-5-5-15/mytools/init/mysql-5.5.15-linux2.6-x86_64/data
120305 08:43:24 mysqld_safe mysqld from pid file /mysql/Mysql-Ent-5-5-15/mytools/init/mysql-5.5.15-linux2.6-x86_64/data/srv.pid ended
je vais voir dans les logs err :
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1595675
120305 8:43:22 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
120305 8:43:23 InnoDB: Waiting for the background threads to start
120305 8:43:24 InnoDB: 1.1.8 started; log sequence number 1595675
120305 8:43:24 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
120305 08:43:24 mysqld_safe mysqld from pid file /mysql/Mysql-Ent-5-5-15/mytools/init/mysql-5.5.15-linux2.6-x86_64/data/srv.pid ended
il ne veut toujours pas démarrer. Il y a quelque chose que j'ai raté?
Qui peut m'aider?
merci