Комментарии:
Very helpful video! I wish he used classes and such bc the way the code looks looks very similar to a code. In other words, I wish he used object-oriented programming principles to connect with the SQL databases since C++ is known for that.
ОтветитьThanks!! Very helpful. Love your voice 💅💅💅
ОтветитьMariaDB is a drop-in replacement for MySQL. All code created for MySQL will work on MariaDB.
ОтветитьAnyone of you manage to replicate this example on Ubuntu 22 with MySQL?
If not, which Ubuntu releases you use that successfully run this example? Thanks in advance
ACKSHULLY, usr stands for unix system resources.
ОтветитьThank you so much for appreciating those of us who also find the codeblox stuff disgusting, and actually going into the code
ОтветитьI don't know why you hate on Code::Blocks so much. Sure, it's a bit dated and there are better alternatives, but at least it's not made by Microsoft. I refuse to use VSC, it's soo slow. CLion is the way to go for C++ in my opinion. But something like Code::Blocks is good for beginners, it's free and light but gives you some more tools than a simple code editor.
ОтветитьI did these c++ connection to MySQL using headers, DLLs, no libraries to link to. I did the code to use the DLL in windows.
ОтветитьI spent a few weeks connecting to oracle and using their OCI coffee and DLLs and lib.
ОтветитьJust notice if you want to run that connection in a loop, instead of exit(1) when something goes wrong, it is better to add <mysqld_error.h> header and show an informative error message with mysql_error() function that takes the MYSQL* connection as a parameter. If you are using Windows and you have to include the MySQL system path to your IDE cpp compile settings . To be precise, include C:/Program Files/MySQL/MySQL Server 8.0/include" and ${the same}/MySQL Server 8.0/lib". Here you may bump into a problem with the libmysql.dll - if you are using a 32 bit compiler and that file is 64 bit you cannot build the project and vice-versa. Either everything is 64 bit or 32 bit. If you have found it difficult, have a look at a more modern and simplified API offered through the MySQL Connector C++ in cleaner C++ (header file: <mysqlx/xdevapi.h>), have a look at their guide and examples on Github
Ответитьmaybe if you don't eat your words and speak clearly?
Ответитьconnect_database.c++: In function ‘int main(int, const char**)’:
connect_database.c++:37:28: error: aggregate ‘main(int, const char**)::connection_details sqlDatabase’ has incomplete type and cannot be defined
struct connection_details sqlDatabase;
🤔
well done keep it up
Ответитьhow can we insert
ОтветитьHi, I have undefined reference to my sql functions and i did as you. Any help?
ОтветитьThis is only on the local machine correct? How would I go about making users able to log in from other computers?
Ответитьhow to connect mysql remote access?
Ответитьholy shit that microphone is awful
ОтветитьI need something exactly like this, thanks
Ответитьi really like this, super thankful. I just think it's better when unnecessary background music isn't included.
ОтветитьNice one man.
I'm a UK Year 4 Computer Science student, out of the coding languages I've used, C/C++ is the one I've struggled with most, pointers and references confuse me and all the std:: stuff takes time to get used to.
Great video, I've shared it to a few peeps.
i like how the way he label the part of video hahaha rant
ОтветитьHow to execute stored procedure in mysql use c++ .
ОтветитьThanks! I was getting nowhere with all the changes with MariaDB. Thank You!
Ответитьgood man thanks a lot very informative
ОтветитьThanks, this was very helpful!
ОтветитьConnecting and accessing the database works on my machine, but when I distribute the program to another machine (with all mysql dlls needed to compile) Its unable to connect to server. Is anyone else facing the same issue?
Ответитьcan someone tell me how to store the result in vaiables
ОтветитьThis has lead to my very first breakthrough in C++ MySQL connection. Thanks a lot
ОтветитьI can't thank you enough for this..
ОтветитьWorks great. For MySQL + Using Ubuntu 20.04: I had to 'sudo apt-get install libmysqlclient-dev' because I had no 'usr/include/mysql...'
ОтветитьPlease how can I do this on a mac
ОтветитьJust use SQLite with sqlite_modern_cpp
ОтветитьTHANKS YOU VERY MUCH, IT WORKS !
ОтветитьOn windows I had a problem linking with the mysqlserver.lib library, it threw a lot of errors because apparently it is compiled with something incompatible with mingw.
I have no idea how it's working, but the way I solved it was by linking not to mysqlserver, but to the mysql library instead. Then, when running the program, it required to be dynamically linked to libmysql.dll, so I copied it to the directory of my executable and now it works fine apparently.
Is it just fine to link to mysql instead of mysqlserver? Is there a way to get a mingw compatible mysqlserver library anyway?
Thanks so much!
ОтветитьCan someone recommend any tutorial about why do we use there so much pointers, because all i can find is that pointer points to the location where this data is stored but i can't understand why do we use it here ?
ОтветитьI am on a windows computer, and there is no mysql.h file in my include directory. Where can I download this, and other files that are required for this, from?
ОтветитьWhining about GUI software whilst using vscode, interesting
ОтветитьI went to Postgress just because MySQL is so very difficult to operate.
ОтветитьIt should work on windows too right? or do i have to download some extra files?
Ответитьsubs += 1
ОтветитьLmao, so true. Either codeblocks, or wrong language, or some VS from 10 years ago...
ОтветитьThank you so much! I
Ответитьhi help me to connect SQL to C++ VS on Windows please, I would comment more details soon
Ответитьmultiple definition of `mysql_connection_setup(connection_details)'; obj/Debug/main.o:/home/myname/c++/Learn C++/mysql.cpp:14: first defined here|
Ответить