![]() |
|
|
|
|
|||||||
| PHP / MySQL Assistance We understand. Not all of you are experienced programmers, but some of you are highly skilled at coding. So we've set aside this forum so you can ask questions, and provide answers to the most commonly asked PHP / MySQL issues. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do I set MySQL to import utf8 encoding by default? I made test on many scripts, but alas there cannot find a simple command which may do it to my hosting MySQL database.
|
|
#2
|
||||
|
||||
|
You must configure what encoding to use your connection.
Code:
#mysql SET NAMES UTF8; source path_to_sql_file.sql |
|
#3
|
||||
|
||||
|
Open the file called my.cnf and within the section [client] write a line:
Sample code: Code:
default-character-set=utf8 Sample code: Code:
default-character-set=utf8 init-connect="SET NAMES utf8" |
|
#4
|
|||
|
|||
|
this is a very useful information! thanks for this one.
![]()
|
![]() |
| Tags |
| default, encoding, hosting, import, mysql, utf8 |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|