Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Let MySQL 5.6 support Emoji expression     - Five Linux user space debugging tool (Linux)

- grep command Detailed and relevant examples (Linux)

- Teach you the Ubuntu Server enabled SSH multifactor authentication (Server)

- Bug tracking library after FastJson omitted the decimal point 0 (Programming)

- 64 Ubuntu 15.04 Linux kernel upgrade to Linux 4.1.0 (Linux)

- Github Remote Assistance (Linux)

- Configuring Sublime Text Python runtime environment 2 (Linux)

- How to view information about the installed version of CentOS (Linux)

- How SSHfs mount a remote file system on Linux (Linux)

- JEdit 5.2 Pro Edition installation on Ubuntu 14.04 (Linux)

- Installation image conversion tool on your Ubuntu Converseen 0.8.1 (Linux)

- CentOS installation of the ftp (Linux)

- Ubuntu 14.10 How to install office suite Calligra Suite 2.8.7 (Linux)

- Normal start Lazarus 1.0.8 under Ubuntu (Linux)

- Linux pwd command learning experience (Linux)

- Linux print file and send mail (Linux)

- Connect to the Oracle Database Help class (Database)

- Linux firewall settings -DNS server articles (Server)

- Learn about EditText little depth (Programming)

- CentOS 7 How to install MySQL Server (Database)

 
         
  Let MySQL 5.6 support Emoji expression
     
  Add Date : 2018-11-21      
         
         
         
  Let MySQL support Emoji expression, it relates to wireless relevant recommendations ahead of the MySQL database using utf8mb4 character set.

MySQL version 5.6

1 Solution: Mysql transcoding from utf8 to utf8mb4.

  Require> = MySQL 5.5.3 version, from the library must also be 5.5, the low version does not support this character set, copy error

2 my.cnf file to add

  [Mysqld]
  character-set-server = utf8mb4
  collation-server = utf8mb4_unicode_ci
  init_connect = 'SET NAMES utf8mb4'

3 Modify the character set you need to add the database table fields

    Modify the database character set:

    ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

    Modify the character set table:

    ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

    Modify the character set field:

    ALTER TABLE table_name CHANGE column_name column_name VARCHAR (191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

    If you just need a field only need to modify the character set that will be able to field

4 If you modify the query above will not please sql

    mysql> show variables like '% sql_mode%';

    + --------------- + --------------------------------- ----------- +

    | Variable_name | Value |

    + --------------- + --------------------------------- ----------- +

    | Sql_mode | STRICT_TRANS_TABLES, NO_ENGINE_SUBSTITUTION |

    + --------------- + --------------------------------- ----------- +

    1 row in set (0.00 sec)

    If these results can not congratulate you is stored

    Sql_mod to set this mode (see note here after revision to exit the console or else see the effect, and

    This configuration write my.cnf and restart the server is not in force, if you want to ask why please go mysql consultant group)

    mysql> set global sql_mode = 'NO_ENGINE_SUBSTITUTION';

    mysql> show variables like '% sql_mode%';

    + --------------- + ------------------------ +

    | Variable_name | Value |

    + --------------- + ------------------------ +

    | Sql_mode | NO_ENGINE_SUBSTITUTION |

    + --------------- + ------------------------ +

    1 row in set (0.00 sec)

6 Once this is done is complete, let MySQL support Emoji expression.
     
         
         
         
  More:      
 
- CentOS6 installation configuration rsh (Server)
- How to compare PDF files on Ubuntu (Linux)
- Iptables in Ubuntu (Linux)
- Ubuntu 14.04 installation and configuration environment variable JDK1.8.0_25 (Linux)
- CentOS 6.5 can not connect to the network under VMware (Linux)
- Memcached and Redis (Linux)
- Linux how to prohibit the use of Ping command (Linux)
- CentOS 7 Change Hostname (Linux)
- According to the national position on how to block traffic in Linux (Server)
- Build Eclipse + Maven + Scala-IDEA the Scala Web development environment (Server)
- Linux SVN account password to save your settings (Linux)
- Common Linux system performance monitoring command (Linux)
- Java integrated development environment common set of operations (Linux)
- Linux cut Command Study Notes (Linux)
- Using IntelliJ IDEA 13 integrated development environment to build Android (Linux)
- Workaround CentOS error message during compilation PHP5 common (Linux)
- Git you do not know about some of the things (Linux)
- CentOS 6.7 compile and install LAMP (Server)
- Use Ambari rapid deployment Hadoop big data environment (Server)
- Git large file storage will help handle large binary files (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.