<?php $link = mysql_connect("127.0.0.1","root","" ); if (!$link) { die('Could not connect to MySQL: ' . mysql_error()); } echo 'Connection OK'; mysql_close($link); ?>
mysql -u root
110226 0:57:51 [Note] Plugin 'FEDERATED' is disabled. InnoDB: The InnoDB memory heap is disabled InnoDB: Mutexes and rw_locks use Windows interlocked functions InnoDB: Compressed tables use zlib 1.2.3 110226 0:57:51 InnoDB: Initializing buffer pool, size = 128.0M 110226 0:57:51 InnoDB: Completed initialization of buffer pool 110226 0:57:52 InnoDB: highest supported file format is Barracuda. 110226 0:57:52 InnoDB: 1.1.4 started; log sequence number 1595675 110226 0:57:52 [Note] Event Scheduler: Loaded 0 events 110226 0:57:52 [Note] wampmysqld: ready for connections. Version: '5.5.8-log' socket: '' port: 3306 MySQL Community Server (GPL)
language=J:/Wamp/bin/mysql/mysql5.1.55/share/french
lc-messages-dir=J:/Wamp/bin/mysql/mysql5.5.9/share lc-messages=fr_FRBien sûr, en tenant compte des chemins d'installation.
[wampmysqld] skip-locking
J:\wamp\bin\mysql\mysql5.5.8\bin\mysqld.exe wampmysqld
[wampmysqld] basedir="C:/Progs/Wamp/bin/mysql/mysql5.1.41" log-error="C:/Progs/Wamp/logs/mysql.log" datadir="C:/Progs/Wamp/bin/mysql/mysql5.1.41/data"
# The following options will be passed to all MySQL clients [client] port = 3306 socket = /tmp/mysql.sock [mysqld] port=3306 # The MySQL server [wampmysqld] port = 3306 socket = /tmp/mysql.sock skip-external-locking max_connections = 255 query_cache_size = 16M key_buffer = 512M max_allowed_packet = 1M table_cache = 64 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M query_cache_size = 16M tmp_table_size=64M thread_cache_size = 12 thread_concurrency = 4 basedir=J:/Wamp/bin/mysql/mysql5.5.9 log-error=J:/Wamp/logs/mysql.log datadir=G:/wwwbases #Path to the language lc-messages-dir=J:/Wamp/bin/mysql/mysql5.5.9/share lc-messages=fr_FR # The default storage engine that will be used when create new tables when default-storage-engine=MYISAM # Set the SQL mode to strict sql-mode="STRICT_ALL_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" # Disable Federated by default skip-federated server-id = 1 # Uncomment the following if you are using InnoDB tables skip-innodb [mysqldump] quick max_allowed_packet = 32M [mysql] no-auto-rehash [isamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 512M sort_buffer_size = 256M read_buffer = 4M write_buffer = 4M [mysqlhotcopy] interactive-timeout
110226 19:39:30 [Note] Plugin 'FEDERATED' is disabled. 110226 19:39:30 [Note] Plugin 'InnoDB' is disabled. 110226 19:39:30 [Note] Event Scheduler: Loaded 0 events 110226 19:39:30 [Note] wampmysqld: ready for connections. Version: '5.5.8' socket: '' port: 3306 MySQL Community Server (GPL)
Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.9 MySQL Community Server (GPL) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
ERROR 2003 HY000 : Can't connect to MySQL server on 'localhost' (10060)
C:\Progs\Wamp\bin\mysql\mysql5.5.8\bin>mysql_upgrade.exe --user=root --host=loca lhost --password=******* Looking for 'mysql.exe' as: C:\Progs\Wamp\bin\mysql\mysql5.5.8\bin\mysql.exe Looking for 'mysqlcheck.exe' as: C:\Progs\Wamp\bin\mysql\mysql5.5.8\bin\mysqlche ck.exe Running 'mysqlcheck' with connection arguments: "--port=3306" "--socket=/tmp/mys ql.sock" "--host=localhost" C:\Progs\Wamp\bin\mysql\mysql5.5.8\bin\mysqlcheck.exe: Got error: 2003: Can't co nnect to MySQL server on 'localhost' (10060) when trying to connect FATAL ERROR: Upgrade failed C:\Progs\Wamp\bin\mysql\mysql5.5.8\bin>
mysql_upgrade.exe --user=root --host=localhost --password=On peut dire que ce détail est couvert non?
127.0.0.1 localhostet redémarrer la machine.
extension=php_bz2.dll extension=php_curl.dll ;extension=php_fileinfo.dll extension=php_gd2.dll extension=php_gettext.dll ;extension=php_intl.dll ;extension=php_imap.dll ;extension=php_ldap.dll extension=php_mbstring.dll extension=php_exif.dll extension=php_mysql.dll ;extension=php_mysqli.dll ;extension=php_oci8.dll ;extension=php_oci8_11g.dll ;extension=php_openssl.dll ;extension=php_pdo_mysql.dll ;extension=php_pdo_oci.dll ;extension=php_pdo_odbc.dll ;extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll ;extension=php_pgsql.dll ;extension=php_shmop.dll ;extension=php_soap.dll extension=php_sockets.dll extension=php_sqlite.dll ;extension=php_sqlite3.dll ;extension=php_sybase_ct.dll ;extension=php_tidy.dll ;extension=php_xmlrpc.dll extension=php_xsl.dll extension=php_mcrypt.dll