LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-16-2010, 02:12 PM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
I can see mysql data at web page, but not at sql.


My database is "utf8" and "utf8_genral_ci" at phpmyadmin, but web program's charset is "euc-kr".
The problem is backup and restore.

The command "mysqldump -uroot -p --default-character-set=euc-kr mydb > /my-backup.sql" can produce backup sql, but I could not read and restoring does not works. Also " --default-character-set=utf8" shows same result.

Quote:
mysqldump -uroot -p --default-character-set=euc-kr my-db > my-backup.sql
mysqldump -uroot -p --default-character-set=utf8 my-db > my-backup.sql
Ths is my.cnf.
Code:
[client]
port		= 3306
socket		= /opt/lampp/var/mysql/mysql.sock

[mysqld]
port		= 3306
socket		= /opt/lampp/var/mysql/mysql.sock
skip-locking
key_buffer = 16M
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
plugin_dir = /opt/lampp/lib/mysql/plugin/

server-id	= 1

innodb_data_home_dir = /opt/lampp/var/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /opt/lampp/var/mysql/
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
And the result of "show variables like 'c%'"
Code:
+--------------------------+----------------------------------+
| Variable_name | Value |
+--------------------------+----------------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /opt/lampp/share/mysql/charsets/ |
| collation_connection | latin1_swedish_ci |
| collation_database | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
| completion_type | 0 |
| concurrent_insert | 1 |
| connect_timeout | 10 |
+--------------------------+----------------------------------+

Any comment would be appreciated.
 
Old 08-16-2010, 02:19 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Well ... looking at the output above I wonder what led you
to believe your DB was utf8?
 
Old 08-16-2010, 02:31 PM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by Tinkster View Post
Well ... looking at the output above I wonder what led you
to believe your DB was utf8?
At phpmyadmin, I can see utf8.
I attached picture.
Attached Thumbnails
Click image for larger version

Name:	20100817mysqlproblem1.jpg
Views:	1
Size:	118.0 KB
ID:	4330  
 
Old 08-16-2010, 02:31 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
Quote:
At phpmyadmin, I can see "utf8".

This is photo's link.

http://img412.imageshack.us/img412/3...qlproblem1.jpg
By mistake sent as 'reported'
 
Old 08-16-2010, 02:34 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
You should dump in database charset. What the applications do, it shouldn't matter. How the restore fails?
 
Old 08-16-2010, 02:39 PM   #6
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by Mara View Post
You should dump in database charset. What the applications do, it shouldn't matter. How the restore fails?
Mara/ Thanks a lot!

"latin1" save my data!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
executing linux commands from web page and outputing it back to the web page ashes_sheldon Programming 9 02-28-2015 01:07 AM
LXer: MySQL Data Transfer using Sql Server Integration Services LXer Syndicated Linux News 0 09-02-2009 07:40 AM
LXer: Quickly put data from MySQL to the Web with DrasticGrid LXer Syndicated Linux News 0 08-15-2008 11:20 PM
Data from web form to SQL database crazydark Programming 5 03-14-2007 02:37 AM
SQL queries per page (PHP, MySQL) Silent1 Programming 2 06-28-2004 12:15 AM


All times are GMT -5. The time now is 01:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration