Fedora15 configure MySQL (C ++) in eclipse)

Source: Internet
Author: User

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

Related Article

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.