[WAMP] Problème avec MySQL

Démarré par Daru13, 02 Mai 2009 à 02:22

0 Membres et 1 Invité sur ce sujet

Depuis maintenant plusieurs mois, WAMP (2) à des problèmes et cela me gêne malheureusement beaucoup ( Par exemple la v2 de Génération-Making ne peut pas avancer >.> ).

Je m'explique : toute la partie PHP est correctement émulée, mais j'ai des problèmes avec MySQL, car ni Wordpress ni SMF n'arrive à accéder aux bases de données ( les fichiers de configuration des ces deux derniers sont naturellement configurés correctement ).
Le problème vient de je ne sais où car il arrive, mais très rarement, disons 1/100 fois, que ça marche. Sans raison apparente...

Je pensais que ça venait d'un problème de port déjà utilisé, mais j'ai changé le port et ajouté son autorisation au Pare-feu ( j'ai essayé 3307 et 3308 ( -06 à la base )) et ça n'a rien fait... =|
J'ai réinstallé plusieurs fois le logiciel, essayé de redémarrer les services, de fermer toues les application qui utilisaient le réseau, mais rien à faire :( !

Si vous avez besoin d'infos supplémentaires n'hésitez pas.
Merci d'avance :).

    







Tu as essayé de créer la base de données avant l'installation ?

EDIT : c'est dans la catégorie Informatique qu'il fallait ouvrir le topic ;).

Citation de: Daru13 le 02 Mai 2009 à 02:22

Je m'explique : toute la partie PHP est correctement émulée, mais j'ai des problèmes avec MySQL, car ni Wordpress ni SMF n'arrive à accéder aux bases de données ( les fichiers de configuration des ces deux derniers sont naturellement configurés correctement ).
Fait voir le fichier de configuration de MySQL SMF et Wordpress.
Citation
Ash Nazg Durbatulùk, Ash Nazg Gimbatul,
Ash Nazg Thrakatulùk agh bruzum-ishi krimpatul.
The fellowship of the Ring - J.R.R. Tolkien


Oulah oui désolé de ne pas l'avoir posté dans Informatique ( Oo je débloque ).
Alors alors...

Citation de: Helmasaur le 02 Mai 2009 à 10:01
Tu as essayé de créer la base de données avant l'installation ?
C'est inutile, lors de la procédure d'installation et de configuration assistée, les deux créent leur bases ( d'ailleurs c'est marqué que c'est à eux de le faire ). Et puis de toute façon je n'ai pas accès à Phpmyadmin, seulement à localhost.

CitationFait voir le fichier de configuration de MySQL SMF et Wordpress.

MySQL :
[spoiler]# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory
# of your server (e.g. C:\Program Files\MySQL\MySQL Server 4.1). To
# make sure the server reads the config file use the startup option
# "--defaults-file".
#
# To run run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install MySQL41 --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQL41
#
#
# Guildlines for editing this file
# ----------------------------------------------------------------------
#
# In this file, you can use all long options that the program supports.
# If you want to know the options a program supports, start the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]

port=3308


# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[wampmysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3308


#Path to installation directory. All paths are usually resolved relative to this.
basedir=c:/wamp/bin/mysql/mysql5.0.51b

#log file
log-error=c:/wamp/logs/mysql.log

#Path to the database root
datadir=c:/wamp/bin/mysql/mysql5.0.51b/data

# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=latin1

# The default storage engine that will be used when create new tables when

default-storage-engine=MyISAM

# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=255

# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size=8M

# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_cache=510

# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size=13M


# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before.  This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=12

#*** MyISAM Specific options

# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size=100G

# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method.  This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_max_extra_sort_file_size=100G

# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method.  This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_sort_buffer_size=8M

# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size=9M

# Size of the buffer used for doing full table scans of MyISAM tables.
# Allocated per thread, if a full scan is needed.
read_buffer_size=64K
read_rnd_buffer_size=256K

# This buffer is allocated when MySQL needs to rebuild the index in
# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
sort_buffer_size=203K


#*** INNODB Specific options ***


# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb

# Additional memory pool that is used by InnoDB to store metadata
# information.  If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS.  As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size=2M

# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1

# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=1M

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=15M

# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=10M

# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=8



[mysqld]
port=3308
[/spoiler]

Wordpress :
[spoiler]<?php
/** 
 * La configuration de base de votre WordPress.
 *
 * Ce fichier contient les réglages de configuration suivants : réglages MySQL,
 * préfixe de table, clefs secrètes, langue utilisée, et ABSPATH.
 * Vous pouvez en savoir plus à leur sujet en allant sur 
 * {@link http://codex.wordpress.org/Editing_wp-config.php Modifier
 * wp-config.php} (en anglais). Vous devez obtenir les codes MySQL de votre 
 * hébergeur.
 *
 * Ce fichier est utilisé par le script de création de wp-config.php pendant
 * le processus d'installation. Vous n'avez pas à utiliser le site web, vous
 * pouvez simplement renommer ce fichier en "wp-config.php" et remplir les
 * valeurs.
 *
 * @package WordPress
 */

// ** Réglages MySQL - Votre hébergeur doit vous fournir ces informations. ** //
/** Le nom de la base de données de WordPress. */
define('DB_NAME''wordpress');

/** Utilisateur de la base de données MySQL. */
define('DB_USER''root');

/** Mot de passe de la base de données MySQL. */
define('DB_PASSWORD''');

/** Adresse de l'hébergement MySQL. */
define('DB_HOST''localhost');

/** Jeu de caractères à utiliser par la base de données lors de la création des tables. */
define('DB_CHARSET''utf8');

/** Le type de collabtion de la base de données. 
  * N'y touchez qui si vous savez ce que vous faites. 
  */
define('DB_COLLATE''');

/**#@+
 * Clefs uniques d'authentification.
 *
 * Remplacez les valeurs par défaut par des phrases uniques !
 * Vous pouvez générer des phrases aléatoires en utilisant 
 * {@link https://api.wordpress.org/secret-key/1.1/ Le service de clefs secrètes de WordPress.org}.
 *
 * @since 2.6.0
 */
define('AUTH_KEY''put your unique phrase here');
define('SECURE_AUTH_KEY''put your unique phrase here');
define('LOGGED_IN_KEY''put your unique phrase here');
define('NONCE_KEY''put your unique phrase here');
/**#@-*/

/**
 * Préfixe de base de données pour les tables de WordPress.
 *
 * Vous pouvez installer plusieurs WordPress sur une seule base de données
 * si vous leur donnez chacune un préfixe unique. 
 * N'utilisez que des chiffres, des lettres non-accentuées, et des caractères soulignés!
 */
$table_prefix  'wordpress_bdd_';

/**
 * Langue de localisation de WordPress, par défaut en Anglais.
 *
 * Modifiez cette valeur pour localiser WordPress. Un fichier MO correspondant
 * au langage choisi doit être installé dans le dossier wp-content/languages.
 * Par exemple, pour mettre en place une traduction française, mettez le fichier
 * fr_FR.mo dans wp-content/languages, et réglez l'option ci-dessous à "fr_FR".
 */
define ('WPLANG''fr_FR');

/* C'est tout, ne touchez pas à ce qui suit ! Bon blogging ! */

/** Chemin absolu de WordPress vers le dossier WordPress. */
if ( !defined('ABSPATH') )
define('ABSPATH'dirname(__FILE__) . '/');

/** Réglage des variables de WordPress et de ses fichiers inclus. */
require_once(ABSPATH 'wp-settings.php');
?>
[/spoiler]

Et enfin SMF :
[spoiler]<?php
/**********************************************************************************
* Settings.php                                                                    *
***********************************************************************************
* SMF: Simple Machines Forum                                                      *
* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                    *
* =============================================================================== *
* Software Version:           SMF 1.1                                             *
* Software by:                Simple Machines (http://www.simplemachines.org)     *
* Copyright 2006 by:          Simple Machines LLC (http://www.simplemachines.org) *
*           2001-2006 by:     Lewis Media (http://www.lewismedia.com)             *
* Support, News, Updates at:  http://www.simplemachines.org                       *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under   *
* the terms of the provided license as published by Simple Machines LLC.          *
*                                                                                 *
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
*                                                                                 *
* See the "license.txt" file for details of the Simple Machines license.          *
* The latest version can always be found at http://www.simplemachines.org.        *
**********************************************************************************/


########## Maintenance ##########
# Note: If $maintenance is set to 2, the forum will be unusable!  Change it to 0 to fix it.
$maintenance 0; # Set to 1 to enable Maintenance Mode, 2 to make the forum untouchable. (you'll have to make it 0 again manually!)
$mtitle '[Maintenance en cours]'; # Title for the Maintenance Mode message.
$mmessage 'Le forum est actuellement en cours de maitenanece, merci de revenir plus tard ;).'; # Description of why the forum is in maintenance mode.

########## Forum Info ##########
$mbname 'Génération-Making'; # The name of your forum.
$language 'French'; # The default language file set for the forum.
$boardurl 'http://localhost/smf'; # URL to your forum's folder. (without the trailing /!)
$webmaster_email 'noreply@myserver.com'; # Email address to send emails from. (like noreply@yourdomain.com.)
$cookiename 'SMFCookie956'; # Name of the cookie to set for authentication.

########## Database Info ##########
$db_server 'localhost';
$db_name 'smf';
$db_user 'root';
$db_passwd '';
$db_prefix 'smf_';
$db_persist 0;
$db_error_send 1;

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
$boarddir 'C:\wamp\www\smf'; # The absolute path to the forum's folder. (not just '.'!)
$sourcedir 'C:\wamp\www\smf\Sources'; # Path to the Sources directory.

########## Error-Catching ##########
# Note: You shouldn't touch these settings.
$db_last_error 1241007582;


# Make sure the paths are correct... at least try to fix them.
if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt'))
$boarddir dirname(__FILE__);
if (!
file_exists($sourcedir) && file_exists($boarddir '/Sources'))
$sourcedir $boarddir '/Sources';

?>
[/spoiler]

Je précise juste au passage que configuré comme ça ( sauf MySQL, où c'était le port 3307 cette fois-ci ), la dernière fois ça à très bien marché pour Wordpress, SMF buggait lors de l'installation assistée...

Dernière précision : j'ai déjà essayé avec EasyPHP et un autre émulateur, ça n'a rien changé... =/

    








Nan mais les BDD sont déjà crées, comme je te l'ai dis il est arrivé dans le passé que quelques fois ça marche ;).
( Ah et euh c'est quoi cette adresse ? Ça donne rien ).

Phpmyadmin y'a le lien sur Localhost, ou même dans le menu de WAMP, sauf que comme je l'ai dit on ne peux pas y accéder.
CitationErreur

MySQL a répondu:
#2003 - Can't connect to MySQL server on 'localhost' (10061)

    







Citation de: Daru13 le 02 Mai 2009 à 17:51
Nan mais les BDD sont déjà crées, comme je te l'ai dis il est arrivé dans le passé que quelques fois ça marche ;).
Ah, je savais pas...

Citation de: Daru13 le 02 Mai 2009 à 17:51
( Ah et euh c'est quoi cette adresse ? Ça donne rien ).
Pour MAMP, c'est la « page d'accueil » du logiciel et il y a un lien (entre autre) vers phpMyAdmin.

Citation de: Daru13 le 02 Mai 2009 à 17:51
Phpmyadmin y'a le lien sur Localhost, ou même dans le menu de WAMP, sauf que comme je l'ai dit on ne peux pas y accéder.
CitationErreur

MySQL a répondu:
#2003 - Can't connect to MySQL server on 'localhost' (10061)
Tu as changé les ports ou se sont ceux par défaut ?

Actuellement le port utilisé par MySQL c'est 3308, celui de base est 3306.
Mais ça ne change rien de changer ou de repasser à celui de base, j'ai déjà essayé ;).

CitationPour MAMP, c'est la « page d'accueil » du logiciel et il y a un lien (entre autre) vers phpMyAdmin.
Ah ok. Dans WAMP c'est tout simplement http://localhost/.

    








S'il vous plait, arrêter d'utiliser le mot "émulateur". WAMP n'est PAS un émulateur.

http://fr.wikipedia.org/wiki/Emulateur

Tout ce que fait WAMP, c'est installer Apache MySQL et PHP avec des autres programmes qui vont bien pour que ça marche sur windows.



02 Mai 2009 à 20:00 #11 Dernière édition: 03 Mai 2009 à 02:23 par Daru13
@Helmasaur : Apache et PHP sont démarrés, MySQL non, et de l'activer manuellement ça ne marche pas on clique, puis... rien x).
@Nox : Ah ok, merci pour l'info ^^.

EDIT : J'ai essayé de taper \r ( c'est censé redémarrer le service ) sur la console dédié à MySQL, le programme me revoit à chaque fois :


Connection id :   +1
Current database :  *** NONE ***

( J'ai mis +1 car à chaque essaie le chiffre précédent augmente de 1 ).

Il dit que le service est lancé ? En tout cas, pas de changement avec ça...

    







04 Juin 2009 à 01:44 #12 Dernière édition: 04 Juin 2009 à 01:46 par HCkev
J'ai eu un problème d'accès à MySQL en installant WAMP sur mon nouveau PC.
Ça dépend où tu as installé WAMP. Apparemment, les espaces dans les noms de dossiers sont parfois mal supportés, donc si tu as installé dans "C:\\Program Files\WAMP\" (Ce qui est tout de même naturel...), essaie de réinstaller à l'emplacement par défaut (c:\\WAMP\). Pour moi ça a marché ;)

Mon WAMP est déjà dans C:/WAMP ;).
Mais bon, depuis je passe directement par un serveur sinon je peux pas bosser, m'enfin merci quand même ^^.