ホーム > 開発環境 > mysql文字コードエラー

mysql文字コードエラー

2012 年 2 月 2 日 コメントをどうぞ コメント

eclipseについてくるxamppについてくるmysql。

せっかくなので、こいつを使おうと設定してみる。

とりあえず、

『setup_xampp.bat』でxamppセット『xampp-control.exe』でコントロールパネル起動

コントロールパネル

 

 

 

 

 

 

 

 

「start」 ボタンで「Apache」を起動→「admin」でブラウザが開く、ここではセキュリティ設定を行う。

ユーザ&パスワードを決める程度だから、あまり難しくはない。

 

軽く設定できたら、実際に接続してみる。

今回は、phpmyadminとeclipseから接続した。

 

とりあえず適当にDB作ってテーブル作って・・・。ちょっと見てみようかな?

で、接続すると・・・。

eclipse(DBviewerプラグイン)   →  テーブルを開けない。(sql分が間違ってる的なエラー)

phpmyadmin  →  データが文字化けする。

 

やっぱりといえばやっぱりですな。

何度もこんな目には合ってきました。

特に今回は、テーブル名、カラム名ともに日本語で作ったので、何も設定せずにすんなりいくわけがない!!

 

早速google先生に聞きに行きます。

文字コードを設定しましょう。

今回は、utf8で統一したいと思ってたのでutf8に設定。(eclipse側もutf8での利用してます)

【MySQL】mysql5.5での文字コード設定

上記サイトを参考に『..\xampp\\bin\my.ini』を修正。

なんか、mysqlのバージョンによっては『my.conf』だったり、修正内容も違ったりするらしいので注意。

さて、これで・・・

eclipse  →   開けました(問題なし)

phpmyadmin   →  文字化けのまま・・・。

 

再び先生に・・・。

文字化けとの戦い(MAMP-phpMyAdmin、MySQL-PHP編)

・・・・どうやら、DB作成の時の照合順序とかいう項目に問題があるらしい。

そんなの指定したっけ?

仕方ないので、再作成。

DB作成項

 

 

 

 

あるね・・・・。よく見なきゃね・・・。

この「照合順序」になってるところを「utf8_general_cl」を選択して・・・・。

 

できました!!

素人にはDB関係は難しいわい。

 

まだ、プログラムで呼んだわけじゃないので、その時にも設定が必要になるかも知れないが、

とりあえず今は見れただけで満足。

 

 

 

関連する記事

Here’s the thing: Silva’s master plan began the moment he got captured, timing it so that he’d be in custody right when M was testifying. But he didn’t turn himself in he was captured by Bond. So how could he have known when that cheap nfl jerseys would happen? Bond tracks a bullet shard in his shoulder to an assassin guy who has a casino chip from a casino where he sticks it to some lady who happens to know where Silva is. That’s literally how it happens Silva had no control over that. How many days were those two fake cops standing there, waiting for Silva?ATF Assistant Special Agent in Charge Celinez Nunez said at a news conference Friday that all of the weapons were purchased legally, seven of them by the shooter or his family members in the last three years. She says investigators also found a flak jacket next to a rifle at the school, which contained steel plates.For Edwards, though, beating Italy is a dangerous assumption In an outstanding career as a rugby league Cheap Oakleys player and a rugby union coach, the man from Wigan has always considered complacency to be his mortal enemy. At the Vale of Glamorgan Hotel this week, the Welsh players have been prepared by Edwards and head coach Warren Gatland with the wholesale jerseys kind of fierce intensity that had even the mighty flanker Martyn Williams, not exactly ‘Powder Puff from Pontypridd’, joking that if he’d known how tough the new regime was going to be, he might never have emerged from international retirement.In the television and film production distribution segment, revenue for the three months ended September 30 09 was approximately $2 million as compared to approximately $3.6 million in ’08, Authentic Jerseys Wholesale a replica oakleys decrease of approximately $1.6 million. Revenue for the nine months ended September 30 09 was approximately $7.4 million, as compared to $11.5 million in ’08, a decrease of approximately cheap nfl jerseys $4.1 million.6. Ruben Olivares: Rockabye Ruben was a deadly puncher with both fists and he went to the body like nobody’s business. He had a so so chin and slow footwork but he put on steady pressure and his offense was brilliant. Olivares is a two time Bantamweight and two time Featherweight world champion who fought with fierce aggression win or lose. His best wins came from beating Lionel Rose (Bantamweight Champion), Bobby Chacon (Twice), Chucho Castillo (Twice), Jose Luis Ramirez and Zensuke Utagawa. Olivares left the sport with a record of 89 13 3 with 79 bone crushing knockouts wins.The ploy infuriated Mercedes during the race, prompting them to issue two clear instructions to Hamilton to increase his pace. They feared his tactics could cost them the win, with Vettel closing in. Mercedes have a stricthierarchy for pit wall to cockpit exchanges. But when he told Hamilton to put his foot down, Hamilton retorted that he was Wholesale NFL Jerseys ‘comfortable’ doing what he was doing.

関連する記事

カテゴリー: 開発環境 タグ: ,
  1. コメントはまだありません。
  1. トラックバックはまだありません。