2017-04-13 2 views
0

Mac El Capitan (10.11.6) ici. J'ai installé MySQL via homebrew (brew install mysql, qui a installé 5.7.17) et a été en mesure de démarrer avec des valeurs par défaut (absolument zéro configuration à my.cnf). J'ai pu créer une base de données avec des tables, les peupler, etc.MySQL n'aime pas les configs ins ~/.my.cnf

J'ouvre ~/.my.cnf et vois que c'est vide, ce qui est logique vu que je n'y ai jamais ajouté de configuration spéciale.

J'ajouter (ce fichier vide):

[mysqld] 
default-storage-engine = innodb 
default-character-set=utf8 
collation-server = utf8_unicode_ci 
init-connect='SET NAMES utf8' 

Je puis exécutez mysql.server start pour démarrer MySQL et:

mysql.server start 
Starting MySQL 
... ERROR! The server quit without updating PID file (/usr/local/var/mysql/MyUsername.local.pid). 

Si je clair (et faire à nouveau vide) le contenu de ~/.my.cnf et redémarrer MySQL, il démarre parfaitement bien (aucune erreur, je peut tables de requête, etc.). Mais si j'ajoute ces contenus, j'obtiens la même erreur.

Alors clairement MySQL est la vérification ~/.my.cnf pour configs à charge, et clairement il y a quelque chose que la syntaxe n'aime pas. Donc, je commence une série de cycles de config/test pour voir quelle propriété est le délinquant.

Je change ~/.my.cnf à:

[mysqld] 
default-storage-engine = innodb 

et redémarrez. Même erreur exacte

Je change ~/.my.cnf à:

[mysqld] 
default-character-set=utf8 

et redémarrez. Même erreur exacte

Je change ~/.my.cnf à:

[mysqld] 
collation-server = utf8_unicode_ci 

et redémarrez. Même erreur exacte

Je change ~/.my.cnf à:

[mysqld] 
init-connect='SET NAMES utf8' 

et redémarrez. Même erreur exacte Clairement quelque chose d'autre se passe ici. MySQL ne l'aime pas quand je spécifie toutes les configurations à l'intérieur ~/.my.cnf. Que se passe-t-il ici?!?

J'ai essayé de suivre toutes les recommandations de this article mais aucune d'entre elles n'a fonctionné. Cela semble définitivement être un problème MacOS/MySQL.

Si j'ouvre /usr/local/var/mysql/MyUser.local.err je vois:

2017-04-13T13:10:42.6NZ mysqld_safe Logging to '/usr/local/var/mysql/MyUser.local.err'. 
2017-04-13T13:10:42.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql 
2017-04-13T13:10:42.365982Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 
2017-04-13T13:10:42.366238Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 
2017-04-13T13:10:42.366286Z 0 [Note] /usr/local/Cellar/mysql/5.7.17/bin/mysqld (mysqld 5.7.17) starting as process 56561 ... 
2017-04-13T13:10:42.369426Z 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive 
2017-04-13T13:10:42.371041Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 
2017-04-13T13:10:42.371058Z 0 [Note] InnoDB: Uses event mutexes 
2017-04-13T13:10:42.371062Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 
2017-04-13T13:10:42.371066Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 
2017-04-13T13:10:42.371389Z 0 [Note] InnoDB: Number of pools: 1 
2017-04-13T13:10:42.371487Z 0 [Note] InnoDB: Using CPU crc32 instructions 
2017-04-13T13:10:42.373341Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 
2017-04-13T13:10:42.385062Z 0 [Note] InnoDB: Completed initialization of buffer pool 
2017-04-13T13:10:42.402413Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 
2017-04-13T13:10:42.456473Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 
2017-04-13T13:10:42.456722Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 
2017-04-13T13:10:42.498060Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 
2017-04-13T13:10:42.499778Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 
2017-04-13T13:10:42.499807Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 
2017-04-13T13:10:42.500089Z 0 [Note] InnoDB: Waiting for purge to start 
2017-04-13T13:10:42.550861Z 0 [Note] InnoDB: 5.7.17 started; log sequence number 6305962580 
2017-04-13T13:10:42.551099Z 0 [Note] InnoDB: Loading buffer pool(s) from /usr/local/var/mysql/ib_buffer_pool 
2017-04-13T13:10:42.551345Z 0 [Note] Plugin 'FEDERATED' is disabled. 
2017-04-13T13:10:42.555196Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170413 13:10:42 
2017-04-13T13:10:42.559085Z 0 [ERROR] unknown variable 'default-character-set=utf8' 
2017-04-13T13:10:42.559125Z 0 [ERROR] Aborting 

2017-04-13T13:10:42.559139Z 0 [Note] Binlog end 
2017-04-13T13:10:42.559221Z 0 [Note] Shutting down plugin 'ngram' 
2017-04-13T13:10:42.559253Z 0 [Note] Shutting down plugin 'partition' 
2017-04-13T13:10:42.559266Z 0 [Note] Shutting down plugin 'BLACKHOLE' 
2017-04-13T13:10:42.559300Z 0 [Note] Shutting down plugin 'ARCHIVE' 
2017-04-13T13:10:42.559311Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA' 
2017-04-13T13:10:42.559387Z 0 [Note] Shutting down plugin 'MRG_MYISAM' 
2017-04-13T13:10:42.559406Z 0 [Note] Shutting down plugin 'MyISAM' 
2017-04-13T13:10:42.559430Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL' 
2017-04-13T13:10:42.559439Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES' 
2017-04-13T13:10:42.559443Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES' 
2017-04-13T13:10:42.559447Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS' 
2017-04-13T13:10:42.559450Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN' 
2017-04-13T13:10:42.559453Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS' 
2017-04-13T13:10:42.559457Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS' 
2017-04-13T13:10:42.559460Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES' 
2017-04-13T13:10:42.559464Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS' 
2017-04-13T13:10:42.559467Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES' 
2017-04-13T13:10:42.559473Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE' 
2017-04-13T13:10:42.559477Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE' 
2017-04-13T13:10:42.559510Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG' 
2017-04-13T13:10:42.559514Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED' 
2017-04-13T13:10:42.559517Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED' 
2017-04-13T13:10:42.559523Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD' 
2017-04-13T13:10:42.559529Z 0 [Note] Shutting down plugin 'INNODB_METRICS' 
2017-04-13T13:10:42.559535Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO' 
2017-04-13T13:10:42.559539Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS' 
2017-04-13T13:10:42.559543Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU' 
2017-04-13T13:10:42.559546Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE' 
2017-04-13T13:10:42.559550Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET' 
2017-04-13T13:10:42.559588Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX' 
2017-04-13T13:10:42.559608Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET' 
2017-04-13T13:10:42.559622Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM' 
2017-04-13T13:10:42.559629Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET' 
2017-04-13T13:10:42.559635Z 0 [Note] Shutting down plugin 'INNODB_CMP' 
2017-04-13T13:10:42.559640Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS' 
2017-04-13T13:10:42.559665Z 0 [Note] Shutting down plugin 'INNODB_LOCKS' 
2017-04-13T13:10:42.559674Z 0 [Note] Shutting down plugin 'INNODB_TRX' 
2017-04-13T13:10:42.559681Z 0 [Note] Shutting down plugin 'InnoDB' 
2017-04-13T13:10:42.559742Z 0 [Note] InnoDB: FTS optimize thread exiting. 
2017-04-13T13:10:42.559798Z 0 [Note] InnoDB: Starting shutdown... 
2017-04-13T13:10:42.665019Z 0 [Note] InnoDB: Dumping buffer pool(s) to /usr/local/var/mysql/ib_buffer_pool 
2017-04-13T13:10:42.665949Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 170413 13:10:42 
2017-04-13T13:10:44.125226Z 0 [Note] InnoDB: Shutdown completed; log sequence number 6305962599 
2017-04-13T13:10:44.126507Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 
2017-04-13T13:10:44.126528Z 0 [Note] Shutting down plugin 'MEMORY' 
2017-04-13T13:10:44.126540Z 0 [Note] Shutting down plugin 'CSV' 
2017-04-13T13:10:44.126545Z 0 [Note] Shutting down plugin 'sha256_password' 
2017-04-13T13:10:44.126549Z 0 [Note] Shutting down plugin 'mysql_native_password' 
2017-04-13T13:10:44.126701Z 0 [Note] Shutting down plugin 'binlog' 
2017-04-13T13:10:44.126824Z 0 [Note] /usr/local/Cellar/mysql/5.7.17/bin/mysqld: Shutdown complete 

2017-04-13T13:10:44.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/MyUser.local.pid ended 
+0

Il devrait y avoir un fichier journal dans/usr/local/var/mysql/est-il quelque chose qui décrit l'erreur? – Bodo

Répondre