MYSQL entry 3 _ import local MySQL Data to the SAE Database

Source: Internet
Author: User


MYSQL entry 3 _ import local MySQL Data to the SAE database 1. mySQL character set the default Character Set of MySQL is latin1. When the local MySQL database is exported to SQL and then imported to MySQL of SAE, Chinese characters are garbled, the solution is to set the local mysql Default character set to utf8 to view the current MySQL character set www.2cto.com mysql> show variables like 'character _ set _ % '; change the default MySQL character set $ vi/etc/mysql/my. cnf adds the parameter [client] default-character-set = utf8 [mysqld] character-set-server = utf8init_connect = 'set NAMES utf8' to the client and mysqld to restart the MySQL Background service $ service mysqld restart 2. import/export data is generally imported and exported through the SQL file. The SQL file includes a series of SQL commands, including table creation and data insertion. export data from MySQL $ mysqldump-h localhost-u root-p Database Name>/tmp. SQL 4. import data to the SAE Database: SAE-> my applications-> Service Management-> MySQL-> Manage MySQL-> Import, select/tmp. SQL, file Character Set utf8, and SQL compatibility mode MYSQL40. After import, you can view the newly imported data table in the MySQL management interface. error Handling if a LOCK error is prompted during SAE import, the error occurs in/tmp. delete all locks in SQL, UNLOCK related statements can be 6 reference instance http://oatmental123.sinaapp.com/slim/index.php
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.