|
Publicité ' | |||||||||||||||||||||||
|
|
#1 |
|
Candidat au titre de Membre du Club
![]() Inscription : avril 2006 Messages : 43 ![]() |
Bonjour,
j'essaie de faire fonctionner un programme utilisant MySQL Embedded ( le premier exemple de la doc ), seulement quand je lance le programme j'ai ceci comme message : loris@mvision11:~/workspace/TestMysql/Debug$ ./TestMysql InnoDB: The first specified data file /home/loris/workspace/TestMysql/Debug/data/ibdata1 did not exist: InnoDB: a new database to be created! 060404 10:26:03 InnoDB: Setting file /home/loris/workspace/TestMysql/Debug/data/ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 060404 10:26:04 InnoDB: Log file /home/loris/workspace/TestMysql/Debug/data/ib_logfile0 did not exist: new to be created InnoDB: Setting log file /home/loris/workspace/TestMysql/Debug/data/ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 060404 10:26:04 InnoDB: Log file /home/loris/workspace/TestMysql/Debug/data/ib_logfile1 did not exist: new to be created InnoDB: Setting log file /home/loris/workspace/TestMysql/Debug/data/ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 060404 10:26:05 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist InnoDB: Error:startup called second time during the process lifetime. InnoDB: In the MySQL Embedded Server Library you cannot call server_init() InnoDB: more than once during the process lifetime. 060404 10:26:07InnoDB: Assertion failure in thread 16384 in file sync0sync.c line 1175 InnoDB: Failing assertion: sync_initialized == FALSE InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html InnoDB: about forcing recovery. Segmentation fault Je n'ai pas demandé le controle des privilèges donc pourquoi me demande-t-il le fichier mysql.host ? 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 ? Est-ce que j'ai plus de chances d'avoir une réponse dans la section C ? |
|
|
00
|
|
|
#2 | |||
![]() ![]() Inscription : juin 2003 Messages : 4 892 ![]() |
Citation:
Citation:
Citation:
tu pourrais nous donner plus de détails sur le positionnement des fichiers binaires, des fichiers des tables et du fichier de configuration ?
__________________
Modérateur PHP |
|||
|
|
00
|
|
|
#3 | ||
|
Candidat au titre de Membre du Club
![]() Inscription : avril 2006 Messages : 43 ![]() |
Citation:
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:
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 :-) |
||
|
|
00
|
|
|
#4 |
|
Candidat au titre de Membre du Club
![]() Inscription : avril 2006 Messages : 43 ![]() |
En fait pour que ca fonctionne j'ai du copié les fichiers présent dans /usr/local/mysql/var ( dont la base mysql avec la table host... ) dans le répertoire ou mon programme va chercher sa BD.
Ensuite j'ai d'autres problèmes mais ca n'a pas vraiment à voir avec celui-ci. |
|
|
00
|
|
|
#5 |
|
Invité de passage
![]() |
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 |
|
|
00
|
Copyright © 2000-2013 - www.developpez.com