使用C/C ++程序将用户添加到MySQL. [英] using C/C++ program add a user to MySQL.

查看:60
本文介绍了使用C/C ++程序将用户添加到MySQL.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写一个C/C ++程序,将用户添加到MySQL.应该只允许用户插入"到给定的数据库中吗?

Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database?

推荐答案

要执行以下程序,请按照学习步骤进行操作:
1.了解如何在mysql命令提示符下创建用户.
2.了解如何设置用户权限.
3.学习如何为mysql数据库服务器开发客户端应用程序.
To do the following program, follow the learning steps:
1. learn how to create user in mysql command prompt.
2. learn how to set user privileges.
3. learn how to develop client application for mysql database server.


启动她的 ^ ]并用于C/C ++ MySql访问,请访问 MySql Connector/C [ ^ ].
Start her GRANT Syntax[^] and for C/C++ MySql access go for MySql Connector/C[^].


写用于作业的SQL语句,然后在数据库上执行它.

另一种方法是在数据库上存储过程.

尝试学习....
write a SQL statement for your homework an execute it at the db.

Another way is a stored procedure on the db.

try your luck in learning ....


这篇关于使用C/C ++程序将用户添加到MySQL.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆