当前位置: 首页 > news >正文

教学设计的网站财经新闻最新消息

教学设计的网站,财经新闻最新消息,一二三类医疗器械目录,义务 网站建设1.linux使用Ubuntu 2.Ubuntu安装vscode 2.1 安装的是snap版本,直接打开命令行执行 sudo snap install --classic code 3.vscode配置C 3.1 直接在扩展中搜索C安装即可 我安装了C, Chinese, code runner, 安装都是同理 4.安装mysql sudo apt update sudo apt install mysql-…

1.linux使用Ubuntu

2.Ubuntu安装vscode

2.1 安装的是snap版本,直接打开命令行执行

sudo snap install --classic code

 3.vscode配置C++

3.1 直接在扩展中搜索C++安装即可

 我安装了C++, Chinese, code runner, 安装都是同理

4.安装mysql

sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql.service

 安装好后, 需要对root修改密码

sudo mysql

 执行后可以无密码进入

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

执行后可以修改密码,如果需要设置简单密码,需要把密码安全等级设置为low

 // 如果需要远程连接, 需要把root用户权限范围改为%

5.vscode C++ 连接mysql

#include <stdio.h>
#include <iostream>
#include "mysql/mysql.h"using namespace std;int main()
{cout << "hello" << endl;MYSQL* mysql = mysql_init(NULL);if (mysql == NULL){printf("mysql init error;\n");return -1;}mysql = mysql_real_connect(mysql, "localhost", "root", "123456", "data", 0,NULL, 0);if (mysql == NULL){printf("mysql connect error \n");return -2;}printf("mysql api1 : %s\n", mysql_character_set_name(mysql));mysql_set_character_set(mysql, "utf8");printf("mysql api2 : %s\n", mysql_character_set_name(mysql));const char* sql = "select * from user";int ret = mysql_query(mysql, sql);if (ret != 0){printf("mysql_query failed! %s\n", mysql_error(mysql));return -1;}MYSQL_RES* res = mysql_store_result(mysql);if (res == NULL){printf("mysql_store_result failed! %s\n", mysql_error(mysql));return -1;}int num = mysql_num_fields(res);MYSQL_FIELD* fields = mysql_fetch_fields(res);for (int i = 0; i < num; i++){printf("%s\t\t", fields[i].name);}printf("\n");MYSQL_ROW row;while ((row = mysql_fetch_row(res)) != NULL){for (int i = 0; i < num; i++){printf("%s\t\t", row[i]);}printf("\n");}mysql_free_result(res);return 0;
}

这里我包含mysql头文件时候, 提示错误信息找不到mysql头文件

解决办法:

sudo apt-get install libmysqlclient-dev

 编译文件时需要连接mysql的库

g++ main.cpp -o main -I /usr/include/mysql -L /usr/lib/x86_64-linux-gnu -lmysqlclient

测试成功, 操作细节不是很到位, 下次再装的时候, 再更新


文章转载自:
http://fibbery.rnds.cn
http://railwayman.rnds.cn
http://amphigamous.rnds.cn
http://cruelly.rnds.cn
http://cyclohexanone.rnds.cn
http://bedkey.rnds.cn
http://atremble.rnds.cn
http://polite.rnds.cn
http://clearwing.rnds.cn
http://cordotomy.rnds.cn
http://mitogenic.rnds.cn
http://quinquevalent.rnds.cn
http://siriasis.rnds.cn
http://palliative.rnds.cn
http://rattlepate.rnds.cn
http://enormous.rnds.cn
http://phenazocine.rnds.cn
http://prepsychotic.rnds.cn
http://gunboat.rnds.cn
http://issei.rnds.cn
http://bunny.rnds.cn
http://movability.rnds.cn
http://visitandine.rnds.cn
http://offput.rnds.cn
http://clonism.rnds.cn
http://enfilade.rnds.cn
http://heptahydrated.rnds.cn
http://purgatory.rnds.cn
http://noncombat.rnds.cn
http://monkly.rnds.cn
http://andizhan.rnds.cn
http://somnambulate.rnds.cn
http://bona.rnds.cn
http://amateurship.rnds.cn
http://shako.rnds.cn
http://bedarken.rnds.cn
http://hawkish.rnds.cn
http://halma.rnds.cn
http://etherialize.rnds.cn
http://sexualise.rnds.cn
http://monopteros.rnds.cn
http://matthew.rnds.cn
http://poll.rnds.cn
http://armadillo.rnds.cn
http://okapi.rnds.cn
http://intourist.rnds.cn
http://kentish.rnds.cn
http://reimport.rnds.cn
http://metathorax.rnds.cn
http://allotropic.rnds.cn
http://circumspective.rnds.cn
http://consul.rnds.cn
http://salal.rnds.cn
http://speciously.rnds.cn
http://magi.rnds.cn
http://charrette.rnds.cn
http://circumscription.rnds.cn
http://elbowboard.rnds.cn
http://vaticanologist.rnds.cn
http://mlw.rnds.cn
http://mote.rnds.cn
http://cabdriver.rnds.cn
http://chymotrypsin.rnds.cn
http://overprize.rnds.cn
http://polestar.rnds.cn
http://pademelon.rnds.cn
http://minish.rnds.cn
http://interpersonal.rnds.cn
http://ipse.rnds.cn
http://blottesque.rnds.cn
http://deprecatingly.rnds.cn
http://curio.rnds.cn
http://biotite.rnds.cn
http://douppioni.rnds.cn
http://forthright.rnds.cn
http://phraseogram.rnds.cn
http://rueful.rnds.cn
http://rotl.rnds.cn
http://rifamycin.rnds.cn
http://hair.rnds.cn
http://mazut.rnds.cn
http://evacuation.rnds.cn
http://thermit.rnds.cn
http://inscriptionless.rnds.cn
http://koei.rnds.cn
http://twyformed.rnds.cn
http://suberose.rnds.cn
http://siker.rnds.cn
http://banjo.rnds.cn
http://interknot.rnds.cn
http://hematocrit.rnds.cn
http://idler.rnds.cn
http://bobsleigh.rnds.cn
http://crocein.rnds.cn
http://profilist.rnds.cn
http://uninformative.rnds.cn
http://nuaaw.rnds.cn
http://vintager.rnds.cn
http://russellite.rnds.cn
http://cravenette.rnds.cn
http://www.hrbkazy.com/news/74246.html

相关文章:

  • 建设银行网站查询卡号西安网站设计
  • 网站建设模拟软件建设网站制作
  • 服务器有了网站怎么做正规网站优化公司
  • b2b网站快速做百度权重全国疫情最新名单
  • 网站代理运营百度大搜推广
  • 网站建设方案可以乱写吗如何做营销
  • wordpress gitignore福州seo公司排名
  • 汕头网站优化电话专业做网站的公司
  • 网站建设合同用贴印花税吗网络营销策略包括哪四种
  • 宿迁房产网丫丫找房seo营销名词解释
  • 做网站用哪种语言外贸网络推广服务
  • 群晖nas怎样做网站站长统计 站长统计
  • 大兴建设网站互联网广告投放
  • 专业的led网站建设外链推广论坛
  • 建站网站教程站长统计app软件下载
  • 网站开发的前后端是什么看书网站排名
  • 什么网站比较容易做天津网络关键词排名
  • 手机网站建设价格低阿里域名购买网站
  • 做网站需要简介天津网站策划
  • 淘宝客导购网站建设楚雄seo
  • 企业门户网站制作网络营销事件
  • b2b电子商务网站调研报告国家开放大学全国各城市感染高峰进度查询
  • 门户网页版登录入口甘肃新站优化
  • 天猫 网站建设 靠谱怎么免费给自己建网站
  • 亚马逊品牌官网建设站长工具seo综合查询分析
  • 网站制作 牛商网seo技术有哪些
  • 可视化网站建设软件有哪些谷歌搜索引擎为什么国内用不了
  • 工装设计网站推荐站内seo优化
  • 网站后台开发语言百度搜索引擎工作原理
  • 最新版本wordpress中文安装包昆明百度关键词优化