使用codeblocks調試mysql,codeblocks調試mysql

來源:互聯網
上載者:User

使用codeblocks調試mysql,codeblocks調試mysql
codeblocks調試mysql環境搭建

1.將mysql-5.6.23.zip解壓到使用者根目錄~/2.在使用者根目錄~/,建立檔案夾build和mysql3.開啟codeblocks,建立空工程,工程名輸入mysql,Folder to create project in:選擇~/build,點擊next,再點擊finish4.選擇mysql工程,project->add file recursively,選擇~/mysql-5.6.23目錄,wildcard select中添加*.ic,*.ih,點擊OK5.~/build目錄下執行如下命令    cmake ../mysql-5.6.23 \        -DCURSES_LIBRARY=/usr/lib/x86_64-linux-gnu/ \        -DCURSES_INCLUDE_PATH=/usr/include/ \        -DCMAKE_INSTALL_PREFIX=~/mysql/ \        -DMYSQL_DATADIR=~/mysql/data \        -DDEFAULT_CHARSET=utf8 \        -DDEFAULT_COLLATION=utf8_general_ci \        -DEXTRA_CHARSETS=all \        -DENABLED_LOCAL_INFILE=16.project->properties->project setting中勾選This is custom Makefile,Execution directory選擇~/build目錄,即../../build7.project->build options->Debug->make commands去掉$target,build project/target:的make後加-j4,點擊OK8.build->build9.~/build目錄下執行make install10.~/mysql目錄下執行scripts/mysql_install_db --user=mysql11.project->properies->build targets,將output filename修改為../sql/mysqld,即~/build/sql/mysqld12.設定斷點,debug->start/continue13.~/mysql/bin目錄下執行./mysqladmin -u root -p password 123456,修改後密碼為12345614.~/mysql/bin目錄下執行./mysql -uroot -p登入15.執行如下命令,使可以遠端連線    use mysql;    update user set host = '%' where user = 'root' and host = 'hp';    flush privileges;16.修改遠端連線密碼    update user set password=password('123456') where user='root' and host = '%';    flush privileges;

相關文章

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.