1. Install MYSQL:
Yum install MySQL *
Configure MYSQL:
[Root @ sample ~] # Vim/etc/My. CNF plugin edit the MySQL configuration file
[Mysqld]
Datadir =/var/lib/MySQL
Socket =/var/lib/MySQL. Sock
# Default to using old password format for compatibility with MySQL 3.x
# Clients (those using the mysqlclient10 compatibility package ).
Old_passwords = 1 encode find this line, add a new rule below this line, let MySQL's default code as UTF-8
Default-character-set = utf8 character
Add this line
Add the following statement at the end of the configuration file:
[MySQL]
Default-character-set = utf8
Start MySQL Service
[Root @ sample ~] # Chkconfig mysqld on startup
[Root @ sample ~] # Chkconfig -- list mysqld restart confirm that MySQL is started automatically
Mysqld 0: off 1: off 2: On 3: On 4: On 5: on 6: off okay if 2--5 is on
[Root @ sample ~] #/Etc/rc. d/init. d/mysqld start slave start MySQL Service
2. Eclipse configuration environment:
Go to project> Properties> C/C ++ build> Settings> gcc C ++ complier> endpoints> include paths
Add path:/usr/include/MySQL
Go to project> Properties> C/C ++ build> Settings> gcc C ++ linker> Libraries
Add two parameters mysqlclient and m to libraries (l ).
Libraryies search path
(L) Add/usr/lib64/MySQL (64-bit System)
Http://www.byywee.com/page/M0/S257/257590.html
Http://www.vijun.com/database/mysql/5f84f4d934c11eb60134c6ad3e6c0037.html