Ubuntu 12.04lts installs MySQL and connects via QT

Source: Internet
Author: User

Install server$ sudo apt-get install Mysql-server
Install driver $ sudo apt-get install Libqt4-sql-mysql

  

$ dpkg--list | grep mysqlII Libdbd-mysql-perl 4.020-1build2 PERL5 Database interface to the My SQL databaseii libmysqlclient18 5.5.47-0ubuntu0.12.04.1 MySQL Database Client Libraryii libqt4-sql-mysql 4:4.8.1-0ubuntu4.9 Qt 4 MySQL database driveri I mysql-client-5.5 5.5.47-0ubuntu0.12.04.1 MySQL database client binariesii m  ysql-client-core-5.5 5.5.47-0ubuntu0.12.04.1 MySQL Database Core client binariesii Mysql-common 5.5.47-0ubuntu0.12.04.1 MySQL Database Common files, e.g. etc  /MYSQL/MY.CNFII mysql-server 5.5.47-0ubuntu0.12.04.1 MySQL database server                 (Metapackage depending on the latest version) II mysql-server-5.5 5.5.47-0ubuntu0.12.04.1 MySQL DatabaSE server binaries and system database Setupii mysql-server-core-5.5 5.5.47-0ubuntu0.12.04.1 MySQL Database Server binaries

  

Locate the file in directory/usr/lib/i386-linux-gnu/qt4/plugins/sqldrivers/ libqsqlmysql.so

Copy to Qt's installation directory under path:/usr/local/trolltech/qt-4.8.6/plugins/sqldrivers/

sudo cp libqsqlmysql.so/usr/local/trolltech/qt-4.8.6/plugins/sqldrivers/

  

OK with x attribute -rwxr-xr-x 1 tl tl 533748 August 9 libqsqlite.so-rwxr-xr-x 1 tl tl 67816 May libqsqlmysql.so

Test results:

  

Ubuntu 12.04lts installs MySQL and connects via QT

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.