Use codeblocks to debug mysql and codeblocks to debug mysql
Codeblocks debugging mysql environment setup
1.decompress mysql-5.6.23.zip to the user root directory ~ /2. In the user root directory ~ /, Create a Folder build and mysql3. open codeblocks, create an empty project, enter mysql in the project name, and Folder to create project in: Select ~ /Build, click next, and then click finish4. select mysql project, project-> add file recursively, and select ~ /Mysql-5.6.23 directory, add *. ic, *. ih to wildcard select, click OK5 .~ /Build directory to execute the following command 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. select This is M Makefile from project-> properties-> project setting, and select ~ from Execution directory ~ /Build directory, that is .. /.. /build7.project-> build options-> Debug-> make commands remove $ target, build project/target: make and add-j4. Click OK8.build-> build9 .~ Run make install10. ~ in the/build directory .~ In the/mysql directory, run scripts/mysql_install_db -- user = mysql11.project-> properies-> build targets to change the output filename to ../SQL/mysqld, that is ~ /Build/SQL/mysqld12. set the breakpoint, debug-> start/continue13 .~ Run./mysqladmin-u root-p password 123456 in the/mysql/bin directory, and change the password to 12345614 .~ Run the command in the/mysql/bin directory. /mysql-uroot-p login 15. run the following command to remotely connect to use mysql; update user set host = '%' where user = 'root' and host = 'hp '; flush privileges; 16. modify the remote connection password update user set password = password ('000000') where user = 'root' and host = '%'; flush privileges;